Skip to main content
GET
/
api
/
servers
List Servers
curl --request GET \
  --url https://api.example.com/api/servers
{
  "401": {},
  "403": {},
  "data": [
    {
      "uuid": "<string>",
      "identifier": "<string>",
      "name": "<string>",
      "description": {},
      "nodeId": "<string>",
      "nodeName": "<string>",
      "status": "<string>",
      "suspended": true,
      "ownership": "<string>",
      "limits": {
        "cpu": {},
        "memory": {},
        "disk": {}
      },
      "featureLimits": {},
      "primaryAllocation": {},
      "isTransferring": true
    }
  ],
  "generatedAt": "<string>"
}
Retrieves a paginated list of all servers that the authenticated user has access to. By default, this returns servers owned by the user. Admin users can optionally retrieve all servers in the system.

Authentication

Requires a valid session token. The response will vary based on the user’s role and permissions.

Query Parameters

scope
string
default:"own"
Controls which servers are returned:
  • own - Returns only servers owned by the authenticated user
  • all - Returns all servers (requires admin role)

Response

data
array
Array of server entries
generatedAt
string
required
ISO 8601 timestamp of when the response was generated

Example Request

curl -X GET "https://panel.example.com/api/servers?scope=own" \
  -H "Cookie: session=your-session-token"

Example Response

{
  "data": [
    {
      "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "identifier": "my-server",
      "name": "My Game Server",
      "description": "Production Minecraft server",
      "nodeId": "node-uuid-123",
      "nodeName": "US-East-1",
      "status": "running",
      "suspended": false,
      "ownership": "mine",
      "limits": {
        "cpu": 200,
        "memory": 4096,
        "disk": 10240
      },
      "featureLimits": null,
      "primaryAllocation": "192.168.1.100:25565",
      "isTransferring": false
    }
  ],
  "generatedAt": "2024-03-05T12:00:00.000Z"
}

Error Responses

403
Forbidden
Returned when a non-admin user attempts to use scope=all
{
  "status": 403,
  "message": "Forbidden: Admin access required to view all servers"
}
401
Unauthorized
Returned when the request lacks valid authentication

Build docs developers (and LLMs) love