Workflows
18 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
List workflows for the org#
GET
/workflowsTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
spaceId | Query | string | – |
isArchived | Query | string | – |
isDraft | Query | string | – |
Antworten
- 200Workflows returned
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/workflows" \
-H "Authorization: Bearer $XISUITE_TOKEN"Create an empty workflow#
POST
/workflowsTokenRequest-Body
| Name | Typ | Beschreibung |
|---|---|---|
namePflicht | string | |
description | string | – |
space_id | object | Space ID (null = org-level) |
initial_status_id | object | Initial status node ID |
Antworten
- 201Workflow created
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/workflows" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Software Dev Workflow"}'Discard a pending workflow draft (FK cascade clears canvas).#
DELETE
/workflows/{draftId}/draftTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
draftIdPflicht | Pfad | string | – |
Antworten
- 200Draft discarded.
- 400Target is not a draft workflow.
Beispiel (cURL)
curl -X DELETE "https://xapi.ambertech.cloud/api/v1/workflows/{draftId}/draft" \
-H "Authorization: Bearer $XISUITE_TOKEN"Publish a draft over its parent via publish_workflow_atomic (atomic task migration + canvas swap).#
POST
/workflows/{draftId}/publishTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
draftIdPflicht | Pfad | string | – |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
migration_map | object | Map of orphan status_id → target status_id (both UUID). Required only when the draft removes any status the parent currently uses. |
Antworten
- 200Draft published; returns parent detail + migration counts.
- 404Draft already published or discarded by another admin (DRAFT_ALREADY_PUBLISHED).
- 409Missing migration mapping for one or more orphan statuses — payload carries orphan_statuses_missing.
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/workflows/{draftId}/publish" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"migration_map":{}}'READ-ONLY diff of a draft vs its parent: orphan statuses, affected tasks, suggested mappings.#
GET
/workflows/{draftId}/publish-previewTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
draftIdPflicht | Pfad | string | – |
Antworten
- 200Preview returned.
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/workflows/{draftId}/publish-preview" \
-H "Authorization: Bearer $XISUITE_TOKEN"Get a workflow with full canvas detail#
GET
/workflows/{id}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Antworten
- 200Workflow detail returned
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/workflows/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN"Update workflow name/description/archive state#
PUT
/workflows/{id}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
name | string | – |
description | string | – |
is_archived | boolean | – |
Antworten
- 200Workflow updated
Beispiel (cURL)
curl -X PUT "https://xapi.ambertech.cloud/api/v1/workflows/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"…","description":"…","is_archived":true}'Archive a workflow (blocked if is_active=true)#
DELETE
/workflows/{id}TokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Antworten
- 200Workflow archived
Beispiel (cURL)
curl -X DELETE "https://xapi.ambertech.cloud/api/v1/workflows/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN"Save the full canvas atomically via upsert_workflow_canvas#
POST
/workflows/{id}/canvasTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
versionPflicht | number | Expected workflow version for optimistic concurrency |
initial_status_id | object | – |
layout | object | – |
nodesPflicht | CanvasNodeDto[] | – |
transitionsPflicht | CanvasTransitionDto[] | – |
transition_sourcesPflicht | CanvasTransitionSourceDto[] | – |
decision_branchesPflicht | CanvasDecisionBranchDto[] | – |
Antworten
- 200Canvas saved; returns the updated workflow detail
- 409Version mismatch or workflow is active/archived
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/workflows/{id}/canvas" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"version":0,"nodes":[],"transitions":[],"transition_sources":[],"decision_branches":[]}'Create a draft of an active workflow (idempotent on 23505).#
POST
/workflows/{id}/draftTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Antworten
- 201Draft created or — on a one-draft-per-parent race — existing draft returned.
- 409Parent is archived or itself a draft; only active non-draft workflows can be edited as drafts.
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/workflows/{id}/draft" \
-H "Authorization: Bearer $XISUITE_TOKEN"Duplicate a workflow with a new name#
POST
/workflows/{id}/duplicateTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
new_namePflicht | string |
Antworten
- 201Workflow duplicated
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/workflows/{id}/duplicate" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"new_name":"Copy of Software Dev Workflow"}'Export a workflow as portable, id-free JSON#
GET
/workflows/{id}/exportTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Antworten
- 200Workflow export document
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/workflows/{id}/export" \
-H "Authorization: Bearer $XISUITE_TOKEN"GET /workflows/{id}/health#
GET
/workflows/{id}/healthTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Antworten
- 200OK
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/workflows/{id}/health" \
-H "Authorization: Bearer $XISUITE_TOKEN"POST /workflows/{id}/recheck-health#
POST
/workflows/{id}/recheck-healthTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | – |
Antworten
- 201Erstellt
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/workflows/{id}/recheck-health" \
-H "Authorization: Bearer $XISUITE_TOKEN"Build a workflow from a space’s legacy status transitions#
POST
/workflows/from-statusesTokenRequest-Body
| Name | Typ | Beschreibung |
|---|---|---|
space_idPflicht | string | Space whose task_status_transitions seed the workflow |
namePflicht | string | Name for the generated workflow |
Antworten
- 201Erstellt
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/workflows/from-statuses" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"space_id":"…","name":"…"}'Import a workflow from an export document#
POST
/workflows/importTokenRequest-Body
| Name | Typ | Beschreibung |
|---|---|---|
docPflicht | object | The workflow export document |
resolutionPflicht | object | Resolution choices (name, scope, auto-create, mappings) |
Antworten
- 409Name collision in target scope
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/workflows/import" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"doc":{},"resolution":{}}'Dry-run an import; returns the resolution report#
POST
/workflows/import/dry-runTokenRequest-Body
| Name | Typ | Beschreibung |
|---|---|---|
docPflicht | object | The workflow export document |
space_id | object | Target space id (null = org-level) |
Antworten
- 201Erstellt
Beispiel (cURL)
curl -X POST "https://xapi.ambertech.cloud/api/v1/workflows/import/dry-run" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"doc":{}}'List recent workflow trigger events for the org#
GET
/workflows/trigger-eventsTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
workflowId | Query | string | Scope the feed to a single workflow (published workflow id) |
Antworten
- 200Trigger events returned
Beispiel (cURL)
curl -X GET "https://xapi.ambertech.cloud/api/v1/workflows/trigger-events" \
-H "Authorization: Bearer $XISUITE_TOKEN"