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

# Get details of all async jobs

v2/async/files

This call gets the details for all asynchronous bulk jobs you have started. This information will be available for up to a month after the job has been completed.

[block:api-header]
{
  "type": "basic",
  "title": "Request"
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "https://cgc-api.sbgenomics.com/v2/async/files",
      "language": "text",
      "name": "Path"
    }
  ]
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "Example request",
  "sidebar": true
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "GET /v2/async/files\nHost: cgc-api.sbgenomics.com\nX-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74",
      "language": "http",
      "name": null
    },
    {
      "code": "curl -X GET \\\n  https://cgc-api.sbgenomics.com/v2/async/files\n  -H 'Content-Type: application/json' \\\n  -H 'X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74' \\",
      "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": "",
    "1-0": "`Content-Type`\n*required*",
    "1-1": "`application/json`"
  },
  "cols": 2,
  "rows": 2
}
[/block]

### Query parameters

[block:parameters]
{
  "data": {
    "h-0": "Key",
    "h-1": "Data type",
    "h-2": "Description",
    "0-0": "`offset`",
    "0-1": "integer",
    "0-2": "The zero-based starting index in the entire collection of the first item to return. The default value is 0. This is a pagination-specific attribute.",
    "1-0": "`limit`",
    "1-1": "integer",
    "1-2": "The maximum number of collection items to return for a single request. Minimum value is 1. The maximum value is 100 and the default value is 25. This is a pagination-specific attribute."
  },
  "cols": 3,
  "rows": 2
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "Response"
}
[/block]

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

## Response body

The response body will contain information for each of the jobs.

[block:parameters]
{
  "data": {
    "0-0": "`id`",
    "h-0": "Key",
    "h-1": "Data type",
    "h-2": "Description",
    "0-1": "string",
    "0-2": "ID of the job.",
    "1-0": "`result`",
    "1-1": "string",
    "1-2": "The result of the job.",
    "2-0": "`type`",
    "2-1": "string",
    "2-2": "The type of job.",
    "3-0": "`state`",
    "3-1": "string",
    "3-2": "The following states are available:\n\nSUBMITTED\nRESOLVING\nRUNNING\nFINISHED",
    "4-0": "`failed_files`",
    "5-0": "`completed_files`",
    "6-0": "`total_files`",
    "4-1": "string",
    "5-1": "string",
    "6-1": "string",
    "4-2": "The number of files that failed.",
    "5-2": "The number of files that were successfully completed.",
    "6-2": "The total number of files that were processed for the job."
  },
  "cols": 3,
  "rows": 7
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "Example response body",
  "sidebar": true
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "\n{\n    \"href\": \"https://cgc-api.sbgenomics.com/v2/async/files?offset=0&amp;limit=13\",\n    \"items\": [\n        {\n            \"href\": \"https://cgc-api.sbgenomics.com/v2/async/files/copy/71711174376365120\",\n            \"id\": \"71711174376365120\",\n            \"result\": [\n                {\n                    \"resource\": {\n                        \"href\": \"https://cgc-api.sbgenomics.com/v2/files/568e69abe9b0307bc0412345\",\n                        \"id\": \"568e69abe9b0307bc0412345\"\n                    }\n                }\n            ],\n            \"type\": \"COPY\",\n            \"state\": \"FINISHED\",\n            \"failed_files\": 0,\n            \"completed_files\": 1,\n            \"total_files\": 1,\n            \"started_on\": \"2019-02-20T12:03:50Z\",\n            \"finished_on\": \"2019-02-20T12:03:51Z\"\n        },\n        {\n            \"href\": \"https://cgc-api.sbgenomics.com/v2/async/files/copy/71714896452560426\",\n            \"id\": \"71714896452560426\",\n            \"result\": [\n                {\n                    \"resource\": {\n                        \"href\": \"https://cgc-api.sbgenomics.com/v2/files/568e69abe9b0307bc0414164\",\n                        \"id\": \"568e69abe9b0307bc0414164\"\n                    }\n                },\n                {\n                    \"resource\": {\n                        \"href\": \"https://cgc-api.sbgenomics.com/v2/files/568e69abe9a5219bc0414164\",\n                        \"id\": \"568e69abe9a5219bc0414164\"\n                    }\n                },\n                {\n                    \"resource\": {\n                        \"href\": \"https://cgc-api.sbgenomics.com/v2/files/568e69abe9e9876bc0414164\",\n                        \"id\": \"568e69abe9e9876bc0414164\"\n                    }\n                }\n            ],\n            \"type\": \"COPY\",\n            \"state\": \"FINISHED\",\n            \"failed_files\": 0,\n            \"completed_files\": 3,\n            \"total_files\": 3,\n            \"started_on\": \"2019-02-20T13:03:00Z\",\n            \"finished_on\": \"2019-02-20T13:03:00Z\"\n        },\n        {\n            \"href\": \"https://cgc-api.sbgenomics.com/v2/async/files/copy/71714077612345678\",\n            \"id\": \"71714077612345678\",\n            \"result\": [\n                {\n                    \"resource\": {\n                        \"href\": \"https://api.sbgenomics.com/v2/files/5f6d4cf7e4b0385017542766\",\n                        \"id\": \"5f6d4cf7e4b0385017542766\"\n                    }\n                },\n                {\n                    \"resource\": {\n                        \"href\": \"https://cgc-api.sbgenomics.com/v2/files/5f6d4cf7e4b038583e85c1a9\",\n                        \"id\": \"5f6d4cf7e4b038583e85c1a9\"\n                    }\n                }\n            ],\n            \"type\": \"COPY\",\n            \"state\": \"FINISHED\",\n            \"failed_files\": 0,\n            \"completed_files\": 3,\n            \"total_files\": 3,\n            \"started_on\": \"2019-02-20T12:49:59Z\",\n            \"finished_on\": \"2019-02-20T12:49:59Z\"\n       }\n    ],\n    \"links\": []\n}",
      "language": "json",
      "name": "Example response body"
    }
  ],
  "sidebar": true
}
[/block]