foliot docs

API reference / Tasks / Complete a task out of band

Complete a task out of band

POST/apps/{appId}/tasks/{token}/complete

For a step you answered with 202, or claimed from a queue. The token resolves exactly once; a replay, or a token from before a redrive, is a conflict rather than a second completion. The body is closed: a key the server does not know is a 400, not ignored. An output over the per-step size cap, or a next that names no step, is a 400 carrying the same message the run records, and unlike other 400s it is not a no-op: the step has already failed (its onFailure runs), and the token is spent.

Path parameters

appId
string
REQUIRED

The app's name.

token
string (uuid)
REQUIRED

Request body

next
string
OPTIONAL

Override the definition's next step. Must name a real step or a sentinel.

max length 100

output
any
OPTIONAL

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.
404 Error No such resource.
409 Error Conflicts with existing state.
503 Error A dependency this route needs is unreachable.