foliot docs

API reference / Tasks / Claim queued tasks

Claim queued tasks

POST/apps/{appId}/tasks/poll

For pull workers. A step with a queue is never pushed to your handler — it waits here until a worker claims it. The claim is exclusive: a task returned to one poller is not returned to another.

Path parameters

appId
string
REQUIRED

The app's name.

Request body

max
integer (int64)
OPTIONAL

min 1 · max 100 · default 10

queue
string
REQUIRED

min length 1

Responses

200 object OK
400 Error Invalid request.
401 Error Missing, malformed or unknown bearer token.
403 Error The token is valid but not permitted on this route.
503 Error A dependency this route needs is unreachable.