Documentation

Overview

Use the service

Billing

Reference

Reference

POST /jobs/{jobId}/retry

Run a failed capture item or a failed analytical job again.

Syntax

POST https://grid-lab.zyxio.xyz/jobs/<jobId>/retry
x-api-key: <key>

Request

NameWhereRequiredMeaning
x-api-keyheaderyes, or AuthorizationYour API key, or Authorization: Bearer <token> from Zyxio sign-in.
jobIdpathyesA capture item's id, or an analytical job's cj_ id.

No body.

Response

200 OK. For a capture item, {"jobId": "...", "state": "..."} with its new state. For an analytical job, its record as GET /jobs/{jobId} shows it, with a new attempt queued.

A capture item can be retried only while it is failed and has no published failure record. Most failures publish one, and a published result never changes, so most failed items cannot be retried: submit the URL again in a new batch instead.

Errors

StatusBodyWhenWhat 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.
402{"error": "insufficient_credit", "requiredMicros": ..., "availableMicros": ...}Analytical jobs only: your account is metered, credit enforcement is on, and the retry's reservation exceeds your available credit (with monthly invoicing: what your monthly limit and the unpaid-usage ceiling leave; nothing while invoicing is paused or an invoice is past due). Nothing was queued.Top up, raise your monthly limit or pay the past-due invoice, then retry.
402{"error": "daily_cap_exceeded", ...}Analytical jobs only: the key's daily cap would be exceeded. Nothing was queued.Raise the cap, or wait for 00:00 UTC.
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.
403{"error": "account_suspended"}Analytical jobs only: credit enforcement is on and the account a Zyxio-internal credential is billed to is suspended. Nothing was queued. (A suspended customer's own keys and sign-in are refused before this, with 401 and 403 forbidden.)Ask Zyxio.
404{"error": "unknown job"}No such item or job, or it belongs to another identity.Check the id.
409{"error": "only failed jobs can be retried"}The capture item has not failed.Nothing to do.
409{"error": "published terminal failures are immutable and cannot be retried"}The capture item's failure is published.Submit the URL in a new batch.
409{"error": "job browser profile is no longer selectable"}The item's profile has been retired.Submit the URL again with a current profile.
409{"error": "JOB_NOT_RETRYABLE"}The analytical job is not in a state that can be retried.Check its phase.
503{"error": "COMPUTE_UNAVAILABLE"}Analytical jobs only: job tracking is not ready.Retry after the retry-after seconds.

Example

curl -s -X POST https://grid-lab.zyxio.xyz/jobs/cj_0123456789abcdef0123456789abcdef/retry \
  -H "x-api-key: $BROWSERGRID_API_KEY"

Billing

A capture item's retry reserves nothing and the call is free. The item is charged at most once, when its files are published, however many attempts it takes.

An analytical job's retry is a new admission. Before the new attempt is queued it reserves credit like POST /jobs: one attempt's longest cost, (vCPU × €0.04 + GiB × €0.0064) per hour × runningDeadlineSeconds, on the CPU and memory the job requests. Replays after an eviction that the retry can still earn are free, so they hold nothing more. With credit enforcement on, a metered account without that much available credit gets 402 and nothing is queued. The new attempt is then charged for its own running time, under the same rules as any attempt; what it does not use is released when it finishes.

See also

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