foliot docs

API reference / Workflows / Register a workflow version

Register a workflow version

PUT/apps/{appId}/workflows

Authenticate with an operator token or an app API key or a signed-in Foliot Console session.

Idempotent for an identical definition. Re-registering the same version with a DIFFERENT shape is a conflict: runs already pinned to that version would silently change behaviour. Descriptions are ignored in the comparison, so rewording prose is not a conflict.

Path parameters

appId
string
REQUIRED

The app's name.

Request body

description
string
OPTIONAL

max length 1000

name
string
REQUIRED

min length 1 · max length 100 · pattern ^[a-z0-9][a-z0-9-]*$

retry
object
OPTIONAL
runTimeout
OPTIONAL
steps
object[]
REQUIRED

min 1 items · max 200 items

version
integer
REQUIRED

min 1 · max 2147483647

Responses

200 object The identical definition was already registered; it is returned unchanged.
201 object Created
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.