Get a file's download URL

action/files/get_download_url

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

❗️

This call is not intended for general CGC users

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, 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 [email protected].

There is an alternative CGC API call to get download information and URL for a file. General CGC users should use that call instead of this one.

https://cgc-api.sbgenomics.com/v2/action/files/get_download_url

Request

Example request

POST /v2/action/files/get_download_url HTTP/1.1
Host: cgc-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
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"

Request body

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

Body
array of strings, consisting of file paths.

Example request body

["/Projects/c9ee9d8c-9e4c-4ae3-bc55-8e02ebc13a73/1000G_omni2.5.b37.vcf"]

Header Fields

NameDescription
X-SBG-Auth-Token
required
Your CGC authentication token.

Response

See a list of CGC-specific response codes that may be contained in the body of the response.

Example response body

[
    "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&response-content-type=application%2Foctet-stream&AWSAccessKeyId=AKIAKLDEXM5REEXAMPLE&Expires=1453888344&Signature=A3qF0fgIwRET3tgYkMueTBIS%3D"
]

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

Language