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
GET https://api.supermetrics.com/enterprise/v2/query/status?json={
    "api_key": "<api key>",
    "schedule_id": "<query schedule id>"
}
Response
PropertyTypeDescription
meta > request_idstring API request ID
meta > schedule_idstring Query schedule ID
meta > status_codestring Status code for the query. See status codes.
meta > progress > queries_readyinteger Number of sub-queries performed for this query
meta > progress > queries_totalinteger Number of sub-queries scheduled for this query. Can increase as query progresses.
meta > workflow > tasks_scheduledinteger Number of query tasks scheduled to your license queue
meta > workflow > tasks_runninginteger 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

SCHEDULEDQuery is scheduled and inactive
QUEUEDQuery is queued for execution
RUNNINGQuery is currently running
SUCCESSQuery has stopped and was successful
FAILUREQuery has stopped and failed
STOPPEDQuery 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.