Run a task

This call runs (executes) the specified task. Only tasks whose status is "DRAFT" can be run.

Request

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

Example request

POST /v2/tasks/b0bbeda6-153b-4801-92ad-82bc0e58bdb6/actions/run" 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
task.run()

print(task.status)

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 acting on.

Query parameters

Name

Data type

Description

fields

string

Selector specifying a subset of fields to include in the response.

batch

boolean

Set this to false to disable the default batching for this task.

Running a batch task is a recommended way to run multiple tasks considering the API rate limit (learn more).

use_interruptible_instances

boolean

This field can be true or false.

Set this field to true to allow the use of spot instances.

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/b0bbeda6-153b-4801-92ad-82bc0e58bdb6",
  "id": "b0bbeda6-153b-4801-92ad-82bc0e58bdb6",
  "name": "new name for my task",
  "description": "re-describing the task",
  "status": "RUNNING",
  "project": "RFranklin/my-project",
  "use_interruptible_instances": false,
  "app": "RFranklin/my-project/new/0",
  "type": "v2",
  "created_by": "RFranklin",
  "executed_by": "RFranklin",
  "start_time": "2016-01-12T18:39:30Z",
  "execution_status": {
    "message": "Initializing..."
  },
  "inputs": {
    "dispersion_threshold": null,
    "cuffdiff_zip": {
      "class": "File",
      "path": "562785e6e4b00a1d67a8b1aa",
      "name": "example_human_known_indels.vcf"
    },
    "density_threshold": null,
    "thresholds_off": null
  },
  "outputs": {
    "archive": null,
    "html": null
  }
}