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

# Get a file's download URL

action/files/get_download_url

This call allows you to get the download URL for a file.

[block:callout]
{
  "type": "danger",
  "title": "This call is not intended for general CGC users",
  "body": "To use this call, you should supply the file's `path`. This object is not available on the CGC. It is available from the [SPARQL query console](https://opensparql.sbgenomics.com), created by Seven Bridges, for exploring TCGA data. This API call is designed for users of that product. For more information on the SPARQL query console, please contact support@sbgenomics.com.\n\nThere is an alternative CGC API call to [get download information and URL for a file](https://docs.cancergenomicscloud.org/docs/get-download-url-for-a-file). General CGC users should use that call instead of this one."
}
[/block]

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

\##Request

\###Example request

[block:code]
{
  "codes": [
    {
      "code": "POST /v2/action/files/get_download_url HTTP/1.1\nHost: cgc-api.sbgenomics.com\nX-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74",
      "language": "http",
      "name": null
    },
    {
      "code": "curl --data '{[\"/Projects/c9ee9d8c-9e4c-4ae3-bc55-8e02ebc13a73/1000G_omni2.5.b37.vcf\"]}' -s -H \"X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74\" -H \"content-type: application/json\" -X POST \"https://cgc-api.sbgenomics.com/v2/action/files/get_download_url\"",
      "language": "curl",
      "name": "cURL"
    }
  ],
  "sidebar": true
}
[/block]

\##Request body
In the body, you should enter an array of strings, containing the file paths.

[block:parameters]
{
  "data": {
    "h-0": "Body",
    "h-1": "Data type of value",
    "h-2": "Content of value",
    "0-0": "array of strings, consisting of file paths.",
    "0-1": "",
    "0-2": ""
  },
  "cols": 1,
  "rows": 1
}
[/block]

\###Example request body

[block:code]
{
  "codes": [
    {
      "code": "[\"/Projects/c9ee9d8c-9e4c-4ae3-bc55-8e02ebc13a73/1000G_omni2.5.b37.vcf\"]",
      "language": "json"
    }
  ]
}
[/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]

\##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    \"https://bucket.s3.amazonaws.com/TCGA-LUAD/eb7c7a11-14ea-4dba-b129-e63916f3de8b/analysis/1e849d63-b947-7e01-b9fe-745a3f0bf291/data/C509.TCGA-97-8547-01-D-233-0.2.bam?response-content-disposition=attachment%3Bfilename%3DC509.TCGA-97-8547-01-D-233-0.2.bam&amp;response-content-type=application%2Foctet-stream&amp;AWSAccessKeyId=AKIAKLDEXM5REEXAMPLE&amp;Expires=1453888344&amp;Signature=A3qF0fgIwRET3tgYkMueTBIS%3D\"\n]",
      "language": "json"
    }
  ],
  "sidebar": true
}
[/block]

Note that if you submit an incorrect file path, the call will return the value `null`.