GET /jobs/{jobId}/logs
The stdout and stderr of one attempt of an analytical job, as plain text.
Syntax
GET https://grid-lab.zyxio.xyz/jobs/<jobId>/logs?attempt=<n>
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 | An analytical job's cj_ id. |
attempt | query | no | An earlier attempt's number. Default: the current attempt. |
Response
200 OK, content-type: text/plain, the attempt's output up to 1 MiB. Headers:
| Header | Meaning |
|---|---|
x-browsergrid-attempt | The attempt the log belongs to. |
x-browsergrid-artifact-id | The log's id, as GET /jobs/{jobId}/artifacts lists it. |
x-browsergrid-logs-truncated | true when the output was longer than 1 MiB and was cut. |
A log is published once its attempt has ended.
Errors
| Status | Body | When | What to do |
|---|---|---|---|
400 | {"error": "INVALID_LOG_QUERY"} | attempt is not a positive whole number, or another parameter was sent. | Fix the query. |
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 job, a capture item's id, or a job of another identity. | Check the id. |
404 | {"error": "LOGS_NOT_AVAILABLE"} | The attempt has not ended, or has no log. | Wait for the attempt to finish. |
503 | {"error": "COMPUTE_UNAVAILABLE"} | The log could not be read or failed its integrity check. | Retry after the retry-after seconds. |
Example
curl -s -D - https://grid-lab.zyxio.xyz/jobs/cj_0123456789abcdef0123456789abcdef/logs \
-H "x-api-key: $BROWSERGRID_API_KEY"
HTTP/2 200
content-type: text/plain
x-browsergrid-attempt: 1
x-browsergrid-artifact-id: ca_0123456789abcdef0123456789abcdef
x-browsergrid-logs-truncated: false
42
Billing
Free.