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

# Stop Job Run



## OpenAPI

````yaml https://api.dispersed.com/openapi.json put /v1/job-runs/{uuid}/cancel
openapi: 3.1.0
info:
  title: Dispersed API
  version: 1.0.0
servers:
  - url: https://api.dispersed.com
security: []
paths:
  /v1/job-runs/{uuid}/cancel:
    put:
      tags:
        - Job Runs
      summary: Stop Job Run
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: uuid
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelJobRunRequest'
      responses:
        '200':
          description: Job run cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobRunResponseConsumer'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CancelJobRunRequest:
      type: object
      properties:
        reason:
          type: string
          example: Cancelled by user
    JobRunResponseConsumer:
      type: object
      properties:
        uuid:
          type:
            - string
            - 'null'
        object:
          type: string
          enum:
            - job_run
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        status:
          type: string
          enum:
            - ASSIGNED
            - PREPARING
            - RUNNING
            - COMPLETED
            - CANCELLING
            - CANCELLED
            - FAILING
            - FAILED
        node_urls:
          type: array
          items:
            type: object
            properties:
              description:
                type: string
              hostname:
                type: string
              port:
                type: number
              protocol:
                type: string
              tls:
                type: boolean
                default: false
            required:
              - hostname
              - port
              - protocol
        assigned_at_ms:
          type: number
        prepared_at_ms:
          type:
            - number
            - 'null'
        started_at_ms:
          type:
            - number
            - 'null'
        ended_at_ms:
          type:
            - number
            - 'null'
        duration_ms:
          type: number
        max_timeout_run_ms:
          type:
            - number
            - 'null'
        timeout_run_at_ms:
          type:
            - number
            - 'null'
        max_timeout_start_ms:
          type: number
        timeout_start_at_ms:
          type:
            - number
            - 'null'
        billing_rule:
          type: string
        hourly_rate_usd:
          type: number
        prep_hourly_rate_usd:
          type: number
        last_billed_at:
          type:
            - string
            - 'null'
          format: date-time
        next_billing_at:
          type:
            - string
            - 'null'
          format: date-time
        cancelled_reason:
          type:
            - string
            - 'null'
        failed_reason:
          type:
            - string
            - 'null'
        logs:
          type:
            - string
            - 'null'
        container_access_tokens:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
              token:
                type: string
            required:
              - label
              - token
          default: []
        job_uuid:
          type:
            - string
            - 'null'
        job:
          type:
            - string
            - 'null'
        job_snapshot:
          type: object
          properties:
            title:
              type: string
            uuid:
              type:
                - string
                - 'null'
          required:
            - title
          additionalProperties: {}
        image_size_bytes:
          type:
            - number
            - 'null'
      required:
        - object
        - created_at
        - updated_at
        - status
        - node_urls
        - assigned_at_ms
        - duration_ms
        - max_timeout_start_ms
        - billing_rule
        - hourly_rate_usd
        - job_snapshot
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Error'
      required:
        - error
    Error:
      type: object
      properties:
        code:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              expected:
                type: string
              input:
                type: string
              keys:
                type: array
                items:
                  type: string
              message:
                type: string
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
            required:
              - message
              - path
          default: []
        message:
          type: string
        status:
          type: number
        timestamp:
          type: string
      required:
        - code
        - message
        - status
        - timestamp

````