/v2/action/files/get_ids
This call allows you to get the ID for a file, which you can then use to perform operations on that particular file, or to request more information about it.
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 by directly querying the underlying RDF database. This API call is designed for users of that product. For more information on the SPARQL query console, please contact [email protected].
https://cgc-api.sbgenomics.com/v2/action/files/get_ids
Request
Example request
POST /v2/action/files/get_ids HTTP/1.1
Host: cgc-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
curl --data '["/Datasets/tcga/TCGA-LUAD/ae9d7a82-11cb-3aec-b959-e37375e6de8b/analysis/1e849d63-a360-4d35-b9fe-745a3f0bf291/data/C509.TCGA-97-8547-01A-11D-23-08.2.bam"]' -s -H "X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74" -H "content-type: application/json" -X POST "https://cgc-api.sbgenomics.com/v2/action/files/get_ids"
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
["/Datasets/tcga/TCGA-LUAD/ae9d7a82-11cb-3aec-b959-e37375e6de8b/analysis/1e849d63-a360-4d35-b9fe-745a3f0bf291/data/C509.TCGA-97-8547-01A-11D-23-08.2.bam"]
Header Fields
Name | Description |
---|---|
X-SBG-Auth-Token required | Your CGC authentication token. |
Query parameters
Name | Data type | Description |
---|---|---|
fields | string | Selector specifying a subset of fields to include in the response. |
Response
See a list of CGC-specific response codes that may be contained in the body of the response.
Example response body
[
"564a5a59d7a68c5d9304e32c"
]
Note that if you submit an incorrect file path, the call will return the value null
. Also, the resulting array will have the same order of elements as in the request.