View all methods

studio.queryRuns.info

Get relevant data for a Data Studio query run. This endpoint is query run information only and does not include result rows.

Facts

Method GET https://api.getdx.com/studio.queryRuns.info
Required scope datacloud:query

Arguments

Name Type Description
token Token Auth token passed as an HTTP header.
id Text The query run ID returned by studio.queryRuns.execute. Legacy encoded IDs are also supported.

Usage notes

  • To know when to fetch results, poll this endpoint until status is succeeded or failed
  • Polling is rate limited to 10 requests per 5 seconds per query run.
  • This endpoint will return one of the following statuses: queued, running, succeeded, failed, or expired.
  • While a run is still pending, the response includes a Retry-After: 1 header.
  • Failed runs include an error object with more details.

Example request

This is a typical request:

curl -X GET 'https://api.getdx.com/studio.queryRuns.info?id=r3jv7p0x4gk2' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer xxxx-xxxxxxxxx-xxxx'

Example response

This is a typical success response:

{
  "ok": true,
  "query_run": {
    "id": "r3jv7p0x4gk2",
    "status": "running",
    "submitted_at": "2026-04-13T20:10:05Z",
    "finished_at": null,
    "expires_at": "2026-05-13T20:10:05Z",
    "info_url": "/studio.queryRuns.info?id=r3jv7p0x4gk2",
    "results_url": "/studio.queryRuns.results?id=r3jv7p0x4gk2"
  }
}

When a run fails, the response includes an error object:

{
  "ok": true,
  "query_run": {
    "id": "r3jv7p0x4gk2",
    "status": "failed",
    "submitted_at": "2026-04-13T20:10:05Z",
    "finished_at": "2026-04-13T20:10:09Z",
    "expires_at": "2026-05-13T20:10:09Z",
    "info_url": "/studio.queryRuns.info?id=r3jv7p0x4gk2",
    "results_url": "/studio.queryRuns.results?id=r3jv7p0x4gk2",
    "error": {
      "code": "sql_error",
      "message": "Query timeout."
    }
  }
}

Errors

This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing. Callers should always check the value of the ok param in the response.

Error Description
not_authed No authentication token provided.
invalid_auth Some aspect of authentication cannot be validated.
not_authorized The API token does not include the required datacloud:query scope.
not_found No query run with that ID exists for the current account.
too_many_requests You are polling the same query run too aggressively.
e>