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

# Run A Job

Trigger a Job against a sample (or another input), creating a new Analysis. The request body specifies the input sample, any required arguments, and an optional list of dependency analyses whose outputs should feed into this run. The response is the newly-created Analysis (or analysis subclass — Classification, Functional Profile, etc. — depending on the job's `analysis_type`).


## OpenAPI

````yaml POST /api/v1/jobs/{id}/run
openapi: 3.1.0
info:
  description: >-
    The One Codex API (v1) -- programmatic access to One Codex's suite of
    microbial genomics data storage, analysis, and query tools.
  title: One Codex API (v1)
  version: v1
servers:
  - url: https://app.onecodex.com
security:
  - apiKeyAuth: []
paths:
  /api/v1/jobs/{id}/run:
    post:
      summary: POST jobs run
      operationId: post_jobs_run
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                dependencies:
                  anyOf:
                    - items:
                        properties:
                          analysis:
                            description: Parent run to use as a dependency
                            properties:
                              __DOLLAR_REF__:
                                example: /api/v1/analyses/a1b2c3d4e5f67890
                                format: uri
                                pattern: ^/api/v1/analyses/[a-f0-9]{16}$
                                type: string
                            type: object
                          download_path:
                            anyOf:
                              - pattern: '[^/].*'
                                type: string
                              - type: 'null'
                            default: null
                            description: >-
                              Directory into which to download the parent run
                              (must be relative)
                            title: Download Path
                        required:
                          - analysis
                        title: DependencyOverrideSchema
                        type: object
                      type: array
                    - type: 'null'
                  default: null
                  description: >-
                    Override the analysis dependencies for this run with
                    provided dependencies
                  title: Dependencies
                job_args:
                  anyOf:
                    - additionalProperties: true
                      type: object
                    - type: 'null'
                  title: Job Args
                populate_default_arguments:
                  anyOf:
                    - type: boolean
                    - type: 'null'
                  default: true
                  title: Populate Default Arguments
                sample:
                  properties:
                    __DOLLAR_REF__:
                      example: /api/v1/samples/a1b2c3d4e5f67890
                      format: uri
                      pattern: ^/api/v1/samples/[a-f0-9]{16}$
                      type: string
                  type: object
              required:
                - job_args
                - sample
              title: JobRunAnalysisSchema
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  __DOLLAR_REF__:
                    example: /api/v1/analyses/a1b2c3d4e5f67890
                    format: uri
                    pattern: ^/api/v1/analyses/[a-f0-9]{16}$
                    type: string
                type: object
          description: OK
components:
  securitySchemes:
    apiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey

````