GamebeastDocs
Dashboard

Request saved query execution (async)

POST
/application/{applicationId}/analytics/v1/queries/{queryId}/executions

Start (or join) an asynchronous execution of a saved query. Returns immediately with an executionId rather than waiting for ClickHouse; the result arrives over the analytics websocket, or can be recovered from GET /queries/:queryId/executions. Concurrent requests for the same resolved variant share one execution. Responds 202 while work is in progress and 200 when data is returned inline.

Authorization

AuthorizationBearer <token>

Secret server key (prefixed gb_sk_) for server-to-server calls. Send it as Authorization: Bearer <key>. Never ship a secret key in a game client.

In: header

Path Parameters

applicationId*number

Gamebeast project ID

queryId*number

Header Parameters

environment_id*number

Gamebeast environment ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/application/0/analytics/v1/queries/0/executions" \  -H "environment_id: 0" \  -H "Content-Type: application/json" \  -d '{}'
{  "status": "ready",  "executionId": "string",  "data": null,  "refreshedAt": "string",  "executionMs": 0,  "startedAt": "string",  "progress": {    "readRows": 0,    "totalRowsApprox": 0,    "elapsedMs": 0,    "sampledAt": "string"  },  "error": {    "code": "string",    "message": "string"  },  "dedupJoiners": 0,  "variantToken": "string"}