Haystack / deepset Pipelines API

Create, list, deploy, and undeploy Haystack pipelines.

OpenAPI Specification

haystack-ai-pipelines-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: deepset Cloud API (deepset AI Platform) Files Pipelines API
  description: Hosted REST API for the deepset AI Platform (deepset Cloud), the commercial product built on the open-source Haystack framework. The API lets you manage workspaces, create and deploy Haystack pipelines, upload and index files, and run searches against deployed pipelines. All resource endpoints are prefixed with /api/v1 and authenticated with a Bearer API key generated in the platform UI. The open-source Haystack framework itself is a Python library, not a hosted REST API; this specification models only the documented deepset Cloud REST endpoints.
  termsOfService: https://www.deepset.ai/terms-of-service
  contact:
    name: deepset Support
    url: https://docs.cloud.deepset.ai
  version: '1.0'
servers:
- url: https://api.cloud.deepset.ai
  description: European deployment
- url: https://api.us.deepset.ai
  description: US deployment
security:
- bearerAuth: []
tags:
- name: Pipelines
  description: Create, list, deploy, and undeploy Haystack pipelines.
paths:
  /api/v1/workspaces/{workspace_name}/pipelines:
    get:
      operationId: listPipelines
      tags:
      - Pipelines
      summary: List pipelines
      parameters:
      - $ref: '#/components/parameters/WorkspaceName'
      - name: limit
        in: query
        schema:
          type: integer
      - name: page_number
        in: query
        schema:
          type: integer
      responses:
        '200':
          description: A paginated list of pipelines.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineList'
    post:
      operationId: createPipeline
      tags:
      - Pipelines
      summary: Create a pipeline
      description: Creates a pipeline in the workspace from a Haystack pipeline YAML definition supplied as the binary request body.
      parameters:
      - $ref: '#/components/parameters/WorkspaceName'
      requestBody:
        required: true
        content:
          application/x-yaml:
            schema:
              type: string
              format: binary
      responses:
        '201':
          description: The created pipeline.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
  /api/v1/workspaces/{workspace_name}/pipelines/{pipeline_name}:
    get:
      operationId: getPipeline
      tags:
      - Pipelines
      summary: Get a pipeline
      parameters:
      - $ref: '#/components/parameters/WorkspaceName'
      - $ref: '#/components/parameters/PipelineName'
      responses:
        '200':
          description: The requested pipeline.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
    delete:
      operationId: deletePipeline
      tags:
      - Pipelines
      summary: Delete a pipeline
      parameters:
      - $ref: '#/components/parameters/WorkspaceName'
      - $ref: '#/components/parameters/PipelineName'
      responses:
        '204':
          description: Pipeline deleted.
  /api/v1/workspaces/{workspace_name}/pipelines/{pipeline_name}/deploy:
    post:
      operationId: deployPipeline
      tags:
      - Pipelines
      summary: Deploy a pipeline
      description: Deploys the pipeline so it can serve search requests.
      parameters:
      - $ref: '#/components/parameters/WorkspaceName'
      - $ref: '#/components/parameters/PipelineName'
      responses:
        '200':
          description: Deployment accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
  /api/v1/workspaces/{workspace_name}/pipelines/{pipeline_name}/undeploy:
    post:
      operationId: undeployPipeline
      tags:
      - Pipelines
      summary: Undeploy a pipeline
      parameters:
      - $ref: '#/components/parameters/WorkspaceName'
      - $ref: '#/components/parameters/PipelineName'
      responses:
        '200':
          description: Undeployment accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
components:
  schemas:
    PipelineList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Pipeline'
        total:
          type: integer
    Pipeline:
      type: object
      properties:
        pipeline_id:
          type: string
          format: uuid
        name:
          type: string
        status:
          type: string
          description: Deployment status, e.g. DEPLOYED, UNDEPLOYED, FAILED.
        created_at:
          type: string
          format: date-time
  parameters:
    PipelineName:
      name: pipeline_name
      in: path
      required: true
      schema:
        type: string
    WorkspaceName:
      name: workspace_name
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key generated in the deepset AI Platform UI, sent as a Bearer token.