Skip to main content

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.

MethodPathSummary
POST/v1/workflows/runner/startStart a workflow run
GET/v1/workflows/runner/runsList workflow runner runs
GET/v1/workflows/runner/runs/{run_id}/stepsRead a run with its steps
GET/v1/workflows/runner/runs/{run_id}/historyRead every attempt of every step
POST/v1/workflows/runner/runs/{run_id}/cancelCancel a run
POST/v1/workflows/runner/runs/{run_id}/resumeResume a failed or cancelled run
POST/v1/workflows/runner/agents/{agent_id}/releaseRelease an agent halted by the kill switch
GET/v1/workflows/runner/statusRead the runner's status
GET/v1/workflows/runner/dead_lettersList dead letters
GET/v1/workflows/runner/dead_letters/{dead_letter_id}Read one dead letter
POST/v1/workflows/runner/dead_letters/{dead_letter_id}/requeueRequeue a dead letter's run
POST/v1/workflows/runner/dead_letters/{dead_letter_id}/discardDiscard a dead letter
POST/v1/workflows/runner/runs/{run_id}/replayReplay a run from one step
POST/v1/workflows/runner/pins/newPin a step output as test data
GET/v1/workflows/runner/pinsList pinned test data
POST/v1/workflows/runner/pins/deleteDelete a pin

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:

NameInTypeRequiredDescription
Idempotency-Keyheaderstring or nullNo

Request body (application/json, schema StartRunRequest):

FieldTypeRequiredDescription
workflow_typestringYesWorkflow Type
inputobjectNoInput
metadataobjectNoMetadata
modeenum: "sequential", "dag"NoMode
stepsarray of StepSpecYesSteps
run_budget_usdnumber or nullNoRun Budget Usd
max_parallelintegerNoMax Parallel
deadline_secondsintegerNoDeadline Seconds
run_as_keystring or nullNoRun As Key
on_failureAlertOnFailure or WorkflowOnFailure or nullNoOn Failure
pinsobjectNoPins

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:

StatusDescriptionBody
200The new run with its planned stepsapplication/json RunWithSteps
400The request is malformed or breaks a rule named in the detailapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
404No object with that id is visible to the callerapplication/json ErrorDetail
409The workflow runner is disabled on this gatewayapplication/json ErrorDetail
422A field failed validation and the detail names itapplication/json ErrorDetail
429A rate or concurrency limit was reached, retry after Retry-After secondsapplication/json ErrorDetail
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail
503A dependency such as Lens, the queue or the database is unavailableapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
runRunViewYes
stepsarray of StepViewYesSteps

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:

StatusDescriptionBody
200The newest runs the caller may seeapplication/json RunPage
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
runsarray of RunViewYesRuns

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:

NameInTypeRequiredDescription
run_idpathstringYes

Example request:

curl -X GET "http://localhost:4000/v1/workflows/runner/runs/run_id-123/steps" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The run and each step's current stateapplication/json RunWithSteps
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
404No object with that id is visible to the callerapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
runRunViewYes
stepsarray of StepViewYesSteps

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:

NameInTypeRequiredDescription
run_idpathstringYes
include_ioquerybooleanNo

Example request:

curl -X GET "http://localhost:4000/v1/workflows/runner/runs/run_id-123/history" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200Every attempt of every step, without step content unless include_ioapplication/json RunHistory
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
404No object with that id is visible to the callerapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
run_idstringYesRun Id
io_captureenum: "full", "metadata_only"YesIo Capture
io_purged_atstring or nullYesIo Purged At
io_hold_untilstring or nullYesIo Hold Until
content_includedbooleanYesContent Included
stepsarray of StepHistoryYesSteps
replay_of_run_idstring or nullNoReplay Of Run Id
replay_from_step_keystring or nullNoReplay From Step Key
replaysarray of ReplayRefNoReplays

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:

NameInTypeRequiredDescription
run_idpathstringYes

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:

StatusDescriptionBody
200The run after the cancel was recordedapplication/json RunWithSteps
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
404No object with that id is visible to the callerapplication/json ErrorDetail
409The object already exists or is in a state that does not allow this changeapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
runRunViewYes
stepsarray of StepViewYesSteps

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:

NameInTypeRequiredDescription
run_idpathstringYes

Request body (application/json, schema ResumeRunRequest):

FieldTypeRequiredDescription
deadline_secondsintegerNoDeadline Seconds
acknowledge_compensationbooleanNoAcknowledge 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:

StatusDescriptionBody
200The run with its unfinished steps queued againapplication/json RunWithSteps
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
404No object with that id is visible to the callerapplication/json ErrorDetail
409The object already exists or is in a state that does not allow this changeapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
429A rate or concurrency limit was reached, retry after Retry-After secondsapplication/json ErrorDetail
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
runRunViewYes
stepsarray of StepViewYesSteps

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:

NameInTypeRequiredDescription
agent_idpathstringYes

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:

StatusDescriptionBody
200The agent can be called againapplication/json AgentRelease
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
404No object with that id is visible to the callerapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
agent_idstringYesAgent Id
releasedbooleanYesReleased

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:

StatusDescriptionBody
200The runner's mode, backlog, workers and halted agentsapplication/json RunnerStatus
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
enabledbooleanYesEnabled
roleenum: "embedded", "producer", "worker"YesRole
modeenum: "embedded", "queue"YesMode
running_stepsintegerYesRunning Steps
pending_stepsintegerYesPending Steps
ready_stepsintegerYesReady Steps
lease_ownersarray of stringYesLease Owners
oldest_pending_atstring or nullYesOldest Pending At
oldest_ready_atstring or nullYesOldest Ready At
workersarray of WorkerViewYesWorkers
halted_agentsarray of HaltViewYesHalted 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:

