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

# Get download information and URL for a file

/files/{file_id}/download_info

This call returns a URL that you can use to download the specified file.

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

\##Request

\###Example request

[block:code]
{
  "codes": [
    {
      "code": "GET /v2/files/568e69abe9b0307bc0414164/download_info HTTP/1.1\nHost: cgc-api.sbgenomics.com\nX-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74",
      "language": "http",
      "name": null
    },
    {
      "code": "curl  -s -H \"X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74\" -H \"content-type: application/json\" -X GET \"https://cgc-api.sbgenomics.com/v2/files/568e69abe9b0307bc0414164/download_info\"",
      "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": "`fie_id`",
    "h-0": "Name",
    "h-1": "Description",
    "0-1": "The ID of the file whose download URL you want to get."
  },
  "cols": 2,
  "rows": 1
}
[/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  \"url\": \"https://cgc-main.s3.amazonaws.com/050177c8-ecff-130a-96f8-54561a0c301e%2Btest-text.txt?response-content-disposition=attachment%3Bfilename%3Dtest-text.txt&response-content-type=application%2Foctet-stream&AWSAccessKeyId=AKIAIVTEXM5REGIZ56VA&Expires=1452345802&Signature=4e3DTiBMyiyLw%2F3VGjJUlwSyw28%3D\"\n}",
      "language": "json",
      "name": null
    }
  ],
  "sidebar": true
}
[/block]