Shotstash
API referenceREST referencePipeline

Fail the job

Reports an error. Retryable failures are requeued while attempts remain (3 in total); the rest fail for good.

Try the REST routes against the public demo at https://demostash.aldyernesto.my.id. Get a read-only token (valid for 60 minutes), then paste it as the Bearer token in the console of any route.

POST
/api/v1/pipeline/jobs/{id}/fail

Reports an error. Retryable failures are requeued while attempts remain (3 in total); the rest fail for good.

Authorization

WorkerToken
headerX-Worker-Token<token>

Per-worker token returned once by worker registration.

Path Parameters

id*string

Job id (UUID).

Header Parameters

X-Claim-Token*string

Claim token from the claim answer.

Request Body

application/json
  1. body
error*string

What went wrong (shown to people with access to the file).

retryable?|

True when another attempt may succeed (the job is requeued while attempts remain).

Response Body

Failure recorded

application/json
  1. response
status*string

queued when another attempt follows, else failed.

Value in"queued""failed"
attempts*number

Attempts spent so far.

maxAttempts*number

Attempts allowed in total.

curl -X POST "https://example.com/api/v1/pipeline/jobs/string/fail" \  -H "X-Claim-Token: string" \  -H "Content-Type: application/json" \  -d '{    "error": "string"  }'
{  "status": "queued",  "attempts": 0,  "maxAttempts": 0}