Update a workflow
PUT/workflows/definitions/:id
Pushes a new version of the definition. The body can be the bare definition or { definition, mode }, where mode controls versioning:
auto(default): overwrites the latest revision, unless an active alias points at it, in which case a new revision is created. Safe by default: you never rewrite something that is live.new-revision: always create a new revision.overwrite: always rewrite the latest revision.
If the {id} in the URL is a key that doesn't exist yet, the workflow is created instead and the response is 201: PUT doubles as an upsert, so a git repository of definitions can push them without knowing which ones already exist.
Request
Responses
- 200
- 201
- 4XX
- 5XX
The definition was updated. mode says whether the latest revision was overwritten or a new one created.
No workflow matched the key, so one was created (upsert).
Client error. The body says what went wrong: an error type, a human-readable detail, and, on validation failures, one entry per offending field.
Unexpected server error.