---
title: "PATCH jobs"
method: PATCH
path: "/api/v1/jobs/{id}"
---

# PATCH jobs

`PATCH /api/v1/jobs/{id}`

## Path parameters

- `id` string, required

## Request body

- object
  - `arguments_schema` object[], nullable — The schema for the arguments to parametrize this job. Each field is exposed in the script as `$ARGS_<UPPER_NAME>`. Example: `[{"fields": [{"name": "min_quality", "type": "integer"}, {"name": "adapter", "type": "string"}]}]`. The input sample is not a parameter; it is passed separately at run time
    - `description` string, nullable
    - `fa_icon` string, nullable
    - `fields` object[]
      - `choices` union[], nullable
        - union
          - string
          - integer
          - number
          - boolean
      - `default` unknown
      - `description` string, nullable
      - `env_name` string
      - `fa_icon` string, nullable
      - `help_text` string, nullable
      - `name` string, required
      - `pattern` string, nullable
      - `required` boolean
      - `type` union, required
        - 'string' | 'regex' | 'integer' | 'number' | 'boolean' | 'enum' | 'sample_id' | 'genome_id' | 'classified_sample_id' | 'assembly_id' | 'ref_assembly_by_tax_id' | 'genome_tax_id'
        - string[]
    - `title` string, nullable
  - `assets` object[], nullable — An optional list of assets associated with this job
    - `__DOLLAR_REF__` string, uri
  - `autorun_on_org_sample_upload` boolean, nullable — Whether to automatically run this job on every newly uploaded sample in the user's organization. Only available to organization admins on published jobs.
  - `cpu` number, nullable — The number of CPU cores used for this job, set only for shell script jobs
  - `dependencies` object[], nullable — Optional job dependencies for this job. If provided, will be triggered automatically when this job is run
    - `job` object, required — Parent job to use as a dependency
      - `__DOLLAR_REF__` string, uri
    - `output_dir` string, required — Directory into which to download the parent run results (must be relative, will be appended to /out directory)
  - `description` string, nullable — The human-readable description of the job. Supports markdown
  - `image_uri` string, nullable — Fully qualified, publicly available OCI image URI containing every tool the script uses. Examples: `docker.io/biocontainers/fastqc:v0.11.9_cv8`, `docker.io/library/python:3.12`. Don't use Docker Hub shorthand forms such as `python:3.12` or `python/3.12`
  - `inject_bearer_token` boolean, nullable — Whether to inject the user's One Codex bearer token into the analysis job, exposed as $ONE_CODEX_BEARER_TOKEN
  - `name` string, nullable — The human-readable name of the job
  - `ram_gb` number, nullable — The amount of RAM used for this job in GB, set only for shell script jobs
  - `repository` object, nullable — The git repository that this job runs against
    - `tag` string, nullable — The git tag to use for this repository
    - `url` string, required — The URL of the git repository
  - `script` string, nullable — The script to be executed, runs as non-root user
  - `storage_gb` number, nullable — The amount of storage used for this job in GB, set only for shell script jobs

## Response `200`

OK

- Jobs
  - `$uri` string, required
  - `analysis_type` string, required — The type of analysis. See [the analysis resource](/api/analysis-resource) for more details.
  - `created_at` string, date-time, required — Timestamp for when the object was created on the One Codex platform, encoded as a [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) timestamp.
  - `job_args_schema` object, required — The JSON schema for the arguments taken by the job (can be an empty object, i.e., `{}`).
  - `name` string, required — The name of the job (this is displayed in the dropdown on the analysis page of the One Codex web application).
  - `public` boolean, required — Whether the job is publicly available. For most jobs this will be `true`. Custom, private jobs are also available, and will only be visible to users whose samples (or samples shared with them) have been analyzed using that job.

---

[API](https://skmtc.net/onecodex/apis/one-codex-api-v1.md) · [All operations](https://skmtc.net/onecodex/apis/one-codex-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onecodex/one-codex-api-v1/versions/fe9d9bfc8a6a/schema)
