Rerun a task

This call reruns (executes) the specified task. Once rerun, the task can either be in draft mode or immediately ran, using the Action query parameter (see below).

Request

https://api.sbgenomics.com/v2/tasks/{task_id}/actions/clone
https://eu-api.sbgenomics.com/v2/tasks/{task_id}/actions/clone

Example request

POST /v2/tasks/b0bbeda6-153b-4801-92ad-82bc0e58bdb6/actions/clone" HTTP/1.1
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
curl  -s -H "X-SBG-Auth-Token: 6282d5e2121d43e7900e9d52b15845e7" -H "content-type: application/json" -X POST "https://api.sbgenomics.com/v2/tasks/b0bbeda6-153b-4801-92ad-82bc0e58bdb6/actions/run"
from sevenbridges import Api

api = Api(url='https://api.sbgenomics.com/v2',
          token='3259c50e1ac5426ea8f1273259740f74')

task = api.tasks.get(id='b0bbeda6-153b-4801-92ad-82bc0e58bdb6')

# send POST request to SB API
new_task = task.clone()

print(new_task.name, new_task.status, new_task.id)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Path parameters

Name

Description

task_id

The ID of the task you are rerunning on.

Query parameters

Name

Data type

Description

action

string

Set this to Run in order to create a draft task and execute it immediately.

Response

See a list of Seven Bridges Platform-specific response codes that may be contained in the body of the response.

Example response body

{
    "href": "https://api.sbgenomics.com/v2/tasks/79ef6004-4529-4801-a86d-64cef2b4f2e8",
    "id": "79ef6004-4529-3801-a86d-61cef5b4f2e8",
    "name": "VarsScan2 WF from BAM test",
    "status": "DRAFT",
    "project": "rfranklin/rfranklin-s-demo-project",
    "app": "rfranklin/rfranklin-s-demo-project/varscan2-workflow-from-bam-v2-3-9/0",
    "type": "v2",
    "created_by": "rfranklin",
    "start_time": "2018-07-03T14:24:10Z",
    "batch": false,
    "use_interruptible_instances": false,
    "errors": [],
    "warnings": [],
    "inputs": {
        "input_fasta_file": {
            "path": "5b311652f890e8dfeb24ab2b",
            "class": "File"
        },
        "Normal_BAM": {
            "path": "5b311652f890e8dfeb24aaf7",
            "class": "File"
        },
        "Tumor_BAM": {
            "path": "5b311652f890e8dfeb24aae1",
            "class": "File"
        }
    },
    "outputs": {
        "High_Confidence_INDELs": {},
        "empty_contigs": {},
        "High_Confidence_SNPs": {}
    },
    "created_time": "2018-07-03T14:24:10Z"
}