Skip to main content
GET
/
api
/
v1
/
jobs
/
{id}
/
details
GET jobs details
curl --request GET \
  --url https://app.onecodex.com/api/v1/jobs/{id}/details \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://app.onecodex.com/api/v1/jobs/{id}/details"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://app.onecodex.com/api/v1/jobs/{id}/details', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://app.onecodex.com/api/v1/jobs/{id}/details",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://app.onecodex.com/api/v1/jobs/{id}/details"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.onecodex.com/api/v1/jobs/{id}/details")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.onecodex.com/api/v1/jobs/{id}/details")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "autorun_on_org_sample_upload": true,
  "image_uri": "<string>",
  "inject_bearer_token": true,
  "script": "<string>",
  "arguments_schema": [
    {
      "description": "<string>",
      "fa_icon": "<string>",
      "fields": [
        {
          "name": "<string>",
          "choices": [
            "<string>"
          ],
          "default": null,
          "description": "<string>",
          "env_name": "",
          "fa_icon": "<string>",
          "help_text": "<string>",
          "pattern": "<string>",
          "required": false
        }
      ],
      "title": "<string>"
    }
  ],
  "assets": [
    {
      "__DOLLAR_REF__": "/api/v1/assets/a1b2c3d4e5f67890"
    }
  ],
  "cpu": 123,
  "dependencies": [
    {
      "job": {
        "__DOLLAR_REF__": "/api/v1/jobs/a1b2c3d4e5f67890"
      },
      "output_dir": "<string>"
    }
  ],
  "description": "<string>",
  "ram_gb": 123,
  "repository": {
    "url": "<string>",
    "tag": "<string>"
  },
  "storage_gb": 123
}
Fetch full details for a Job, including its container image, asset dependencies, parent-job dependencies, and the structured arguments schema rendered as field groups suitable for building a UI form. This endpoint is intended for Custom Workflows only.

Authorizations

X-API-Key
string
header
required

Path Parameters

id
string
required

Response

200 - application/json

OK

autorun_on_org_sample_upload
boolean
required

Whether this job runs automatically on every newly uploaded sample in the user's organization.

image_uri
string
required

Fully qualified OCI image URI used to run the job.

inject_bearer_token
boolean
required

Whether the user's One Codex bearer token is injected into the analysis job as $ONE_CODEX_BEARER_TOKEN.

job_type
enum<string>
required

Whether this is a shell script or a Nextflow job.

Available options:
shell_script,
nextflow
script
string
required

The script that is executed when the job runs.

arguments_schema
FieldGroup · object[] | null

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

assets
Assets · object[] | null

An optional list of assets associated with this job

cpu
number | null

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

dependencies
JobDependencySchema · object[] | null

Optional job dependencies for this job. If provided, will be triggered automatically when this job is run

description
string | null

The human-readable description of the job. Supports markdown

ram_gb
number | null

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

repository
RepositorySchema · object | null

The git repository that this job runs against

storage_gb
number | null

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