Skip to content

REST API Reference

Start the server with remanufacture serve. All endpoints are prefixed with /v1.

Authentication

When API_KEY is configured, include the key in every request (except health check):

X-API-Key: your-secret-key

Requests without a valid key return 403 Forbidden.


GET /v1/health

Liveness check. No authentication required.

Response 200:

{ "status": "ok" }

GET /v1/pipelines

Lists all available pipeline names.

Response 200:

{ "pipelines": ["sync-python", "deploy-config"] }

Example:

curl -H "X-API-Key: $KEY" http://localhost:8080/v1/pipelines

POST /v1/pipelines/{name}/run

Triggers a pipeline run asynchronously. Returns immediately with a run_id.

Response 202:

{ "run_id": "a1b2c3d4-...", "status": "accepted" }

Error responses:

Status Condition
404 Pipeline not found
409 Pipeline already running
422 Pipeline parse error

Example:

curl -X POST -H "X-API-Key: $KEY" http://localhost:8080/v1/pipelines/sync-python/run

GET /v1/pipelines/{name}/runs/{run_id}

Returns the status and execution log of a specific run.

Response 200:

{
  "run_id": "a1b2c3d4-...",
  "pipeline_name": "sync-python",
  "status": "success",
  "started_at": "2024-01-15T10:00:00",
  "finished_at": "2024-01-15T10:00:42",
  "error": null,
  "log": "..."
}

Possible status values: accepted, running, success, failed

Error responses:

Status Condition
404 Run not found

Example:

curl -H "X-API-Key: $KEY" \
  http://localhost:8080/v1/pipelines/sync-python/runs/a1b2c3d4-...