Skip to main content
GET
/
nql
/
{job_id}
Get the result of a NQL forecast
curl --request GET \
  --url https://api-dev.narrative.io/nql/{job_id} \
  --header 'Authorization: Bearer <token>'
{ "id": "ef628399-1c83-44ff-8525-69c3796cfc7c", "company_id": 1, "completed_at": null, "created_at": "2025-04-11T23:37:40.796820Z", "failures": [], "idempotency_key": "9c987819-b5e9-4357-abe6-52c1e6a2e8b5", "input": { "nql": "EXPLAIN SELECT company_data.\"9561\".\"STATE\" FROM company_data.\"9561\"", "compiled_sql": "..." }, "request_source": { "type": "api_user", "company_id": 1, "user_id": 1414 }, "result": null, "state": "running", "updated_at": "2025-04-11T23:37:41.168859Z" }

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

job_id
string<uuid>
required

Unique identifier for a job.

Response

OK

id
string<uuid>
required

Unique identifier for the job.

company_id
string<uuid>
required

Company that ran the job.

completed_at
string<date-time>
required

The timestamp representing when the job finished.

created_at
string<date-time>
required

The timestamp representing when the job was created.

failures
object[]
required

causes of job failure

idempotency_key
string
required

The unique ID associated with the job.

request_source
object
required
Example:
{
  "type": "api_user",
  "company_id": 1,
  "user_id": 1248
}
state
enum<string>
default:pending
required
Available options:
failed,
cancelled,
completed,
pending,
running
updated_at
string<date-time>
required

The timestamp representing when the job was updated.

input
object
required

The query and it's compiled sql sent to the executor.

result
object