/files/{file_id}
This call returns details about a specified file. The call returns the file's name, its tags, and all of its metadata.
Files are specified by their IDs, which you can obtain by making the API call to list files in a project .
https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/files/{file_id}
Request
Example request
GET /v2/files/567890abc8a5639cc6722063 HTTP/1.1
Host: api.sb.biodatacatalyst.nhlbi.nih.gov
X-SBG-Auth-Token: 1e43fEXampLEa5523dfd14exAMPle3e5
curl -s -H "X-SBG-Auth-Token: 6282d5e2121d43e7900e9d52b15845e7" -H "content-type: application/json" -X GET "https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/files/567890abc8a5639cc6722063"
Header Fields
Name | Description |
---|---|
X-SBG-Auth-Token required | Your Platform authentication token. |
X-SBG-Advance-Access optional | advance Use this field if you want to return the parent folder ID. This field is a part of the advance access functionality for managing folders on the Seven Bridges Platform. |
Path parameters
Name | Description |
---|---|
file_id | The ID of the file whose details you want to GET. |
Query parameters
Name | Data type | Description |
---|---|---|
fields | string | Selector specifying a subset of fields to include in the response. |
Response
See a list of 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/567890abc8a5639cc6722063",
"id": "567890abc8a5639cc6722063",
"name": "chr20.intervals",
"size": 5,
"project": "rfranklin/my-project",
"parent": "567890abc4f3066bc3750174",
"type": "file",
"created_on": "2019-08-07T13:28:01Z",
"modified_on": "2019-08-07T13:28:01Z",
"storage": {
"type": "PLATFORM",
"hosted_on_locations": [
"aws:us-east-1",
"google:us-west1"
]
},
"origin": {},
"tags": [
"tag"
],
"metadata": {
"md5_sum": "3feb601b556d63db86669175f921463b",
"sbg_public_files_category": "reference"
}
}
Interpreting the response body:
- The object
origin
denotes the origin of the file, such as the task which produced it or the dataset to which the file belongs. - The dictionary object
metadata
lists the metadata fields and values for the file. - The object
tags
lists the tags for the file. Learn more about tagging your files on the Platform.