> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ionworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel a pipeline

> Cancel a running pipeline and all its non-terminal elements.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /pipelines/{pipeline_id}/cancel
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /pipelines/{pipeline_id}/cancel:
    post:
      tags:
        - Pipeline
      summary: Cancel a pipeline
      description: Cancel a running pipeline and all its non-terminal elements.
      operationId: cancel_pipeline_pipelines__pipeline_id__cancel_post
      parameters:
        - name: pipeline_id
          in: path
          required: true
          schema:
            type: string
            title: Pipeline Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Pipeline:
      properties:
        id:
          type: string
          title: Id
        project_id:
          type: string
          title: Project Id
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        options:
          $ref: '#/components/schemas/PipelineOptions'
        status:
          $ref: '#/components/schemas/PipelineStatus'
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        error_code:
          anyOf:
            - $ref: '#/components/schemas/JobErrorCode'
            - type: 'null'
        created_by_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By Email
        organization_id:
          type: string
          title: Organization Id
          description: Organization this pipeline belongs to.
      type: object
      required:
        - id
        - project_id
        - name
        - status
        - created_at
        - updated_at
        - organization_id
      title: Pipeline
      description: >-
        Model for representing a pipeline in API list responses (without
        elements).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PipelineOptions:
      properties:
        live_progress_updates:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Live Progress Updates
          description: >-
            If True, save checkpoint progress to database during job execution.
            If None, the worker picks a default based on job type.
      type: object
      title: PipelineOptions
      description: Options for pipeline execution behavior.
    PipelineStatus:
      type: string
      enum:
        - pending
        - running
        - completed
        - failed
        - canceled
      title: PipelineStatus
    JobErrorCode:
      type: string
      enum:
        - CONFIGURATION_ERROR
        - MODEL_ERROR
        - SOLVER_ERROR
        - EXECUTION_TIMEOUT
        - SUBMISSION_FAILED
        - INTERNAL_ERROR
      title: JobErrorCode
      description: Machine-readable error codes for jobs.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````