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://cavatica-ga4gh-api.sbgenomics.com/ga4gh/wes/v1/runs

Request

Example request

POST /ga4gh/wes/v1/runs HTTP/1.1
Host: cavatica-ga4gh-api.sbgenomics.com
X-SBG-Auth-Token: 55e9691c111146bd384c5ec40a9f97fb1
curl --location --request POST 'https://cavatica-ga4gh-api.sbgenomics.com/ga4gh/wes/v1/runs' \
--header 'X-SBG-Auth-Token: 55e9691c111146d384c5ec40a9f97fc0' \
--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/5f7b09a2e4b0e67085ff9386"}}};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.

Request body

šŸ“˜

When running a new workflow via WES on CAVATICA, 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://cavatica-ga4gh-api.sbgenomics.com/5a9d49c04f0c482419bb5f8e",
          "name": "C835.HCC1143.2.converted.realigned.base_recalibrated.bam",
          "class": "File"
        }
      ],
      "Reference_Genome_FASTA": {
        "path": "drs://cavatica-ga4gh-api.sbgenomics.com/5a9d49d54f0c482419bb5f98",
        "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": "103e7bc8-224e-4c97-9664-6f98a2cb7e2d"
}