API Reference

Seven operations, and nothing to authenticate with — the space UUID in the path is the credential. For commands to paste rather than shapes to build against, see curl. The same surface is published as OpenAPI 3.1 at /openapi.json, if you would rather generate a client than write one.

Four things to know before you build on this

  1. 1

    A write replaces the whole state

    Omitting values clears it rather than leaving it alone, and PATCH is refused with a 405 rather than quietly promising a merge. The one exception is a body of just {"done": true}, which closes the task and keeps the last numbers.

  2. 2

    progress: null is not zero

    It means nothing has been reported, or what was reported has expired. A task at zero reports an object with current: 0.

  3. 3

    A parent's progress is derived

    With children, its own counts are ignored and aggregated is true. Never report against a parent.

  4. 4

    Completion is one-way

    It fires the notification once. Reporting afterwards still overwrites progress, but nothing completes twice.

One task, start to finish

Every operation below, in the order you would call them. Read the loop and you have the model: a write carries the counts it knows, end may change between calls, and closing takes nothing but done.

Create a space

post /spaces

The response carries the only copy of the uuid. Keep it like an API token.

Request body

title string | null optional
icon string optional
One character; an emoji reads best.

Example

Responses

201 Created

uuid string
title string | null
icon string | null

422 Icon was more than one character

error string

Create a task

post /spaces/{space_uuid}/tasks

The returned uuid is the only handle on the task. Until something reports against it the task reads as waiting for data, which looks the same as a reporter that died — so write to it when the work starts, even with nothing to count.

Path parameters

space_uuid string required

Request body

title string optional
source string optional
What is reporting, e.g. crawler.py
parent_uuid string optional
A step of an existing task. One level only.

Example

Responses

201 Created

uuid string

404 No such space

error string

422 parent_uuid is unknown, is already a child, or belongs to another space

error string

Report progress

put /tasks/{task_uuid}

Replaces the whole state. Omitting `values` clears it. Completing is one-way: it happens when `current` reaches a positive `end` or when `done` is true, sends the notification once, and later writes do not move the finish time. A body of just `{"done": true}` is the exception to the overwrite: it closes the task and keeps the last numbers reported, so a finished task still shows what it counted.

Path parameters

task_uuid string required

Request body

current number optional
A count, not a percentage.
end number optional
May change between calls. Omit it for a count with no total: `current` rises, `ratio` stays null, and the task reads as a counter rather than a bar.
values object optional
done boolean optional
Finish the task. Send it alone to keep the last numbers; send it beside a count and the usual overwrite applies.

Example

Responses

200 The task as it now stands

uuid string
space_uuid string
parent_uuid string | null
title string | null
source string | null
created_at string
finished_at string | null
duration integer | null
Seconds, set once when the task completes.
progress Progress
children Task[]
One level only. A child is always empty here.

400 values was not a flat object of numbers, strings or booleans

error string

404 No such task

error string

Report progress from a URL

get /tasks/{task_uuid}/report

The same write as PUT, reachable by anything that can only fire a URL: an uptime pinger, a webhook field in somebody else's product, a device, a cron line with a bare curl. If your client can send a request body, use PUT instead. This one is a GET that writes, so anything that follows the URL performs the write — a link unfurler in a chat app will report on your behalf. Keep it out of anywhere a machine might click it.

Path parameters

task_uuid string required
current number
A count, not a percentage.
end number
May change between calls. Omit it for a count with no total.
done boolean
Finish the task. Alone, it keeps the last numbers reported. It also finishes on its own once current reaches end.
values object
Flat extras, as values[pages]=1200. They arrive as text, since a query string carries no types.

Example

Responses

200 The task as it now stands

uuid string
space_uuid string
parent_uuid string | null
title string | null
source string | null
created_at string
finished_at string | null
duration integer | null
Seconds, set once when the task completes.
progress Progress
children Task[]
One level only. A child is always empty here.

400 values was not a flat object of numbers, strings or booleans

error string

404 No such task

error string

Read a space and every task in it

get /spaces/{space_uuid}

Returns every task by default. Tasks and their children come back in creation order, oldest first; any other order is a display decision and belongs to the client. A space that has run for months is worth paging through — see the parameters below.

Path parameters

space_uuid string required
limit integer
How many top-level tasks to return. Counts back from the newest, so a bare limit gives the recent end of the space rather than its oldest rows. Children never count against it and are never cut off.
before string
Only tasks created strictly before this instant, newest first, for walking back through history. Pass the created_at of the oldest task you hold; it round-trips exactly and is never returned again.
after string
Only tasks created strictly after this instant, oldest first, for asking what is new. Pass the created_at of the newest task you hold.
state string
Only tasks that are still running, or only those that have finished. Omit it for both. Ask for active without a limit and finished with one: a task that has run for a week is otherwise lost behind a page of things that finished since.

Example

Responses

200 The space

uuid string
title string | null
icon string | null
One character. Counted in grapheme clusters.
tasks Task[]
Top-level tasks, each with its children nested.

400 A cursor that is not a timestamp, a limit that is not a whole number, or a state that is neither active nor finished

error string

404 No such space, or the uuid is wrong

error string

Read one task and its children

get /tasks/{task_uuid}

The same shape as one entry in a space, steps nested. Cheaper to poll than the whole space when only one thing is running.

Path parameters

task_uuid string required

Example

Responses

200 The task

uuid string
space_uuid string
parent_uuid string | null
title string | null
source string | null
created_at string
finished_at string | null
duration integer | null
Seconds, set once when the task completes.
progress Progress
children Task[]
One level only. A child is always empty here.

404 No such task

error string

Health check

get /up

Checks its dependencies, so a container with a dead Redis fails it. The worker is reported too, and a dead one does not fail the check.

Example

Responses

200 Healthy

503 A dependency is down