NameInTypeRequiredDescription
statequeryenum: "open", "requeued", "discarded", "all"No
workflow_typequerystring or nullNo
cursorquerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/v1/workflows/runner/dead_letters" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200One page of dead letters, newest firstapplication/json DeadLetterPage
401No valid key or Admin UI session was presentedapplication/json ErrorDetail
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
422A field failed validation and the detail names itapplication/json ErrorDetail
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
dead_lettersarray of DeadLetterViewYesDead Letters
next_cursorstring or nullYesNext 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:

NameInTypeRequiredDescription
dead_letter_idpathstringYes

Example request:

curl -X GET "http://localhost:4000/v1/workflows/runner/dead_letters/dead_letter_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The dead letter with the attempt history of its stepapplication/json DeadLetterDetail
401No valid key or Admin UI session was presentedapplication/json ErrorDetail
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
404No object with that id is visible to the callerapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
dead_letterDeadLetterViewYes
error_detailstring or nullYesError Detail
spend_usdnumberYesSpend Usd
attemptsarray of AttemptViewYesAttempts
run_ledger_urlstringYesRun 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:

NameInTypeRequiredDescription
dead_letter_idpathstringYes

Request body (application/json, schema ResumeRunRequest):

FieldTypeRequiredDescription
deadline_secondsintegerNoDeadline Seconds
acknowledge_compensationbooleanNoAcknowledge 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:

StatusDescriptionBody
200The resumed run with its stepsapplication/json RunWithSteps
401No valid key or Admin UI session was presentedapplication/json ErrorDetail
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
404No object with that id is visible to the callerapplication/json ErrorDetail
409The object already exists or is in a state that does not allow this changeapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
429A rate or concurrency limit was reached, retry after Retry-After secondsapplication/json ErrorDetail
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
runRunViewYes
stepsarray of StepViewYesSteps

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:

NameInTypeRequiredDescription
dead_letter_idpathstringYes

Request body (application/json, schema DiscardDeadLetterRequest):

FieldTypeRequiredDescription
reasonstring or nullNoReason

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:

StatusDescriptionBody
200The dead letter, now marked discardedapplication/json DeadLetterDetail
401No valid key or Admin UI session was presentedapplication/json ErrorDetail
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
404No object with that id is visible to the callerapplication/json ErrorDetail
409The object already exists or is in a state that does not allow this changeapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
dead_letterDeadLetterViewYes
error_detailstring or nullYesError Detail
spend_usdnumberYesSpend Usd
attemptsarray of AttemptViewYesAttempts
run_ledger_urlstringYesRun 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:

NameInTypeRequiredDescription
run_idpathstringYes

Request body (application/json, schema ReplayRequest):

FieldTypeRequiredDescription
from_stepstringYesFrom Step
inputsOriginalInputs or EditedInputsNoInputs
pinsobjectNoPins
run_as_keystring or nullNoRun As Key
as_original_actorbooleanNoAs Original Actor
run_budget_usdnumber or nullNoRun Budget Usd
deadline_secondsintegerNoDeadline 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:

StatusDescriptionBody
200Successful responseapplication/json ReplayResult
400The request is malformed or breaks a rule named in the detailapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ErrorDetail
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
404No object with that id is visible to the callerapplication/json ErrorDetail
409The object already exists or is in a state that does not allow this changeapplication/json ErrorDetail
422A field failed validation and the detail names itapplication/json ErrorDetail
429A rate or concurrency limit was reached, retry after Retry-After secondsapplication/json ErrorDetail
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail
503A dependency such as Lens, the queue or the database is unavailableapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
replayRunWithStepsYes
replay_of_run_idstringYesReplay Of Run Id
from_stepstringYesFrom Step
reused_stepsarray of stringYesReused Steps
pinned_stepsarray of stringYesPinned Steps
rerun_stepsarray of stringYesRerun 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):

FieldTypeRequiredDescription
workflow_typestringYesWorkflow Type
step_keystringYesStep Key
labelstring or nullNoLabel
sourcePinFromAttempt or PinLiteralYesSource

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:

StatusDescriptionBody
200Successful responseapplication/json PinView
400The request is malformed or breaks a rule named in the detailapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ErrorDetail
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
404No object with that id is visible to the callerapplication/json ErrorDetail
409The object already exists or is in a state that does not allow this changeapplication/json ErrorDetail
413The body is larger than the gateway acceptsapplication/json ErrorDetail
422A field failed validation and the detail names itapplication/json ErrorDetail
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
pin_idstringYesPin Id
workflow_typestringYesWorkflow Type
step_keystringYesStep Key
labelstring or nullYesLabel
output_charsintegerYesOutput Chars
output_digeststringYesOutput Digest
source_run_idstring or nullYesSource Run Id
source_attempt_idstring or nullYesSource Attempt Id
created_atstringYesCreated 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:

NameInTypeRequiredDescription
workflow_typequerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/v1/workflows/runner/pins" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200Successful responseapplication/json PinPage
401No valid key or Admin UI session was presentedapplication/json ErrorDetail
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
pinsarray of PinViewYesPins

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):

FieldTypeRequiredDescription
pin_idstringYesPin 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:

StatusDescriptionBody
200Successful responseapplication/json PinDeleted
401No valid key or Admin UI session was presentedapplication/json ErrorDetail
403The key's role, grants or license do not allow this actionapplication/json ErrorDetail
404No object with that id is visible to the callerapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway hit an internal error, usually the database is not connectedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
pin_idstringYesPin Id
deletedbooleanYesDeleted