# Информация о сервере

{% hint style="warning" %}
API получает данные сервера  у девблога **до** появления **Query Port**
{% endhint %}

{% tabs %}
{% tab title="Request" %}

<table><thead><tr><th width="147">Параметры</th><th>Описание</th></tr></thead><tbody><tr><td>ip</td><td>IP-адрес сервера (<strong>111.111.111.111</strong>:35000)</td></tr><tr><td>port</td><td>Port сервера (111.111.111.111:<strong>35000</strong>)</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### Метод GetInfo(

```url
http://api.yrsproject.ru/public/server/GetInfo/{ip}/{port}
```

{% tabs %}
{% tab title="Response" %}

```json
{
  "status": "success",
  "response": {
    "Protocol": 17,
    "HostName": "Your Rusty Story - Survival » x2 » Max 4",
    "Map": "Barren",
    "ModDir": "rust",
    "ModDesc": "Rust",
    "AppID": 480,
    "Bots": 0,
    "Dedicated": "d",
    "Os": "w",
    "Password": false,
    "Secure": true,
    "Version": "2054",
    "ExtraDataFlags": 177,
    "GamePort": 35000,
    "SteamID": 90222163686865920,
    "GameTags": "mp100,cp71,qp0,v2054,he99c3cc5,stok,born1734615358,modded,oxide",
    "GameID": 480
  }
}
```

{% endtab %}
{% endtabs %}

### Метод GetPlayers()

```url
http://api.yrsproject.ru/public/server/GetPlayers/{ip}/{port}
```

{% tabs %}
{% tab title="Response" %}

```json
{
  "status": "success",
  "response": [
    {
      "Id": 0,
      "Name": "manuna#YRS",
      "Frags": 0,
      "Time": 32677,
      "TimeF": "09:04:37"
    },
    {
      "Id": 0,
      "Name": "",
      "Frags": 0,
      "Time": 28257,
      "TimeF": "07:50:57"
    },
    {
      "Id": 0,
      "Name": "#YRS TERNIXZ1337",
      "Frags": 0,
      "Time": 27969,
      "TimeF": "07:46:09"
    }
}
```

{% endtab %}
{% endtabs %}

### Метод GetOnline()

```url
http://api.yrsproject.ru/public/server/GetOnline/{ip}/{port}
```

{% tabs %}
{% tab title="Response" %}

```json
{
  "status": "success",
  "response": {
    "HostName": "Your Rusty Story - Survival » x2 » Max 4",
    "Players": 72,
    "MaxPlayers": 100
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.yrsproject.ru/documentation/methods/servers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
