v1

latestOpenAPI 3.1.02026-07-267418115.3 KB

POST jobs instances

post/api/v1/jobs

Request body

cpunumber nullable

The number of CPU cores used for this job, set only for shell script jobs

descriptionstring nullable

The human-readable description of the job. Supports markdown

image_uristring required

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_tokenboolean

Whether to inject the user's One Codex bearer token into the analysis job, exposed as $ONE_CODEX_BEARER_TOKEN

job_type'shell_script' | 'nextflow'

Whether this is a shell script or a Nextflow job

namestring required

The human-readable name of the job

ram_gbnumber nullable

The amount of RAM used for this job in GB, set only for shell script jobs

scriptstring required

The script to be executed, runs as non-root user

storage_gbnumber nullable

The amount of storage used for this job in GB, set only for shell script jobs

Example request

{
  "assets": [
    {
      "__DOLLAR_REF__": "/api/v1/assets/a1b2c3d4e5f67890"
    }
  ],
  "dependencies": [
    {
      "job": {
        "__DOLLAR_REF__": "/api/v1/jobs/a1b2c3d4e5f67890"
      }
    }
  ]
}

Response

OK

$uristring required
analysis_typestring required

The type of analysis. See the analysis resource for more details.

created_atstring date-time required

Timestamp for when the object was created on the One Codex platform, encoded as a RFC 3339 timestamp.

job_args_schemaobject required

The JSON schema for the arguments taken by the job (can be an empty object, i.e., {}).

namestring required

The name of the job (this is displayed in the dropdown on the analysis page of the One Codex web application).

publicboolean 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.

Example response

{
  "$uri": "/api/v1/jobs/0d77065796f8d173"
}