Query

Poll an async query's status

Returns the current state of a previously submitted async query (pending, running, success, error). When status is success, the original /v1/query response body is embedded under data.result with the same shape (status + data.rows[] + meta). When status is error, data.error_message contains the failure reason. Authorization: same Bearer token. A job_id belonging to another account returns the same job_id not found or expired envelope as unknown ids. Successful results are retained for 8 hours; after that the job returns the same not-found envelope.

post/query/status

Request

  • Base URL: https://api.reportingninja.com/v1
  • URL: https://api.reportingninja.com/v1/query/status
  • Auth: HTTP bearer

Request body

job_idstring required

The job the submission answered.

Example request

{
  "job_id": "4028808ca0b31c7d01a0b31d44e70000"
}

Response

The answer of the call, or a business error envelope. This endpoint reports its own errors with HTTP 200 and status=error: read envelope.status before reading data.

OR

Example response

{
  "data": {
    "job_id": "1234567890"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.