Add tags to a file

files/{file_id}/tags

This call allows you to tag files on the CGC. You can tag your files on the CGCwith keywords to make it easier to identify and organize files you’ve imported from public datasets or copied between projects. Learn more about tagging your files.

In addition to tagging your files, you can do the following via the API:

https://cgc-api.sbgenomics.com/v2/files/{file_id}/tags

Request

Example request

PUT v2/files/568e69abe9b0307bc0414164/tags HTTP/1.1
Host: cgc-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
Content-Type: application/json
curl --data '{"tags": ["test 1b", "my first project", "CCLE"}'  -s -H "X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74" -H "content-type: application/json" -X POST "https://cgc-api.sbgenomics.com/v2/files/568e69abe9b0307bc0414164/tag"

Header Fields

NameDescription
X-SBG-Auth-Token
required
Your CGC authentication token authentication token
Content-Type
required
application/json

Request body

In the body, you should enter a list of key-value pairs. The keys and the values they take are described in the following table.

KeyDatatype of valueDescription of value
tags
required
StringKeywords which help you identify your files at a glance.

Example request body

["test 1b","my first project","CCLE"]

RESPONSE

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

Example response body

[
    "test 1b",
    "my first project",
    "CCLE"
]
Language