Documentation

Overview

Use the service

Billing

Reference

Reference

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

NameWhereRequiredMeaning
x-api-keyheaderyes, or AuthorizationYour API key, or Authorization: Bearer <token> from Zyxio sign-in.
jobIdpathyesAn analytical job's cj_ id.
attemptquerynoAn earlier attempt's number. Default: the current attempt.

Response

200 OK, content-type: text/plain, the attempt's output up to 1 MiB. Headers:

HeaderMeaning
x-browsergrid-attemptThe attempt the log belongs to.
x-browsergrid-artifact-idThe log's id, as GET /jobs/{jobId}/artifacts lists it.
x-browsergrid-logs-truncatedtrue when the output was longer than 1 MiB and was cut.

A log is published once its attempt has ended.

Errors

StatusBodyWhenWhat 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.

See also

Analytical jobs, GET /jobs/{jobId}/artifacts.