Shotstash
API referenceREST referencePipeline

Send a heartbeat

Keeps the worker live and refreshes the leases of the jobs it is processing. A claim without a heartbeat for the lease (90 s by default) goes back to the queue.

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/workers/heartbeat

Keeps the worker live and refreshes the leases of the jobs it is processing. A claim without a heartbeat for the lease (90 s by default) goes back to the queue.

Authorization

WorkerToken
headerX-Worker-Token<token>

Per-worker token returned once by worker registration.

Request Body

application/json
  1. body
manifest*

What the worker is and does (it may change between heartbeats).

activeJobIds?array<string>|

Ids of the jobs the worker is processing; their leases are refreshed.

Response Body

Heartbeat stored

application/json
  1. response
contract*number

Contract major of the server (1).

lostJobIds*array<string>

Ids from activeJobIds this worker no longer holds (cancelled, requeued or gone): stop working on them.

curl -X POST "https://example.com/api/v1/pipeline/workers/heartbeat" \  -H "Content-Type: application/json" \  -d '{    "manifest": {      "name": "string",      "version": "string",      "kinds": [        "string"      ],      "contract": 0    }  }'
{  "contract": 0,  "lostJobIds": [    "string"  ]}