Query execution state, stream progress, and apply supported controls.
Use execution routes as the authoritative view of workflow progress. Provider state can lag or contain unrelated drift; Alfred's execution and stage records describe what the workflow has accepted and completed.
curl --fail-with-body --silent --show-error \
"$ALFRED_API_URL/v1/executions?limit=20" \
-H "Authorization: Bearer $ALFRED_API_KEY" | jqFilter by workflow, status, or principal:
curl --fail-with-body --silent --show-error \
"$ALFRED_API_URL/v1/executions?workflow=add-certificate&status=failed" \
-H "Authorization: Bearer $ALFRED_API_KEY" | jqlimit defaults to 50 and must be between 1 and 100.
curl --fail-with-body --silent --show-error \
"$ALFRED_API_URL/v1/executions/$EXECUTION_ID" \
-H "Authorization: Bearer $ALFRED_API_KEY" | jqCheck these fields in order:
status for the overall outcome.currentStage for the active or failed boundary.stages[].status for completed work.stages[].outputJson for durable results and mutation receipts.stages[].errorJson for failure context.curl -N --fail-with-body \
"$ALFRED_API_URL/v1/executions/$EXECUTION_ID/events" \
-H "Accept: text/event-stream" \
-H "Authorization: Bearer $ALFRED_API_KEY"Reconnect with the last received event ID to request replay:
curl -N --fail-with-body \
"$ALFRED_API_URL/v1/executions/$EXECUTION_ID/events" \
-H "Accept: text/event-stream" \
-H "Last-Event-ID: $LAST_EVENT_ID" \
-H "Authorization: Bearer $ALFRED_API_KEY"Cancel an eligible non-terminal execution:
curl --fail-with-body --silent --show-error \
-X POST "$ALFRED_API_URL/v1/executions/$EXECUTION_ID/cancel" \
-H "Authorization: Bearer $ALFRED_API_KEY" | jqQueued commands are canceled before starting. When a Workflow SDK run exists,
Alfred sends cancellation to that run and updates the execution projection.
An add-subdomain execution stops being cancelable after Route53 accepts its
change. Terminal and otherwise ineligible executions return 409 execution_not_cancelable.
Use the generic resume control for a paused run that still owns its active
command lane, or for a failed or canceled update-lambda-version execution:
curl --fail-with-body --silent --show-error \
-X POST "$ALFRED_API_URL/v1/executions/$EXECUTION_ID/resume" \
-H "Authorization: Bearer $ALFRED_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' | jqAlfred does not expose manual pause. Workflow-owned approval waits remain
durable and normally continue through their specific approval route. For
example, approve an add-subdomain replacement through
POST /v1/executions/{id}/subdomain-plan/approve, not the generic resume route.
For a failed or canceled update-lambda-version execution, the resume endpoint
validates the persisted input and queues unfinished work on the existing
execution. A newly queued retry returns status: retry_queued; repeating the
request while it is pending returns status: retry_already_queued. Other
failed or canceled workflows return 409 execution_not_resumable; recover
them through Slack or, where supported, by re-submitting the same logical
workflow request.
Rolled-back executions and otherwise ineligible states return 409. See
Recover Workflows before retrying or rolling
back provider work.
| Status | Meaning |
|---|---|
202 | Control accepted. Continue monitoring the execution. |
404 | Execution does not exist. |
409 | Current execution state does not allow the control. |
501 | The required controls, retry infrastructure, or Workflow SDK implementation is unavailable. |