Get Job Status
Poll the status and retrieve results of an asynchronous analytics job.
/v1/jobs/{job_id}
curl -X GET "https://analytics.toolkitapi.io/v1/jobs/job_abc001" \
-H "X-API-Key: YOUR_API_KEY"
import httpx
resp = httpx.get(
"https://analytics.toolkitapi.io/v1/jobs/job_abc001",
)
print(resp.json())
const resp = await fetch("https://analytics.toolkitapi.io/v1/jobs/job_abc001", {
});
const data = await resp.json();
console.log(data);
# See curl example
{
"job_id": "job_abc001",
"query_id": "qry_xyz789",
"dataset_id": "dset_abc123",
"status": "succeeded",
"progress": 100,
"results": {
"columns": ["region", "total_revenue"],
"rows": [
["North", 48320.50],
["South", 31205.00]
],
"row_count": 2
},
"error": null,
"created_at": "2024-06-01T14:22:10Z",
"completed_at": "2024-06-01T14:22:45Z"
}
Description
How to Use
1. Trigger an async operation by calling `POST /v1/query/{query_id}` with `"execution_mode": "async"`. 2. Capture the `job_id` from the response body. 3. Poll `GET /v1/jobs/{job_id}` at a reasonable interval (e.g. every 2–5 seconds). 4. Stop polling once `status` transitions to `"succeeded"` or `"failed"`. 5. On `"succeeded"`, read the `results` object. On `"failed"`, inspect `error` for remediation.
About This Tool
The Get Job Status endpoint lets you poll the progress and retrieve results of any analytics operation submitted with `"execution_mode": "async"`. It tracks jobs through four lifecycle states — `queued`, `running`, `succeeded`, and `failed` — giving you granular visibility into long-running computations.
Once a job reaches `succeeded`, the full result payload is embedded in the response. If the job `failed`, a human-readable `error` field describes the cause.
> **Note:** Async job support is a planned Phase 2 feature. The endpoint is reserved and will return `501 Not Implemented` until it is fully enabled in a future release.
Why Use This Tool
- Large dataset aggregations — Retrieve results from multi-million-row analyses without holding an HTTP connection open.
- Batch report generation — Queue multiple jobs and poll them in parallel to drive a dashboard loading screen.
- CI/CD data pipelines — Fire-and-forget query execution; check job status in a subsequent pipeline step.
- User-facing progress indicators — Use the `progress` field to render a progress bar while a job is running.
- Error auditing — Log `error` details from failed jobs to identify recurring data quality issues.
Start using Get Job Status now
Get your free API key and make your first request in under a minute.