API reference
Tasks
GET /1/tasks/:taskId — check whether a queued write has been applied.
GET /1/tasks/:taskIdRequires the same key type that produced the task (a write or admin key).
When you get a taskId
A write only returns a taskId on the rare overflow path, when the primary answered with backpressure and the write was accepted onto a queue instead of applied directly. Most writes never produce a task, because most writes apply immediately.
Response
{ "taskId": "task_7f2c1a94", "status": "applied", "dataVersion": 482 }status | Meaning |
|---|---|
queued | Not yet applied |
applied | Applied; dataVersion reflects the write |
failed | Could not be applied after retries — check the batch for a validation error |
Example
curl https://api.usesuo.com/1/tasks/task_7f2c1a94 \
-H "x-suo-key: suo_write_YOUR_KEY"Polling
Poll with backoff rather than tightly — an overflow task typically applies within seconds. If you need a hard guarantee that a specific write is visible before your own next step, prefer minDataVersion on a subsequent search once you have the task's dataVersion, rather than polling this endpoint in a request's critical path.