projects/{project_owner}/{project_name}/files
This call lists the files in the specified project. It is an alias for the call GET /files and redirects to that path.
Alias call
Note that since this is an alias for another call, the call cannot be made straightforwardly from all applications. In particular, to send the call using cURL, use the cURL option
-L
to redirect the path of this call to `https://cgc-api.sbgenomics.com/v2/files?{project_owner}/{project}.Alternatively, to list all files, you can simply use the call GET /files.
https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/projects/{project_owner}/{project}/files
Request
Example request
Referring to your project
Note that
project_owner
is always case-sensitive, and thatproject
is not the project's name but its ID, or short name. For full details of identifying objects using the API, please see the API overview.
GET /v2/projects/rfranklin/my-project/files HTTP/1.1
Host: api.sb.biodatacatalyst.nhlbi.nih.gov
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
curl -L "https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/files?RFranklin/my-project" -s -H "X-SBG-Auth-Token: 1e43fEXampLEa5523dfd14exAMPle3e5" -H "content-type: application/json" -X GET "https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/projects/RFranklin/my-project/files"
Header Fields
Name | Description |
---|---|
X-SBG-Auth-Token required | Your Platform authentication token. |
Path parameters
Name | Description |
---|---|
project | The short name of the project you are querying. |
project_owner | The owner of the project you are querying. |
Query parameters
Name | Data type | Description |
---|---|---|
fields | string | Selector specifying a subset of fields to include in the response. |
Response
See a list of specific response codes that may be contained in the body of the response.
Example response body
{
"href": "https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/files/?offset=0&limit=25&project=RFranklin/my-project",
"items": [
{
"href": "https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/files/567890abc8a5136ec6127063",
"id": "567890abc8a5136ec6127063",
"name": "my_reference.vcf",
"project": "RFranklin/my-project"
},
{
"href": "https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/files/567890abc3d8130ea4047731",
"id": "567890abc3d8130ea4047731",
"name": "_1_unsorted.bam",
"project": "RFranklin/my-project"
},
{
"href": "https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/files/567890abc8a5639cc6722063",
"id": "567890abc8a5639cc6722063",
"name": "unsorted.bam",
"project": "RFranklin/my-project"
}
],
"links": []
}