Abort a task

This call aborts the specified task. Only tasks whose status is "RUNNING" or "QUEUED" may be aborted.

Request

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

Example request

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

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.

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": "Workflow run - 11-15-15 15:56:11",
  "status": "Active",
  "project": "RFranklin/my-project",
  "use_interruptible_instances": false,
  "app": "RFranklin/my-project/workflow/1",
  "created_by": "RFranklin",
  "executed_by": "Kate",
  "start_time": "2015-11-15T15:56:11Z",
  "inputs": {
    "my_hardcoded_string": {
      "schema": [
        "null",
        "string"
      ],
      "value": null,
      "errors": null,
      "files": null,
      "missing_files": null
    }
  }
}