GamebeastDocs
Dashboard

Execute insight query

POST
/application/{applicationId}/analytics/v1/queries/insights/execute

Execute an insight query. Returns time-series data when a time-based display is selected (line, column, etc.), or overall totals when a non-time display is selected (metric, pie, table, world_map).

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

Header Parameters

environment_id*number

Gamebeast environment ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/application/0/analytics/v1/queries/insights/execute" \  -H "environment_id: 0" \  -H "Content-Type: application/json" \  -d '{    "time": {      "step": "second",      "relative": {        "step": "second",        "value": 0      }    },    "metrics": [      {        "visible": true,        "id": "string",        "data": {          "name": "string",          "type": "event"        }      }    ],    "options": {      "display": "line"    }  }'
Empty