Shotstash
API referenceREST referencePipeline

Claim the next job

Claims the oldest queued job of the worker kinds. The claim token in the answer goes into X-Claim-Token on every later call for the job.

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/next

Claims the oldest queued job of the worker kinds. The claim token in the answer goes into X-Claim-Token on every later call for the job.

Authorization

WorkerToken
headerX-Worker-Token<token>

Per-worker token returned once by worker registration.

Request Body

application/json
  1. body
[key: string]?not (unknown)

Response Body

A job was claimed

application/json
  1. response
job*

The claimed job.

curl -X POST "https://example.com/api/v1/pipeline/jobs/next" \  -H "Content-Type: application/json" \  -d '{    "property1": null,    "property2": null  }'
{  "job": {    "id": "string",    "kind": "string",    "params": {      "property1": null,      "property2": null    },    "attempt": 0,    "maxAttempts": 0,    "claimToken": "string",    "input": {      "url": "string",      "name": "string",      "mimeType": "string",      "size": 0    }  }}