Skip to content

Game server console and log endpoints

These endpoints let HEO API keys open a game server console stream, send console commands, and retrieve the latest game server log for scoped servers.

Authentication and scopes

Send a HEO API key in the Authorization header.

text
Authorization: Bearer <api_key>

Required scopes:

endpointrequired HEO scopeaction
GET /v1/hosting/game/console/{server_id}/websocketgame-console:read or game-console:read_writeOpen a console stream
POST /v1/hosting/game/console/{server_id}/commandgame-console:read_writeSend console commands
GET /v1/hosting/game/logs/{server_id}/latestgame-logs:readRead the latest log

Console write scope does not grant log access. Log access requires game-logs:read.

Read-only game-console:read keys can only open read-only console streams. If the stream can send commands, use game-console:read_write.

GET /v1/hosting/game/console/{server_id}/websocket

Returns short-lived websocket bootstrap data for the game server console. The response does not include stored account credentials.

When the websocket server signals that the stream token is expiring or expired, request fresh bootstrap data from this endpoint and authenticate the existing or new websocket connection with the refreshed token.

json
{
  "success": true,
  "server_id": "srv_123",
  "websocket": {
    "socket_url": "wss://console.example.com/ws",
    "token": "short-lived-token"
  }
}

POST /v1/hosting/game/console/{server_id}/command

Sends a command to the game server console. The API key must include game-console:read_write.

bash
curl -sS -X POST \
  "https://api.heo-systems.net/v1/hosting/game/console/srv_123/command" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{"command":"say Deployment complete"}'
json
{
  "success": true,
  "server_id": "srv_123",
  "status": "sent"
}

GET /v1/hosting/game/logs/{server_id}/latest

Returns the latest game server log as text.

json
{
  "success": true,
  "server_id": "srv_123",
  "empty": false,
  "content": "[12:00:00] Server started\n"
}

Error responses

codeerrormessage
400validation_errorInvalid JSON body or missing command
401unauthorizedMissing, invalid, or revoked API key
403forbiddenYou do not have access to this game server
403insufficient_scopeRequired console or log scope is missing
403provider_permission_deniedConsole commands are not available for this server
404not_foundEndpoint not found
405method_not_allowedMethod not allowed
502provider_errorThe console or log request failed

Stored account credentials are never returned in these responses.