Automation Runs
7 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
List paginated run history#
/automations/{id}/runsTokenReturns runs for the automation ordered by `created_at` descending. Defaults: `page=1`, `limit=20`. Maximum `limit` is 100. If `spaceId` is provided it is validated against the automation's actual space.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | Automation UUID |
spaceId | Query | string | Space UUID — validated against the automation if provided |
page | Query | number | Page number (default: 1) |
limit | Query | number | Items per page (default: 20, max: 100) |
Antworten
- 200Array of automation runs
- 400spaceId does not match this automation
- 401Not authenticated
- 404Automation not found
curl -X GET "https://xapi.ambertech.cloud/api/v1/automations/{id}/runs" \
-H "Authorization: Bearer $XISUITE_TOKEN"Get run details with all steps#
/automations/{id}/runs/{runId}TokenReturns the full run record alongside all its execution steps ordered by `step_index`. Each step includes `input`, `output`, `error_message`, and timing fields. If `spaceId` is provided it is validated against the automation's actual space.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | Automation UUID |
runIdPflicht | Pfad | string | Run UUID |
spaceId | Query | string | Space UUID — validated against the automation if provided |
Antworten
- 200`{ run: IAutomationRun, steps: IAutomationRunStep[] }`
- 400spaceId does not match this automation
- 401Not authenticated
- 404Automation or run not found
curl -X GET "https://xapi.ambertech.cloud/api/v1/automations/{id}/runs/{runId}" \
-H "Authorization: Bearer $XISUITE_TOKEN"Cancel an in-progress run#
/automations/{id}/runs/{runId}/cancelTokenStops a `running` or `queued` run. Sets all `pending` and `running` steps to `cancelled` with an error message indicating who cancelled it. Returns 409 if the run is already in a terminal state (`succeeded`, `failed`, `cancelled`). `spaceId` in the body must match the automation's actual space.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | Automation UUID |
runIdPflicht | Pfad | string | Run UUID |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
spaceIdPflicht | string | Space ID the automation belongs to |
Antworten
- 200`{ runId }` of the cancelled run
- 400spaceId required or does not match this automation
- 401Not authenticated
- 403Insufficient space permissions
- 404Automation or run not found
- 409Run is already in a terminal state
curl -X POST "https://xapi.ambertech.cloud/api/v1/automations/{id}/runs/{runId}/cancel" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"spaceId":"…"}'Retry a failed run with the same payload#
/automations/{id}/runs/{runId}/retryTokenCreates a new run using the same `trigger_payload` and `automation_version_id` as the original run. Seeds the first actionable step nodes (non-trigger nodes with no incoming edges) as `pending`. Returns 201 with the new `runId`. `spaceId` in the body must match the automation's actual space.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | Automation UUID |
runIdPflicht | Pfad | string | Original run UUID to retry |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
spaceIdPflicht | string | Space ID the automation belongs to |
Antworten
- 201`{ runId }` of the newly created retry run
- 400spaceId required or does not match this automation
- 401Not authenticated
- 403Insufficient space permissions
- 404Automation or original run not found
- 500Failed to create retry run
curl -X POST "https://xapi.ambertech.cloud/api/v1/automations/{id}/runs/{runId}/retry" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"spaceId":"…"}'Continue a paused step (resume from debug breakpoint)#
/automations/{id}/runs/{runId}/steps/{stepId}/continueTokenResets a `paused` step back to `pending` so the worker executes it on the next cycle. Also re-opens the parent run if it is not already `running`.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | Automation UUID |
runIdPflicht | Pfad | string | Run UUID |
stepIdPflicht | Pfad | string | Step UUID |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
spaceIdPflicht | string (uuid) | – |
Antworten
- 200Step resumed — status set to pending
- 400Step is not paused or spaceId mismatch
- 404Step not found
curl -X POST "https://xapi.ambertech.cloud/api/v1/automations/{id}/runs/{runId}/steps/{stepId}/continue" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"spaceId":"…"}'Replay a failed step#
/automations/{id}/runs/{runId}/steps/{stepId}/replayTokenResets a `failed` step back to `pending` so the worker picks it up on the next cycle. Optionally accepts a custom `payload` to replace the step input. Re-opens the parent run if it is in a terminal state.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | Automation UUID |
runIdPflicht | Pfad | string | Run UUID |
stepIdPflicht | Pfad | string | Step UUID |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
spaceIdPflicht | string (uuid) | – |
payload | any | Optional custom input to replace the step input |
Antworten
- 200Step reset to pending
- 400Step is not in failed state or spaceId mismatch
- 404Step not found
curl -X POST "https://xapi.ambertech.cloud/api/v1/automations/{id}/runs/{runId}/steps/{stepId}/replay" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"spaceId":"…"}'Stream live run status via Server-Sent Events#
/automations/{id}/runs/{runId}/streamTokenParameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | Automation UUID |
runIdPflicht | Pfad | string | Run UUID |
Antworten
- 200OK
curl -X GET "https://xapi.ambertech.cloud/api/v1/automations/{id}/runs/{runId}/stream" \
-H "Authorization: Bearer $XISUITE_TOKEN"