Перейти к основному содержимому

Client Servers API

POST /clientServers

Description

This API endpoint retrieves a list of all client servers with their detailed information.

Request Body

The request uses GraphQL to perform the clientServers query, which does not require any variables.

Query:

query clientServers {
clientServers {
id
hostName
publicIp
city
country
description
continent
connectedUserCount
congestionLevel
hero
spot
zeus
bridgeIp
bridgeCountry
}
}

GraphQL Variables:

{}

Example Request:

curl --location '' \
--header 'Content-Type: application/json' \
--data '{"query":"query clientServers {\n clientServers {\n id\n hostName\n publicIp\n city\n country\n description\n continent\n connectedUserCount\n congestionLevel\n hero\n spot\n zeus\n bridgeIp\n bridgeCountry\n }\n}","variables":{}}'

Response:

  • Success (200 OK):

    • The response includes a list of all client servers with detailed information for each server.
    {
    "data": {
    "clientServers": [
    {
    "id": 1,
    "hostName": "client-server-01",
    "publicIp": "203.0.113.10",
    "city": "Los Angeles",
    "country": "USA",
    "description": "Main client server",
    "continent": "North America",
    "connectedUserCount": 150,
    "congestionLevel": "Low",
    "hero": true,
    "spot": false,
    "zeus": true,
    "bridgeIp": "192.168.1.10",
    "bridgeCountry": "USA"
    },
    {
    "id": 2,
    "hostName": "client-server-02",
    "publicIp": "203.0.113.20",
    "city": "Chicago",
    "country": "USA",
    "description": "Secondary client server",
    "continent": "North America",
    "connectedUserCount": 200,
    "congestionLevel": "Moderate",
    "hero": false,
    "spot": true,
    "zeus": false,
    "bridgeIp": "192.168.1.20",
    "bridgeCountry": "USA"
    }
    // Additional client servers...
    ]
    }
    }
  • Error (4XX/5XX):

    • If there is an issue retrieving the client server list, such as a server error or misconfiguration, the response will include an error message and status code.

Note:

Ensure that the GraphQL server is properly configured to handle the clientServers query and that it can return a comprehensive list of client servers for accurate results.