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

# Cancel a run

> Cancels a queued or executing run.



## OpenAPI

````yaml https://api.strait.dev/reference/openapi.json delete /v1/runs/{runID}
openapi: 3.1.0
info:
  description: >-
    Production-grade job orchestration platform for background jobs, workflows,
    and managed execution.
  title: Strait API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.strait.dev
security: []
paths:
  /v1/runs/{runID}:
    delete:
      tags:
        - Runs
      summary: Cancel a run
      description: Cancels a queued or executing run.
      operationId: cancel-run
      parameters:
        - in: path
          name: runID
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobRun'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Unauthorized
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Not Found
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Conflict
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  schemas:
    JobRun:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.strait.dev/schemas/JobRun.json
          format: uri
          readOnly: true
          type: string
        attempt:
          format: int64
          type: integer
        batch_id:
          type: string
        concurrency_key:
          type: string
        continuation_of:
          type: string
        created_at:
          format: date-time
          type: string
        created_by:
          type: string
        debug_mode:
          type: boolean
        error:
          type: string
        error_class:
          type: string
        execution_mode:
          type: string
        execution_trace:
          $ref: '#/components/schemas/ExecutionTrace'
        expires_at:
          format: date-time
          type: string
        finished_at:
          format: date-time
          type: string
        heartbeat_at:
          format: date-time
          type: string
        id:
          type: string
        idempotency_key:
          type: string
        job_id:
          type: string
        job_version:
          format: int64
          type: integer
        job_version_id:
          type: string
        lineage_depth:
          format: int64
          type: integer
        machine_id:
          type: string
        max_attempts_override:
          format: int64
          type: integer
        metadata:
          additionalProperties:
            type: string
          type: object
        next_retry_at:
          format: date-time
          type: string
        parent_run_id:
          type: string
        payload: {}
        priority:
          format: int64
          type: integer
        project_id:
          type: string
        result: {}
        retry_backoff:
          type: string
        retry_initial_delay_secs:
          format: int64
          type: integer
        retry_max_delay_secs:
          format: int64
          type: integer
        scheduled_at:
          format: date-time
          type: string
        started_at:
          format: date-time
          type: string
        status:
          type: string
        tags:
          additionalProperties:
            type: string
          type: object
        timeout_secs_override:
          format: int64
          type: integer
        triggered_by:
          type: string
        workflow_step_run_id:
          type: string
      required:
        - id
        - job_id
        - project_id
        - status
        - attempt
        - triggered_by
        - priority
        - job_version
        - debug_mode
        - lineage_depth
        - created_at
      type: object
    ErrorModel:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://api.strait.dev/schemas/ErrorModel.json
          format: uri
          readOnly: true
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    ExecutionTrace:
      additionalProperties: false
      properties:
        connect_ms:
          format: int64
          type: integer
        dequeue_ms:
          format: int64
          type: integer
        dispatch_ms:
          format: int64
          type: integer
        queue_wait_ms:
          format: int64
          type: integer
        total_ms:
          format: int64
          type: integer
        transfer_ms:
          format: int64
          type: integer
        ttfb_ms:
          format: int64
          type: integer
      required:
        - queue_wait_ms
        - dequeue_ms
        - connect_ms
        - ttfb_ms
        - transfer_ms
        - total_ms
        - dispatch_ms
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: strait_...
      description: API key passed as Bearer token
      scheme: bearer
      type: http

````