Run a workflow

This call runs (executes) a workflow and returns the run ID which you can use to monitor its progress (see Get details of a workflow run).

https://cgc-ga4gh-api.sbgenomics.com/ga4gh/wes/v1/runs

Request

Example request

POST /ga4gh/wes/v1/runs HTTP/1.1
Host: cgc-ga4gh-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
Content-Type: multipart/form-data
curl --location --request POST 'https://cgc-ga4gh-api.sbgenomics.com/ga4gh/wes/v1/runs' \
--header 'X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74' \
--header 'Cookie: language=en' \
--form 'workflow_params={"project": "rfranklin/my-project", "use_interruptible_instances": true, "inputs": {"input_bam": {"class": "File", "path": "drs://cavatica-ga4gh-api.sbgenomics.com/568e69abe9b0307bc0412345"}}};type=application/json'  \
--form 'workflow_type=CWL' \
--form 'tags={}' \
--form 'workflow_engine_parameters={}' \
--form 'workflow_url=sbg://rfranklin/my-project/tool/0'

Header Fields

NameDescription
X-SBG-Auth-Token
required
Your authentication token.
Content-Type
required
Specify: multipart/form-data

Request body

📘

When running a new workflow via WES on CGC, you need to specify the target project using the project parameter. See details below.

NameData typeDescription
workflow_params
required
objectSpecify the name of the project using the project (required) parameter , e.g. "project": "rfranklin/my-project".

You can also use this parameter to specify the input files:
The path to the files can be specified either as a platform-local DRS URI or file ID.
Option to specify files via an external DRS URI is coming soon.
workflow_type
required
stringThe type of workflow language submitted which is supported by this WES instance.
workflow_type_version
required
stringThe version of the workflow language submitted which is supported by this WES instance.
tagsstringSpecify tags.
workflow_url
required
stringThis parameter is used for specifying the location of the App, which can be any of the following:

App in your project - specify the URL to the app, e.g. sbg://admin/sbg-public-data/topmed-alignment
App in the Dockstore - specify the URL to your app in the Dockstore, using the standard HTTP or TRS format
* App uploaded via workflow_attachment - specify the relative path to the appropriate attachment, e.g. #/workflow_attachment/0
workflow_attachmentArray of strings The workflow_attachment array may be used to upload the App needed to execute the workflow.

Example request body

{
  "workflow_params": {
    "project": "rfranklin/my-project",
    "inputs": {
      "input_list": [
        {
          "path": "drs://cgc-ga4gh-api.sbgenomics.com/568e69abe9b0307bc0412345",
          "name": "C835.HCC1143.2.converted.realigned.base_recalibrated.bam",
          "class": "File"
        }
      ],
      "Reference_Genome_FASTA": {
        "path": "drs://cgc-ga4gh-api.sbgenomics.com/568e69abe9b0307bc0498765",
        "name": "Homo_sapiens_assembly38.fasta",
        "class": "File"
      }
    }
  },
  "workflow_type": "CWL",
  "workflow_type_version": "v1.0",
  "workflow_url": "sbg://rfranklin/my-project/alignment-metrics-qc/0"
}

Response

See a list of response codes that may be contained in the body of the response.

Response body

NameData typeDescription
run_idstringWorkflow run ID

Example response body

{
  "run_id": "533d8bc9-123c-098d-4567-6f72a2cb7a2e"
}