Workflow runner API
This page documents the 16 gateway endpoints tagged workflow runner in the gateway's OpenAPI document. Every example targets a gateway on http://localhost:4000 and authenticates with the SPANWAY_API_KEY environment variable, which holds the master key or a virtual key that has access to the route. Request and response fields are taken from the schema the running gateway publishes at /openapi.json, and the same document is bundled with this site as openapi.json.
Endpoints
POST /v1/workflows/runner/start
Start a workflow run
Starts a multi-step workflow: the gateway calls each registered agent in turn (or in parallel in dag mode), passes earlier outputs into later steps and stops each step at its budget and timeout. Steps run as the caller's virtual key, or as run_as_key. Any key whose role may change workflow runs can call it, an Idempotency-Key header makes a retry return the same run, and the start is written to the audit log.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string or null | No |
Request body (application/json, schema StartRunRequest):
| Field | Type | Required | Description |
|---|---|---|---|
workflow_type | string | Yes | Workflow Type |
input | object | No | Input |
metadata | object | No | Metadata |
mode | enum: "sequential", "dag" | No | Mode |
steps | array of StepSpec | Yes | Steps |
run_budget_usd | number or null | No | Run Budget Usd |
max_parallel | integer | No | Max Parallel |
deadline_seconds | integer | No | Deadline Seconds |
run_as_key | string or null | No | Run As Key |
on_failure | AlertOnFailure or WorkflowOnFailure or null | No | On Failure |
pins | object | No | Pins |
Example request:
curl -X POST "http://localhost:4000/v1/workflows/runner/start" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workflow_type": "incident-summary",
"input": {
"service": "checkout"
},
"mode": "sequential",
"run_budget_usd": 2,
"steps": [
{
"key": "research",
"target": {
"kind": "a2a_agent",
"agent_id": "research-agent"
},
"message": "List the incidents for {{input.service}} in the last week",
"budget_usd": 1
},
{
"key": "write",
"target": {
"kind": "custom_agent",
"custom_agent_id": "writer-agent"
},
"message": "Write a short summary of: {{steps.research.output}}",
"budget_usd": 0.5
}
]
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The new run with its planned steps | application/json RunWithSteps |
| 400 | The request is malformed or breaks a rule named in the detail | application/json ErrorDetail |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 404 | No object with that id is visible to the caller | application/json ErrorDetail |
| 409 | The workflow runner is disabled on this gateway | application/json ErrorDetail |
| 422 | A field failed validation and the detail names it | application/json ErrorDetail |
| 429 | A rate or concurrency limit was reached, retry after Retry-After seconds | application/json ErrorDetail |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
| 503 | A dependency such as Lens, the queue or the database is unavailable | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
run | RunView | Yes | |
steps | array of StepView | Yes | Steps |
GET /v1/workflows/runner/runs
List workflow runner runs
Runs the caller may see, newest first. Admins see every run, everyone else the runs their keys started. Nothing changes. Docs (https://docs.spanway.ai/docs/proxy/workflow_runner)
Example request:
curl -X GET "http://localhost:4000/v1/workflows/runner/runs" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The newest runs the caller may see | application/json RunPage |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
runs | array of RunView | Yes | Runs |
GET /v1/workflows/runner/runs/{run_id}/steps
Read a run with its steps
The run and the current state of every step, with each step's attempt count, spend and status. Admins can read any run, everyone else only the runs their keys started, and nothing changes. Docs (https://docs.spanway.ai/docs/proxy/workflow_runner)
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | Yes |
Example request:
curl -X GET "http://localhost:4000/v1/workflows/runner/runs/run_id-123/steps" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The run and each step's current state | application/json RunWithSteps |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 404 | No object with that id is visible to the caller | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
run | RunView | Yes | |
steps | array of StepView | Yes | Steps |
GET /v1/workflows/runner/runs/{run_id}/history
Read every attempt of every step
Every attempt of every step of a run, with timings, cost, trace ids and errors, so an operator can see why a step was retried or failed. Admins can read any run, everyone else only their own. Step input and output are returned only with include_io and only for runs whose content was captured, and an admin reading another user's content is written to the audit log. Needs the workflow_history license feature.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | Yes | |
include_io | query | boolean | No |
Example request:
curl -X GET "http://localhost:4000/v1/workflows/runner/runs/run_id-123/history" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Every attempt of every step, without step content unless include_io | application/json RunHistory |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 404 | No object with that id is visible to the caller | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
run_id | string | Yes | Run Id |
io_capture | enum: "full", "metadata_only" | Yes | Io Capture |
io_purged_at | string or null | Yes | Io Purged At |
io_hold_until | string or null | Yes | Io Hold Until |
content_included | boolean | Yes | Content Included |
steps | array of StepHistory | Yes | Steps |
replay_of_run_id | string or null | No | Replay Of Run Id |
replay_from_step_key | string or null | No | Replay From Step Key |
replays | array of ReplayRef | No | Replays |
POST /v1/workflows/runner/runs/{run_id}/cancel
Cancel a run
Stops a running workflow: steps not started yet are cancelled and running steps are asked to stop. Only a root run can be cancelled, not a sub-workflow. The key that started the run or a proxy admin may call it, the caller's role must allow changes, and the cancel is written to the audit log.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | Yes |
Request body (application/json, object):
Example request:
curl -X POST "http://localhost:4000/v1/workflows/runner/runs/run_id-123/cancel" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The run after the cancel was recorded | application/json RunWithSteps |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 404 | No object with that id is visible to the caller | application/json ErrorDetail |
| 409 | The object already exists or is in a state that does not allow this change | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
run | RunView | Yes | |
steps | array of StepView | Yes | Steps |
POST /v1/workflows/runner/runs/{run_id}/resume
Resume a failed or cancelled run
Runs the unfinished steps of a failed or cancelled workflow again, keeping the steps that already succeeded. A run whose on_failure workflow already ran is only resumed when acknowledge_compensation is true. The key that started the run or a proxy admin may call it, and the resume is written to the audit log.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | Yes |
Request body (application/json, schema ResumeRunRequest):
| Field | Type | Required | Description |
|---|---|---|---|
deadline_seconds | integer | No | Deadline Seconds |
acknowledge_compensation | boolean | No | Acknowledge Compensation |
Example request:
curl -X POST "http://localhost:4000/v1/workflows/runner/runs/run_id-123/resume" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"deadline_seconds": 3600,
"acknowledge_compensation": false
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The run with its unfinished steps queued again | application/json RunWithSteps |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 404 | No object with that id is visible to the caller | application/json ErrorDetail |
| 409 | The object already exists or is in a state that does not allow this change | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 429 | A rate or concurrency limit was reached, retry after Retry-After seconds | application/json ErrorDetail |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
run | RunView | Yes | |
steps | array of StepView | Yes | Steps |
POST /v1/workflows/runner/agents/{agent_id}/release
Release an agent halted by the kill switch
Lets the workflow runner call an agent again after its kill switch stopped it, for example after a cost or error spike was investigated. Proxy admins only, and the release is written to the audit log.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
agent_id | path | string | Yes |
Request body (application/json, object):
Example request:
curl -X POST "http://localhost:4000/v1/workflows/runner/agents/agent_id-123/release" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The agent can be called again | application/json AgentRelease |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 404 | No object with that id is visible to the caller | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | Agent Id |
released | boolean | Yes | Released |
GET /v1/workflows/runner/status
Read the runner's status
Whether the runner is on, its role and mode, the step backlog, the workers that checked in and the agents held by the kill switch. Proxy admins and admin viewers only, and nothing changes. Docs (https://docs.spanway.ai/docs/proxy/workflow_runner#queue-mode-and-workers)
Example request:
curl -X GET "http://localhost:4000/v1/workflows/runner/status" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The runner's mode, backlog, workers and halted agents | application/json RunnerStatus |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | Enabled |
role | enum: "embedded", "producer", "worker" | Yes | Role |
mode | enum: "embedded", "queue" | Yes | Mode |
running_steps | integer | Yes | Running Steps |
pending_steps | integer | Yes | Pending Steps |
ready_steps | integer | Yes | Ready Steps |
lease_owners | array of string | Yes | Lease Owners |
oldest_pending_at | string or null | Yes | Oldest Pending At |
oldest_ready_at | string or null | Yes | Oldest Ready At |
workers | array of WorkerView | Yes | Workers |
halted_agents | array of HaltView | Yes | Halted Agents |
GET /v1/workflows/runner/dead_letters
List dead letters
Lists the workflow steps that ran out of retries and stopped for good, newest first, so an operator can decide whether to run them again or let them go. Any key may call it and sees the dead letters of its own runs, and proxy admins and admin viewers see every one. It changes nothing.
state defaults to open and all lists every state, workflow_type narrows the list, and cursor takes the
next_cursor of the previous page. Entries carry ids, error codes and counts only, never step input or output.
Docs (https://docs.spanway.ai/docs/proxy/workflow_runner)
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
state | query | enum: "open", "requeued", "discarded", "all" | No | |
workflow_type | query | string or null | No | |
cursor | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/v1/workflows/runner/dead_letters" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | One page of dead letters, newest first | application/json DeadLetterPage |
| 401 | No valid key or Admin UI session was presented | application/json ErrorDetail |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 422 | A field failed validation and the detail names it | application/json ErrorDetail |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
dead_letters | array of DeadLetterView | Yes | Dead Letters |
next_cursor | string or null | Yes | Next Cursor |
GET /v1/workflows/runner/dead_letters/{dead_letter_id}
Read one dead letter
Shows one dead letter with every attempt of its step, the error the last attempt hit, what the step spent and a link to the run ledger page. Step input and output are never included. The owner of the run, proxy admins and admin viewers may read it, and it changes nothing.
Docs (https://docs.spanway.ai/docs/proxy/workflow_runner)
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
dead_letter_id | path | string | Yes |
Example request:
curl -X GET "http://localhost:4000/v1/workflows/runner/dead_letters/dead_letter_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The dead letter with the attempt history of its step | application/json DeadLetterDetail |
| 401 | No valid key or Admin UI session was presented | application/json ErrorDetail |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 404 | No object with that id is visible to the caller | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
dead_letter | DeadLetterView | Yes | |
error_detail | string or null | Yes | Error Detail |
spend_usd | number | Yes | Spend Usd |
attempts | array of AttemptView | Yes | Attempts |
run_ledger_url | string | Yes | Run Ledger Url |
POST /v1/workflows/runner/dead_letters/{dead_letter_id}/requeue
Requeue a dead letter's run
Runs the failed step again, together with the steps it held back, by resuming its workflow run, and marks the dead letter requeued. Money the run already spent still counts against its budgets. The owner of the run and proxy admins may call it, admin viewers may not. Each requeue writes an audit row.
It answers 409 when the dead letter is no longer open and 429 when the organization, team or key already has the most active workflow runs it may have.
Docs (https://docs.spanway.ai/docs/proxy/workflow_runner)
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
dead_letter_id | path | string | Yes |
Request body (application/json, schema ResumeRunRequest):
| Field | Type | Required | Description |
|---|---|---|---|
deadline_seconds | integer | No | Deadline Seconds |
acknowledge_compensation | boolean | No | Acknowledge Compensation |
Example request:
curl -X POST "http://localhost:4000/v1/workflows/runner/dead_letters/dead_letter_id-123/requeue" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"deadline_seconds": 3600,
"acknowledge_compensation": false
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The resumed run with its steps | application/json RunWithSteps |
| 401 | No valid key or Admin UI session was presented | application/json ErrorDetail |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 404 | No object with that id is visible to the caller | application/json ErrorDetail |
| 409 | The object already exists or is in a state that does not allow this change | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 429 | A rate or concurrency limit was reached, retry after Retry-After seconds | application/json ErrorDetail |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
run | RunView | Yes | |
steps | array of StepView | Yes | Steps |
POST /v1/workflows/runner/dead_letters/{dead_letter_id}/discard
Discard a dead letter
Marks a dead letter as handled without running anything again, for a step nobody needs any more. The owner of the run and proxy admins may call it, admin viewers may not. It writes an audit row that keeps the optional reason, and answers 409 when the dead letter is no longer open.
Docs (https://docs.spanway.ai/docs/proxy/workflow_runner)
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
dead_letter_id | path | string | Yes |
Request body (application/json, schema DiscardDeadLetterRequest):
| Field | Type | Required | Description |
|---|---|---|---|
reason | string or null | No | Reason |
Example request:
curl -X POST "http://localhost:4000/v1/workflows/runner/dead_letters/dead_letter_id-123/discard" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "The agent was replaced"
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The dead letter, now marked discarded | application/json DeadLetterDetail |
| 401 | No valid key or Admin UI session was presented | application/json ErrorDetail |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 404 | No object with that id is visible to the caller | application/json ErrorDetail |
| 409 | The object already exists or is in a state that does not allow this change | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
dead_letter | DeadLetterView | Yes | |
error_detail | string or null | Yes | Error Detail |
spend_usd | number | Yes | Spend Usd |
attempts | array of AttemptView | Yes | Attempts |
run_ledger_url | string | Yes | Run Ledger Url |
POST /v1/workflows/runner/runs/{run_id}/replay
Replay a run from one step
Re-run a stopped run from one step as a new linked run. Steps before it reuse their original output, the step and everything after it run again as the caller's key, and the original run is left as it was.
Use it to retry the end of a workflow after fixing a prompt or an agent, without paying again for the steps
that already worked. Anyone who may write workflows and can see the run may replay it; replaying as the run's
original key (as_original_actor) is for proxy admins only. Pins can replace a step's output with saved test
data. The replay is recorded in the audit log against the original run. A run that is still going, or whose
inputs were purged, answers 409, and an unknown step or a plan that no longer validates answers 422.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | Yes |
Request body (application/json, schema ReplayRequest):
| Field | Type | Required | Description |
|---|---|---|---|
from_step | string | Yes | From Step |
inputs | OriginalInputs or EditedInputs | No | Inputs |
pins | object | No | Pins |
run_as_key | string or null | No | Run As Key |
as_original_actor | boolean | No | As Original Actor |
run_budget_usd | number or null | No | Run Budget Usd |
deadline_seconds | integer | No | Deadline Seconds |
Example request:
curl -X POST "http://localhost:4000/v1/workflows/runner/runs/run_id-123/replay" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from_step": "write"
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Successful response | application/json ReplayResult |
| 400 | The request is malformed or breaks a rule named in the detail | application/json ErrorDetail |
| 401 | No valid key or Admin UI session was presented | application/json ErrorDetail |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 404 | No object with that id is visible to the caller | application/json ErrorDetail |
| 409 | The object already exists or is in a state that does not allow this change | application/json ErrorDetail |
| 422 | A field failed validation and the detail names it | application/json ErrorDetail |
| 429 | A rate or concurrency limit was reached, retry after Retry-After seconds | application/json ErrorDetail |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
| 503 | A dependency such as Lens, the queue or the database is unavailable | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
replay | RunWithSteps | Yes | |
replay_of_run_id | string | Yes | Replay Of Run Id |
from_step | string | Yes | From Step |
reused_steps | array of string | Yes | Reused Steps |
pinned_steps | array of string | Yes | Pinned Steps |
rerun_steps | array of string | Yes | Rerun Steps |
POST /v1/workflows/runner/pins/new
Pin a step output as test data
Save a step output as pinned test data, either from an attempt of your own run whose output was kept or as literal text. A pin from an attempt must name that attempt's workflow type and step. A key whose data policy requires zero data retention cannot create pins, and a dashboard session can only pin an attempt's output.
Pins let you replay a workflow with a known answer for one step, so a test run is repeatable and cheap. Anyone who may write workflows can create one. The text is checked for secrets, which are redacted, and stored encrypted, and an audit log entry is written. A gateway without a salt key or master key, or a key whose capture settings do not keep content, answers 409.
Request body (application/json, schema NewPinRequest):
| Field | Type | Required | Description |
|---|---|---|---|
workflow_type | string | Yes | Workflow Type |
step_key | string | Yes | Step Key |
label | string or null | No | Label |
source | PinFromAttempt or PinLiteral | Yes | Source |
Example request:
curl -X POST "http://localhost:4000/v1/workflows/runner/pins/new" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workflow_type": "triage",
"step_key": "research",
"source": {
"kind": "attempt",
"attempt_id": "att_01J..."
}
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Successful response | application/json PinView |
| 400 | The request is malformed or breaks a rule named in the detail | application/json ErrorDetail |
| 401 | No valid key or Admin UI session was presented | application/json ErrorDetail |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 404 | No object with that id is visible to the caller | application/json ErrorDetail |
| 409 | The object already exists or is in a state that does not allow this change | application/json ErrorDetail |
| 413 | The body is larger than the gateway accepts | application/json ErrorDetail |
| 422 | A field failed validation and the detail names it | application/json ErrorDetail |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
pin_id | string | Yes | Pin Id |
workflow_type | string | Yes | Workflow Type |
step_key | string | Yes | Step Key |
label | string or null | Yes | Label |
output_chars | integer | Yes | Output Chars |
output_digest | string | Yes | Output Digest |
source_run_id | string or null | Yes | Source Run Id |
source_attempt_id | string or null | Yes | Source Attempt Id |
created_at | string | Yes | Created At |
GET /v1/workflows/runner/pins
List pinned test data
Lists your pinned test data, newest first, so you can pick a pin for a replay. Only the label, size and
digest are shown, never the pinned text. Filter with workflow_type. Anyone who may read workflows can call
it and sees their own pins, while proxy admins and admin viewers see every pin. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflow_type | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/v1/workflows/runner/pins" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Successful response | application/json PinPage |
| 401 | No valid key or Admin UI session was presented | application/json ErrorDetail |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
pins | array of PinView | Yes | Pins |
POST /v1/workflows/runner/pins/delete
Delete a pin
Removes pinned test data you no longer need. Anyone who may write workflows can delete a pin they own, and
a proxy admin can delete any pin. The deletion is recorded in the audit log. A pin that does not exist or that
you do not own answers 404, and deleted is false when the pin was already gone.
Request body (application/json, schema DeletePinRequest):
| Field | Type | Required | Description |
|---|---|---|---|
pin_id | string | Yes | Pin Id |
Example request:
curl -X POST "http://localhost:4000/v1/workflows/runner/pins/delete" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"pin_id": "pin_01J..."
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | Successful response | application/json PinDeleted |
| 401 | No valid key or Admin UI session was presented | application/json ErrorDetail |
| 403 | The key's role, grants or license do not allow this action | application/json ErrorDetail |
| 404 | No object with that id is visible to the caller | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway hit an internal error, usually the database is not connected | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
pin_id | string | Yes | Pin Id |
deleted | boolean | Yes | Deleted |