Get status
Endpoint to get query status and results. Please also see async queries.
GET
https://api.supermetrics.com/enterprise/v2/query/status
-
api_key
string
Conditional. API key when not using an authorization header. See authentication for more.
-
schedule_id
string
Required. Schedule ID for the query
-
offset_start
integer
Optional. Starting row index for paginated response. Defaults to 0.
-
offset_end
integer
Optional. Ending row index for paginated response. Defaults to none.
Request
HTTP
Postman examples
GET https://api.supermetrics.com/enterprise/v2/query/status?json={
"api_key": "<api key>",
"schedule_id": "<query schedule id>"
}
Response
Property | Type | Description |
meta > request_id | string | API request ID |
meta > schedule_id | string | Query schedule ID |
meta > status_code | string | Status code for the query. See status codes. |
meta > progress > queries_ready | integer | Number of sub-queries performed for this query |
meta > progress > queries_total | integer | Number of sub-queries scheduled for this query. Can increase as query progresses. |
meta > workflow > tasks_scheduled | integer | Number of query tasks scheduled to your license queue |
meta > workflow > tasks_running | integer | Number of query tasks running in your license queue |
HTTP 200 OK
{
"meta": {
"request_id": "AbRoVa9aiNVGFhsl8Eu2ebAmuenMHwsY",
"schedule_id": "4226fd7f86799a5804...102d51c0",
"status_code": "RUNNING",
"progress": {
"queries_ready": 0,
"queries_total": 1
},
"workflow": {
"tasks_scheduled": 0,
"tasks_running": 1
}
},
"data": []
}
Status codes
SCHEDULED | Query is scheduled and inactive |
QUEUED | Query is queued for execution |
RUNNING | Query is currently running |
SUCCESS | Query has stopped and was successful |
FAILURE | Query has stopped and failed |
STOPPED | Query was aborted |
Expiry of results
By default, the query status or results can be fetched up to 1 hour after the query process has ended. This expiry time can be subject to license restrictions. If a query cannot be found, it will give an error of STATUS_NOT_FOUND.
Resources
→ Usage limits »
→ Async queries »
Last updated 2022-03-28 UTC.