Get a file's metadata

This call returns the metadata values for the specified file.

🚧

Metadata on the Platform

Learn more about metadata fields and their values on the Seven Bridges Platform.

Files are specified by their IDs, which you can obtain by making the API call to list files in a project .

Request

https://api.sbgenomics.com/v2/files/{file_id}/metadata
https://eu-
api.sbgenomics.com/v2/files/{file_id}/metadata

Example request

GET /v2/files/562e449060b274321afb6091/metadata HTTP/1.1
Host: api.sbgenomics.com
X-SBG-Auth-Token: 565357a1e4b09c884b29334a
curl  -s -H "X-SBG-Auth-Token: 6282d5e2121d43e7900e9d52b15845e7" -H "content-type: application/json" -X GET "https://api.sbgenomics.com/v2/files/565357a1e4b09c884b29334a/metadata"
from sevenbridges import Api

api = Api(url='https://api.sbgenomics.com/v2',
          token='3259c50e1ac5426ea8f1273259740f74')

# send GET request to SB API for the whole file, metadata cannot be isolated
file = api.files.get(id='562e449060b274321afb6091')

print(file.metadata)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

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 Seven Bridges Platform-specific response codes that may be contained in the body of the response.

Example response body

{
  "sample_id": "E16201_pool35_L1756",
  "library_id": "hg19",
  "platform_unit_id": "C18_99",
  "platform": "IonTorrent",
  "quality_scale": "sanger"
}