URL:
/api
Method:
POST
Description:
This request allows adding servers to the list. You can add up to 100 servers in a single request.
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your API key. |
| action | string | Yes | Always set to: add. |
| servers | array | Yes | Array of servers to add. |
Format of the servers array:
| Field | Type | Required | Description |
|---|---|---|---|
| server | string | Yes | The server's IP or domain name. |
| port | int | Yes | The server's port. |
| query_port | int | No | Query port, if different from the main port. |
| game | string | Yes | Alias of the game (obtained via the games request). |
Sample Request:
curl -X POST https://dixrix.net/api \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "api_key=your_api_key&action=add&servers[][server]=127.0.0.1&servers[][port]=27015&servers[][game]=csgo"
Response (200 OK):
{
"status": "success",
"message": "Servers have been added for review."
}
| Message | Description |
|---|---|
| Invalid API key. | The provided API key is invalid. |
| The server list for addition is empty. | The list of servers to add is empty. |
| Server parameter is missing. | The server parameter is missing. |
| Game alias parameter is missing. | The game alias parameter is missing. |
| Invalid game alias provided. | The provided game alias is invalid. |
{
"status": "error",
"message": "Invalid API key."
}