List tasks in a project (secondary method)

This call lists the tasks in the specified project. It is an alias for the call to get tasks and redirects to that path.

Request

https://api.sbgenomics.com/v2/projects/{project_owner}/{project}/tasks
https://eu-api.sbgenomics.com/v2/projects/{project_owner}/{project}/tasks

❗️

Alias call

Note that since this is an alias for another call, the call cannot be made straightforwardly from all applications. In particular, to send the call using cURL, use the cURL option -L to redirect the path of this call to https://api.sbgenomics.com/v2/tasks?project={project_owner}/{project}.

Alternatively, to list all files, you can simply use the call to get tasks.

👍

Referring to your project

Note that project_owner is always case-sensitive, and that project is not the project's name but its ID, or short name. For full details of identifying objects using the API, please see the section on specifying objects.

Example request

GET /v2/projects/RFranklin/my-project/tasks HTTP/1.1
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
curl -L "https://cgc-api.sbgenomics.com/v2/tasks?project=RFranklin/my-project"  -s -H "X-SBG-Auth-Token: 7942f56901534434a054dafc3813bc96" -H "content-type: application/json" -X GET "https://api.sbgenomics.com/v2/projects/RFranklin/my-project/tasks"
from sevenbridges import Api

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

project = api.projects.get(id='RFranklin/my-project')

# send GET request to SB API
tasks = project.get_tasks()

for task in tasks:
    print(task.name, task.status, task.id)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Path parameters

Name

Description

project

The short name of the project you are querying.

project_owner

The owner of the project you are querying.

origin_id

Enter an automation run ID to list all tasks created from the specified automation run.

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/?offset=0&limit=25&project=RFranklin/my-project",
  "items": [
    {
      "href": "https://api.sbgenomics.com/v2/tasks/39bc3e8c-6cf6-4f8f-b550-21e9633c1f4b",
      "id": "39bc3e8c-6cf6-4f8f-b550-21e9633c1f4b",
      "name": "test run - 12-11-15 11:02:03",
      "project": "RFranklin/my-project"
    },
    {
      "href": "https://api.sbgenomics.com/v2/tasks/db72b963-ba2e-4e9c-9d71-6eb71ed22226",
      "id": "db72b963-ba2e-4e9c-9d71-6eb71ed22226",
      "name": "test run - 12-11-15 11:52:45",
      "project": "RFranklin/my-project"
    }
  ],
  "links": []
}