API & protocols
Pipeline API
Create, inspect, cancel, append to, and resume workflows.
On this page
POST /pipelinesPOST /pipelines/idempotentPOST /pipelines/by-idempotency-keyGET /pipelines/{pipelineId}POST /pipelines/{pipelineId}/cancelPOST /pipelines/{pipelineId}/stagesPOST /stages/{stageId}/resumeGET /versionPOST /logsBase URL: your SDK-facing API, locally http://localhost:8081. Read authentication and conventions first. Download OpenAPI 3.0 for the full machine-readable contract.
For a new integration, start with idempotent creation, then look up an uncertain outcome. The legacy create endpoint below is retained for compatibility, not recommended for retries of an uncertain submission.
For a complete request example, use Create a run with a stable key. Return here to look up each endpoint's authentication, schema and responses.
POST /pipelines
Create a pipeline using the legacy non-idempotent contract
Preserved for existing SDK clients. Each successful request creates a
new pipeline, even when the payload is identical. New integrations that
must safely retry an unknown HTTP outcome should use
/pipelines/idempotent.
Authentication: application key in the request body's apiKey field. This legacy route does not use the X-API-Key header for authentication.
Request body
Required.
Content type: application/json. LegacyPipelineCreateRequest
$ref: "#/components/schemas/LegacyPipelineCreateRequest"Responses
| Status | Meaning | Schema |
|---|---|---|
200 | Pipeline created | PipelineResponse |
400 | Invalid request | ProblemDetails |
401 | Invalid API key in the request body | — |
500 | Pipeline creation failed | — |
POST /pipelines/idempotent
Atomically create or resolve a pipeline by idempotency key
The key is scoped to the application authenticated by X-API-Key and
is retained for the lifetime of the pipeline. Sequential and concurrent
requests with the same key and the same creation intent return the same
pipeline ID. Tracing metadata may change between retries. Reusing the
key for a different creation intent returns 409.
Authentication: X-API-Key header (application key).
Request body
Required.
Content type: application/json. IdempotentPipelineCreateRequest
$ref: "#/components/schemas/IdempotentPipelineCreateRequest"Responses
| Status | Meaning | Schema |
|---|---|---|
200 | The existing pipeline for this application and key was returned | IdempotentPipelineCreateResponse |
201 | A new pipeline was created | IdempotentPipelineCreateResponse |
400 | Validation error | ProblemDetails |
401 | Missing or invalid X-API-Key header | ProblemDetails |
409 | The key was already used for a different creation intent | ProblemDetails |
500 | Pipeline creation failed | ProblemDetails |
POST /pipelines/by-idempotency-key
Find a pipeline by its application-scoped idempotency key
Uses a request body so the idempotency key is not placed in the URL or routine access logs.
Authentication: X-API-Key header (application key).
Request body
Required.
Content type: application/json. PipelineIdempotencyLookupRequest
$ref: "#/components/schemas/PipelineIdempotencyLookupRequest"Responses
| Status | Meaning | Schema |
|---|---|---|
200 | Pipeline status and stage details | PipelineResponse |
400 | Validation error | ProblemDetails |
401 | Missing or invalid X-API-Key header | ProblemDetails |
404 | No pipeline exists for this application and key | ProblemDetails |
GET /pipelines/{pipelineId}
Get pipeline status and stage execution details
Authentication: X-API-Key header (application key).
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
pipelineId | path | Yes | integer | Pipeline ID (> 0) |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | Pipeline status and stage details | PipelineResponse |
400 | Invalid pipeline ID | ProblemDetails |
401 | Invalid API key | ProblemDetails |
403 | Pipeline belongs to another application | ProblemDetails |
404 | Pipeline not found | — |
POST /pipelines/{pipelineId}/cancel
Cancel a non-terminal pipeline
Atomically marks the authenticated application's pipeline and its unfinished stages as cancelled. Cancellation of an already-running handler is cooperative; stale results are fenced by execution metadata.
Authentication: X-API-Key header (application key).
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
pipelineId | path | Yes | integer | Pipeline ID (> 0) |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | Pipeline cancelled | PipelineResponse |
400 | Invalid pipeline ID | — |
401 | Invalid API key | — |
404 | Pipeline not found for this application | — |
409 | Pipeline is already terminal and cannot be cancelled | — |
504 | Cancellation timed out | — |
POST /pipelines/{pipelineId}/stages
Append stages to an existing pipeline
Authentication: X-API-Key header (application key).
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
pipelineId | path | Yes | integer | Pipeline ID (> 0) |
Request body
Required.
Content type: application/json. AppendStagesRequest
$ref: "#/components/schemas/AppendStagesRequest"Responses
| Status | Meaning | Schema |
|---|---|---|
200 | Stages appended | AppendStagesResponse |
400 | Validation error | ProblemDetails |
404 | Pipeline not found | ProblemDetails |
409 | Pipeline is terminal, append is not allowed | ProblemDetails |
POST /stages/{stageId}/resume
Resume a stage waiting for external approval
Authentication: X-API-Key header (application key).
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
stageId | path | Yes | integer | Stage ID (> 0) |
Request body
Required.
Content type: application/json. ResumeStageRequest
$ref: "#/components/schemas/ResumeStageRequest"Responses
| Status | Meaning | Schema |
|---|---|---|
204 | Stage resumed | — |
400 | Validation error | ProblemDetails |
404 | Stage not found | ProblemDetails |
409 | Stage not waiting for approval or conflicting repeated decision | ProblemDetails |
GET /version
Server version and licence tier
Authentication: none. This endpoint returns public build and licence-tier metadata.
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | Build metadata | VersionInfo |
POST /logs
Record a legacy free-form log line
Legacy log ingestion. This handler does not authenticate request headers. An optional body apiKey associates the log with an application when its hash matches a non-disabled key. Missing or unmatched keys still permit an unscoped log; this lookup does not check key expiry. It does not return 401 for key validation. Prefer stage-result logs or worker events for worker integrations.
Authentication: none. An optional body apiKey attributes the log; it is not an authentication requirement. See the limitations above before exposing this legacy endpoint.
Request body
Required.
Content type: application/json. LogRequest
$ref: "#/components/schemas/LogRequest"Responses
| Status | Meaning | Schema |
|---|---|---|
200 | Log line stored | LogResponse |
400 | Malformed body | — |
500 | Log or keywords could not be stored | — |