---
agentTools:
  projectIndex: https://docs.cancergenomicscloud.org/llms.txt
---

# List tasks in a project (secondary method)

/projects/{project_owner}/{project}/tasks

This call lists the tasks in the specified project. It is an alias for the call [GET tasks](https://docs.cancergenomicscloud.org/docs/list-tasks-you-can-access) and redirects to that path.

[block:code]
{
  "codes": [
    {
      "code": "https://cgc-api.sbgenomics.com/v2/projects/{project_owner}/{project}/tasks",
      "language": "text",
      "name": "Path"
    }
  ]
}
[/block]

[block:callout]
{
  "type": "danger",
  "title": "Alias call",
  "body": "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`](http://curl.haxx.se/docs/manpage.html#-L) to redirect the path of this call to `https://cgc-api.sbgenomics.com/v2/files?project={project_owner}/{project`. \n\nAlternatively, to list all files, you can simply use the call [GET tasks](https://docs.cancergenomicscloud.org/docs/list-tasks-you-can-access)."
}
[/block]

\##Request

\###Example request

[block:callout]
{
  "type": "success",
  "title": "Referring to your project",
  "body": "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 [API overview](http://docs.cancergenomicscloud.org/v1.0/docs/the-cgc-api#section-identifying-projects-users-apps-files-and-tasks)."
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "GET /v2/projects/RFranklin/my-project/tasks HTTP/1.1\nHost: cgc-api.sbgenomics.com\nX-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74",
      "language": "http",
      "name": null
    },
    {
      "code": "curl -L \"https://cgc-api.sbgenomics.com/v2/tasks?project=RFranklin/my-project\"  -s -H \"X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74\" -H \"content-type: application/json\" -X GET \"https://cgc-api.sbgenomics.com/v2/projects/RFranklin/my-project/tasks\"",
      "language": "curl",
      "name": "cURL"
    }
  ],
  "sidebar": true
}
[/block]

\###Header Fields

[block:parameters]
{
  "data": {
    "h-0": "Name",
    "h-1": "Description",
    "0-0": "`X-SBG-Auth-Token`\n_required_",
    "0-1": "Your CGC [authentication token](https://docs.cancergenomicscloud.org/docs/get-your-authentication-token).",
    "h-2": ""
  },
  "cols": 2,
  "rows": 1
}
[/block]

\###Path parameters

[block:parameters]
{
  "data": {
    "0-0": "`project`",
    "1-0": "`project_owner`",
    "h-0": "Name",
    "h-1": "Description",
    "0-1": "The short name of the project you are querying.",
    "1-1": "The owner of the project you are querying."
  },
  "cols": 2,
  "rows": 2
}
[/block]

\###Query parameters

[block:parameters]
{
  "data": {
    "h-0": "Name",
    "h-1": "Data type",
    "h-2": "Description",
    "0-0": "`fields`",
    "0-1": "string",
    "0-2": "Selector specifying a subset of fields to include in the response."
  },
  "cols": 3,
  "rows": 1
}
[/block]

\##Response

[See a list of CGC-specific response codes that may be contained in the body of the response.](https://docs.cancergenomicscloud.org/docs/api-status-codes)

\###Example response body

[block:code]
{
  "codes": [
    {
      "code": "{\n  \"href\": \"https://cgc-api.sbgenomics.com/v2/tasks?offset=0&limit=25&project=RFranklin/my-project\",\n  \"items\": [\n    {\n      \"href\": \"https://cgc-api.sbgenomics.com/v2/tasks/39bc3d6a-6cf6-4f8f-b550-21e9633c1f4b\",\n      \"id\": \"39bc3d6a-6cf6-4f8f-b550-21e9633c1f4b\",\n      \"name\": \"test run - 12-11-15 11:02:03\",\n      \"project\": \"RFranklin/my-project\"\n    },\n    {\n      \"href\": \"https://cgc-api.sbgenomics.com/v2/tasks/db72b963-be8c-4e9c-9d71-6eb71ed22226\",\n      \"id\": \"db72b963-be8c-4e9c-9d71-6eb71ed22226\",\n      \"name\": \"test run - 12-11-15 11:52:45\",\n      \"project\": \"RFranklin/my-project\"\n    }\n  ],\n  \"links\": []\n}\n{\n  \"href\": \"https://cgc-api.sbgenomics.com/v2/tasks/?offset=0&limit=25&project=RFranklin/my-project\",\n  \"items\": [\n    {\n      \"href\": \"https://cgc-api.sbgenomics.com/v2/tasks/39bc3d6a-6cf6-4f8f-b550-21e9633c1f4b\",\n      \"id\": \"39bc3d6a-6cf6-4f8f-b550-21e9633c1f4b\",\n      \"name\": \"test run - 12-11-15 11:02:03\",\n      \"project\": \"RFranklin/my-project\"\n    },\n    {\n      \"href\": \"https://cgc-api.sbgenomics.com/v2/tasks/db72b963-be8c-4e9c-9d71-6eb71ed22226\",\n      \"id\": \"db72b963-be8c-4e9c-9d71-6eb71ed22226\",\n      \"name\": \"test run - 12-11-15 11:52:45\",\n      \"project\": \"RFranklin/my-project\"\n    }\n  ],\n  \"links\": []\n}",
      "language": "json"
    }
  ],
  "sidebar": true
}
[/block]