GET /jobs/{jobId}
One capture item or one analytical job: its state, attempts and failure reason.
Syntax
GET https://grid-lab.zyxio.xyz/jobs/<jobId>
x-api-key: <key>
Request
| Name | Where | Required | Meaning |
|---|---|---|---|
x-api-key | header | yes, or Authorization | Your API key, or Authorization: Bearer <token> from Zyxio sign-in. |
jobId | path | yes | A capture item's id from GET /batches/{batchId}, or an analytical job's id, which starts with cj_. |
Response
200 OK. For a capture item:
| Field | Meaning |
|---|---|
jobId, batchId, url | The item, its batch and its URL. |
state | waiting, prioritized, delayed (between attempts), active, completed or failed. |
attemptsMade | Attempts so far; an item is tried up to three times. |
failedReason | Why the last attempt failed, or null. |
artifacts | The storage names of the item's files. They are not downloadable as such; use GET /artifacts/{jobId}/{kind}. |
For an analytical job (cj_...), the job record:
| Field | Meaning |
|---|---|
jobId | The job's id. |
phase | ACCEPTED, QUEUED, PROVISIONING, RUNNING, PUBLISHING, SUCCEEDED, FAILED, TIMED_OUT or CANCELLED. |
phaseTimestamps | When the job entered each phase. |
attempt, attempts | The current attempt number and every attempt with its own phase, timestamps, termination and log availability. |
termination | For a finished attempt: class (workload, cancelled or platform), exitCode and reason. |
imageDigest | The exact image that runs. |
logs, logsTruncated, artifacts | Whether the current attempt's log is published, and its size. |
While job tracking is catching up, an analytical job's answer carries the header x-browsergrid-compute-degraded: reconciler-unready: the record may be a little behind, never wrong.
Errors
| Status | Body | When | What to do |
|---|---|---|---|
401 | {"error": "unauthorized"} | No credential, or a key that is revoked, expired, wrong, or of a suspended account. | Send a valid key. |
503 | {"error": "accounting_unavailable"} | Your key or Zyxio sign-in could not be checked because the account database did not answer in time. Nothing was done. | Retry shortly; the same request is safe to resend. |
403 | {"error": "forbidden"} | A valid Zyxio sign-in token whose identity has no account here, or whose account is suspended. | Accept your invitation first, or use a key. |
404 | {"error": "unknown job"} | No such item or job, or it belongs to another identity. | Check the id, and use the identity that created it. |
503 | {"error": "COMPUTE_UNAVAILABLE"} | Analytical jobs only: the job store did not answer in time. | Retry after the retry-after seconds. |
Example
curl -s https://grid-lab.zyxio.xyz/jobs/0b6c8f8e-2f3a-4c1d-9e5f-7a8b9c0d1e2f \
-H "x-api-key: $BROWSERGRID_API_KEY"
{
"jobId": "0b6c8f8e-2f3a-4c1d-9e5f-7a8b9c0d1e2f",
"batchId": "6f1d2c3e-8a4b-4e5f-9a0b-1c2d3e4f5a6b",
"url": "https://example.com/",
"state": "completed",
"attemptsMade": 1,
"failedReason": null,
"artifacts": {
"screenshot": "6f1d2c3e-8a4b-4e5f-9a0b-1c2d3e4f5a6b/0b6c8f8e-2f3a-4c1d-9e5f-7a8b9c0d1e2f/screenshot.png",
"html": "6f1d2c3e-8a4b-4e5f-9a0b-1c2d3e4f5a6b/0b6c8f8e-2f3a-4c1d-9e5f-7a8b9c0d1e2f/page.html",
"body": "6f1d2c3e-8a4b-4e5f-9a0b-1c2d3e4f5a6b/0b6c8f8e-2f3a-4c1d-9e5f-7a8b9c0d1e2f/body",
"meta": "6f1d2c3e-8a4b-4e5f-9a0b-1c2d3e4f5a6b/0b6c8f8e-2f3a-4c1d-9e5f-7a8b9c0d1e2f/meta.json"
}
}
Billing
Free.