REST API
The REST API lets you read server state and control your servers over HTTPS, outside the panel. Use it to wire monitoring into your own dashboards or to script restarts from CI. It is available on the Pro and Team plans, authenticated with a personal token you create in Settings, then API.
Base URL and auth
All requests go to `https://www.gamemanage.net/api/v1` and authenticate with a personal token. Create one in Settings, then API (it is shown once). Send it as a bearer token in the `Authorization` header on every request.
curl https://www.gamemanage.net/api/v1/servers \
-H "Authorization: Bearer gm_pat_your_token"The API token (`gm_pat_...`) is separate from the per-server agent key (`gm_live_...`) that your server uses to report in. The agent key belongs on the server; the API token belongs in your scripts. Keep both out of source control.
Reading server state
List your servers, then fetch one by id. Responses are JSON. Each server carries its live state: status, players, and the resource counters you see in the panel.
# list your servers
GET /servers
# one server with live status
GET /servers/{id}
# players, metrics, console and resources
GET /servers/{id}/players
GET /servers/{id}/metrics
GET /servers/{id}/console
GET /servers/{id}/resources// GET /servers/{id}
{
"id": "srv_abc123",
"name": "main-fivem",
"game": "fivem",
"status": "online",
"players": { "current": 31, "max": 64 },
"cpu": 0.42,
"memory_mb": 5120,
"uptime_seconds": 86400
}Triggering actions
Control actions use a single POST to `/servers/{id}/control` with an `action` of start, stop or restart. It needs the servers:control scope and an owner or admin role. The call returns once the panel has queued the action, not once the server is back up, so poll `GET /servers/{id}` afterward and watch `status`.
curl -X POST https://www.gamemanage.net/api/v1/servers/srv_abc123/control \
-H "Authorization: Bearer gm_pat_your_token" \
-H "Content-Type: application/json" \
-d '{"action": "restart"}'Note: The server reports in over an outbound agent connection, so an action you trigger over the API only takes effect after the agent next checks in. If a server is offline or has lost its outbound connection, a POST /servers/{id}/restart is accepted but will not run until the agent reconnects. Confirm by reading status back rather than assuming success from the POST response.
Plans and rate limits
The API is on the Pro and Team plans; Starter has no API access. Each token is rate limited per minute: 120 requests on Pro and 600 on Team. Going over the limit returns 429, and an unpaid plan returns 402. Create and revoke tokens in Settings, then API.