Get Client Sorted Servers API
Retrieve VPN servers sorted by custom criteria for optimized server selection
Get Client Sorted Servers API
Retrieve VPN servers sorted by your chosen criteria. Order servers by congestion, country, connected users, or other parameters for optimal selection.
Custom Sorting
Order by any field.
Flexible
Ascending or descending.
Optimized
Best server selection.
Endpoint Overview
/graphqlRetrieve client servers sorted by a specified field in ascending or descending order.
Request Parameters
sortByString!RequiredThe field name to sort by (e.g., "congestionLevel", "connectedUserCount", "country").
parameterString!RequiredSort order: "asc" for ascending or "desc" for descending.
GraphQL Query
query getClientSortedServers($sortBy: String!, $parameter: String!) {
getClientSortedServers(sortBy: $sortBy, parameter: $parameter) {
id
hostName
publicIp
city
country
description
continent
connectedUserCount
congestionLevel
hero
spot
zeus
bridgeIp
bridgeCountry
}
}Variables:
{
"sortBy": "congestionLevel",
"parameter": "asc"
}HTTP Request:
curl -X POST https://api.orbnet.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"query": "query getClientSortedServers($sortBy: String!, $parameter: String!) { getClientSortedServers(sortBy: $sortBy, parameter: $parameter) { id hostName city country congestionLevel connectedUserCount } }",
"variables": {
"sortBy": "congestionLevel",
"parameter": "asc"
}
}'Response
{
"data": {
"getClientSortedServers": [
{
"id": "3",
"hostName": "asia-01.vpn.orbnet.com",
"publicIp": "192.0.2.100",
"city": "Singapore",
"country": "Singapore",
"description": "Low congestion APAC server",
"continent": "Asia",
"connectedUserCount": 45,
"congestionLevel": "low",
"hero": false,
"spot": true,
"zeus": false,
"bridgeIp": null,
"bridgeCountry": null
},
{
"id": "1",
"hostName": "us-east-01.vpn.orbnet.com",
"publicIp": "203.0.113.50",
"city": "New York",
"country": "United States",
"description": "US East Coast",
"continent": "North America",
"connectedUserCount": 180,
"congestionLevel": "low",
"hero": true,
"spot": false,
"zeus": false,
"bridgeIp": null,
"bridgeCountry": null
},
{
"id": "2",
"hostName": "eu-west-01.vpn.orbnet.com",
"publicIp": "198.51.100.25",
"city": "Amsterdam",
"country": "Netherlands",
"description": "EU primary",
"continent": "Europe",
"connectedUserCount": 520,
"congestionLevel": "medium",
"hero": true,
"spot": false,
"zeus": true,
"bridgeIp": null,
"bridgeCountry": null
}
]
}
}{
"errors": [
{
"message": "Invalid sort field specified",
"path": ["getClientSortedServers"],
"extensions": {
"code": "INVALID_PARAMETER"
}
}
],
"data": null
}Sortable Fields
congestionLevel
Sort by server load.
connectedUserCount
Sort by user count.
country
Alphabetical by country.
city
Alphabetical by city.
Common Sorting Strategies
Lowest Congestion First
Fewest Users
By Location
Hero Servers First
Related Endpoints
Optimal Selection
For best user experience, sort by congestionLevel ascending to recommend the least loaded servers first.
View All Client Servers
See the complete unsorted list of available VPN servers.