Claim the next ready task
Take the next ready task of a queue as the caller’s to work on now: the first open task of the workspace the caller can change that nobody is working on, that is not held for a person and that waits on no open task. The caller’s own tasks come first, then tasks assigned to nobody, each soonest due first by day; a task assigned to someone else is never taken. Narrow the queue with labels (a task must carry all of them) and a folder or project. It answers the task it claimed, or nothing_ready with how the queue stands in numbers: no task that was passed over is named. A blank label or folder id is refused, never ignored. Open to a person’s own key or token; a credential acting as an agent or an automation is refused.
Authentication
Headers
Request
The workspace whose tasks to take from; the caller is a member.
Only tasks placed directly in this folder, or linked by this project: one the caller can open. Left out or null: every task of the workspace the caller can open. A blank id is refused (400), never ignored.
Only tasks that carry every one of these label names, each matched whatever its case (at most 20: a task carries no more). Left out, null or an empty list: whatever their labels. A blank name is refused (400), never ignored.
How long the claim holds, in minutes (30 when left out).
Your own name for the worker that is calling (1 to 64 letters, digits, -, _ or .), for when several workers share one API key. A claim made with a name is that worker’s: another worker of the same caller is refused the task while the claim is live, and only the same name renews it or gives it back. Left out, the call is the caller’s own, as from the app. The name is yours to choose and grants nothing.
Response
The task claimed, or nothing_ready with counts.
With nothing_ready: the same in numbers. No task is named.
With nothing_ready: how the queue stands, in one line.
claimed or nothing_ready.
The task now claimed by the caller; null when nothing is ready.
