POST jobs instances

Changed on
post/api/v1/jobs

Request

  • Base URL
    https://app.onecodex.com
  • URL
    https://app.onecodex.com/api/v1/jobs
  • Auth
    API key in header X-API-Key

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 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. Required for shell script jobs. Not supported for Nextflow jobs, use nextflow_version instead

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

nextflow_versionstring nullable

The Nextflow version to run this job with, e.g. 26.04.6. Only supported for Nextflow jobs, and defaults to the latest supported version

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.

draftboolean required

Whether the job is an unpublished draft. Draft jobs are only visible to their creator.

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"
}

Changes

    • info

      added the new optional request property

    • info

      the request property became optional

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      the request property's minLength was decreased from 1 to 0

    • info

      added the required property to the response with the status