Add a dataset member

/files

/datasets/{owner}/{dataset}/members

For general information on the API, including formatting, parameters, and pagination, please see the API Overview.

❗️

Heads Up!

This page documents the Advance Access version (think "beta" but with fewer bugs) of the folders functionality.

This call adds a new member to the specified dataset and sets their permissions for that dataset. To add a member, you need to have admin permissions for the dataset.

Members may have the following permissions:

  • Read
  • Write
  • Copy
  • Execute
  • Admin
https://cavatica-api.sbgenomics.com/v2/datasets/{owner}/{dataset}/members

Request

Example request

POST /v2/datasets/rfranklin/pcgc-chd-pa-01/members
Host: cavatica-api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
Content-Type: application/json
X-SBG-advance-access: advance
curl -X POST -H "X-SBG-Auth-Token: 5f2d7a4d8186488694fa3dc3844b7b06" -H "x-sbg-advance-access: advance" -H "Content-Type: application/json" -d '{
    "username": "john_smith",
    "permissions": {
        "write": true,
        "read": true,
        "copy": false,
        "execute": true,
        "admin": false
    }
}   ' "https://cavatica-api.sbgenomics.com/v2/datasets/rfranklin/pcgc-chd-pa-01/members/"

📘

Requests to add a dataset member must include the key permissions. However, if you do not include a value for some permission, it will be set to false by default.

The exception to this rule is read permission, which is the default permission for a dataset. It enables a user to read dataset data, including file names, but not access file contents.

Header fields

NameDescription
X-SBG-Auth-Token
required
Your CAVATICA authentication token.
Content-Type
required
application/json
X-SBG-Advance-Access
required
advance

Path parameters

NameDescription
ownerThe owner of the dataset you are adding a member to.
datasetThe name of the dataset you are adding a member to.

Request body

Inside the body of the call you should enter the following set of key-value pairs.

KeyDatatype of valueDescription of value
usernamestringCAVATICA username of the member you want to add to the dataset.
permissionsArray of key-value pairs. The keys are strings, and the values are Booleans.The possible keys are:

"write"
"read"
"copy"
"execute"
"admin"

Each key may have the values true or false.

📘

Read permissions

All members of a dataset have read permissions by default. Even if you try setting read permissions to false, they will still default to true.

Example request body

{
    "username" : "john_smith",
    "permissions": {
       "write": true,
       "read": true,
       "copy": false,
       "execute": true,
       "admin": false
    }
}

Response

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

Example response body

{
  "href": "http://cavatica-api.sbgenomics.com/v2/datasets/rfranklin/pcgc-chd-pa-01/members/john_smith",
  "username": "john_smith",
  "permissions": {
    "write": true,
    "read": true,
    "copy": false,
    "execute": true,
    "admin": false
  }
}
Language