REST API
The REST API lets you read server state and trigger actions over HTTPS, outside the panel UI. Use it to wire monitoring into your own dashboards or to script restarts from CI. The REST API is not shipped yet. The shapes below are the planned design and may change before release.
Base URL and auth
All requests go to the v1 base URL and authenticate with a bearer token. You pass the token in the `Authorization` header on every request.
curl https://api.gamemanage.net/v1/servers \
-H "Authorization: Bearer $GM_TOKEN"The token is separate from the panel key (`gm_live_xxxx`) that your server agent uses to report in. The panel 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 all servers on your account
GET /servers
# one server by id
GET /servers/{id}
# current player list for a server
GET /servers/{id}/players// 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
Action endpoints use POST. A restart is fire-and-trigger: the call returns once the panel has queued the action, not once the server is back up. Poll `GET /servers/{id}` afterward and watch `status` to confirm it came back online.
curl -X POST https://api.gamemanage.net/v1/servers/srv_abc123/restart \
-H "Authorization: Bearer $GM_TOKEN"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.
Availability
The REST API is not live yet. Endpoints, fields, and auth details on this page are the planned shape and may change before release. Team roles and the audit log gate who can mint API tokens, so token management will follow the same Pro-plan access as the rest of the panel.