Skip to main content

Pipelines

List pipelines

GET
/pipelines
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/pipelines"
{
  "$schema": "/api/v1/schemas/ListPipelinesOutputBody.json",
  "pipelines": [
    {
      "$schema": "/api/v1/schemas/PipelineDTO.json",
      "created_at": "2019-08-24T14:15:22Z",
      "description": "string",
      "name": "string",
      "pipeline_id": "string",
      "project_id": "string",
      "steps": [
        {
          "$schema": "/api/v1/schemas/PipelineStep.json",
          "slug": "string",
          "title": "string"
        }
      ],
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Create a pipeline

POST
/pipelines
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/pipelines" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "$schema": "/api/v1/schemas/PipelineDTO.json",
  "created_at": "2019-08-24T14:15:22Z",
  "description": "string",
  "name": "string",
  "pipeline_id": "string",
  "project_id": "string",
  "steps": [
    {
      "$schema": "/api/v1/schemas/PipelineStep.json",
      "slug": "string",
      "title": "string"
    }
  ],
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Get a pipeline

GET
/pipelines/{pipelineId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

pipelineId*string

Pipeline UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/pipelines/string"
{
  "$schema": "/api/v1/schemas/PipelineDTO.json",
  "created_at": "2019-08-24T14:15:22Z",
  "description": "string",
  "name": "string",
  "pipeline_id": "string",
  "project_id": "string",
  "steps": [
    {
      "$schema": "/api/v1/schemas/PipelineStep.json",
      "slug": "string",
      "title": "string"
    }
  ],
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Delete a pipeline

DELETE
/pipelines/{pipelineId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

pipelineId*string

Pipeline UUID

Response Body

application/problem+json

curl -X DELETE "https://loading/api/v1/pipelines/string"
Empty
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Update a pipeline

PUT
/pipelines/{pipelineId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

pipelineId*string

Pipeline UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X PUT "https://loading/api/v1/pipelines/string" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "$schema": "/api/v1/schemas/PipelineDTO.json",
  "created_at": "2019-08-24T14:15:22Z",
  "description": "string",
  "name": "string",
  "pipeline_id": "string",
  "project_id": "string",
  "steps": [
    {
      "$schema": "/api/v1/schemas/PipelineStep.json",
      "slug": "string",
      "title": "string"
    }
  ],
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Start a pipeline run (async)

POST
/pipelines/{pipelineId}/run
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

pipelineId*string

Pipeline UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/pipelines/string/run" \  -H "Content-Type: application/json" \  -d '{}'
{
  "$schema": "/api/v1/schemas/PipelineRun.json",
  "completed": true,
  "created_at": "2019-08-24T14:15:22Z",
  "error": "string",
  "final_findings": null,
  "pipeline_id": "string",
  "run_id": "string",
  "status": "string",
  "steps": [
    {
      "cost_usd": 0.1,
      "error": "string",
      "findings": null,
      "slug": "string",
      "summary": "string",
      "title": "string"
    }
  ],
  "total_cost_usd": 0.1,
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

List recent runs for a pipeline

GET
/pipelines/{pipelineId}/runs
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

pipelineId*string

Pipeline UUID

Query Parameters

limit?integer

Max runs to return (default 25)

Formatint64

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/pipelines/string/runs"
{
  "$schema": "/api/v1/schemas/ListRunsOutputBody.json",
  "runs": [
    {
      "$schema": "/api/v1/schemas/PipelineRun.json",
      "completed": true,
      "created_at": "2019-08-24T14:15:22Z",
      "error": "string",
      "final_findings": null,
      "pipeline_id": "string",
      "run_id": "string",
      "status": "string",
      "steps": [
        {
          "cost_usd": 0.1,
          "error": "string",
          "findings": null,
          "slug": "string",
          "summary": "string",
          "title": "string"
        }
      ],
      "total_cost_usd": 0.1,
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Get a pipeline run (poll for status + results)

GET
/pipelines/{pipelineId}/runs/{runId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

pipelineId*string

Pipeline UUID

runId*string

Run UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/pipelines/string/runs/string"
{
  "$schema": "/api/v1/schemas/PipelineRun.json",
  "completed": true,
  "created_at": "2019-08-24T14:15:22Z",
  "error": "string",
  "final_findings": null,
  "pipeline_id": "string",
  "run_id": "string",
  "status": "string",
  "steps": [
    {
      "cost_usd": 0.1,
      "error": "string",
      "findings": null,
      "slug": "string",
      "summary": "string",
      "title": "string"
    }
  ],
  "total_cost_usd": 0.1,
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Append a step to a pipeline

POST
/pipelines/{pipelineId}/steps
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

pipelineId*string

Pipeline UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/pipelines/string/steps" \  -H "Content-Type: application/json" \  -d '{    "slug": "string"  }'
{
  "$schema": "/api/v1/schemas/PipelineDTO.json",
  "created_at": "2019-08-24T14:15:22Z",
  "description": "string",
  "name": "string",
  "pipeline_id": "string",
  "project_id": "string",
  "steps": [
    {
      "$schema": "/api/v1/schemas/PipelineStep.json",
      "slug": "string",
      "title": "string"
    }
  ],
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}