Add a member to a project

/projects/{project_owner}/{project}/members

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

This call adds a new user to a specified project. It can only be successfully made by a user who has admin permissions in the project.

Users may have the following permissions on CAVATICA:

  • Read
  • Write
  • Copy
  • Execute
  • Admin

For more information, see the documentation on setting project member permissions. Note that some user permissions imply others: for example, if you give a user admin permission, then they automatically receive read, write, copy and execute permissions.

https://cavatica-api.sbgenomics.com/v2/projects/{project_owner}/{project}/members

Request

Example request

POST /v2/projects/rjfranklin/my-project/members HTTP/1.1
Host: cavatica-api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
curl --data '{"username": "Jane-Doe", "permissions": { "read": true, "write": true, "execute": false}}' -s -H "X-SBG-Auth-Token: 6282d5e2121d43e7900e9d52b15845e7" -H "content-type: application/json" -X POST "https://cavatica-api.sbgenomics.com/v2/projects/RFranklin/my-project/members"

šŸ‘

Member permissions

Requests to add a project 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 the read permission, which is the default permission on a project. It enables a user to read project data, including file names, but access file contents.

For more information, see the documentation on setting permissions.

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your CAVATICA authentication token.

Path parameters

Name

Description

project

The ID of the project you are adding someone to.

project_owner

The owner of the project you are adding someone to.

Query parameters

Name

Data type

Description

fields

string

Selector specifying a subset of fields to include in the response.

Request body

Inside the body of the call you should enter a set of key-value pairs. The following table describes the values you should enter.

Key

Datatype of value

Description of value

username

string

The CAVATICA username of the person you want to add to the project

permissions

array 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 project have read permissions by default. Even if you try setting read permissions to false, they will still default to true.

Example request body

{
    "username" : "Jane_Doe",
    "permissions": {
        "read" : true,
        "write": true,
        "execute": false
    }
}

Response

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

Example response body

{
    "href": "https://cavatica-api.sbgenomics.com/v2/projects/RFranklin/my-project/members/Jane_Doe",
    "username": "Jane_Doe",
    "permissions": {
        "write": true,
        "read": true,
        "copy": false,
        "execute": true,
        "admin": false
    }
}

Language
Click Try It! to start a request and see the response here!