Modify a project member's permissions

projects/{project_owner}/{project}/members/{member}/permissions

This call edits a user's permissions in a specified project. It can only be successfully made by a user who has admin permissions in the project.

https://cgc-api.sbgenomics.com/v2/projects/{project_owner}/{project}/members/{member}/permissions

Request

Example request

PATCH /v2/projects/RFranklin/test/members/crick/permissions HTTP/1.1
Host: cgc-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
curl --data '{"write": true}'  -s -H "X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74" -H "content-type: application/json" -X PATCH "https://cgc-api.sbgenomics.com/v2/projects/RFranklin/test/members/crick/permissions"

Header Fields

NameDescription
X-SBG-Auth-Token
required
Your CGC authentication token.

Path parameters

NameDescription
projectThe short name of the project containing the project member.
project_ownerThe owner of the project containing the project member.
memberThe project member whose permissions you are editing.

Query parameters

NameData typeDescription
fieldsstringSelector 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.

KeyData type of valueDescription of value
readBoolean: true or falseUser can view file names, metadata, and workflows. They cannot view file contents.

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.
writeBoolean: true or falseUser can add, modify, and remove files and workflows in a project.

Set value to true to assign the user copy permission. Set to false to remove copy permission.
copyBoolean: true or falseUser can view file content, copy, and download files from a project.

Set value to true to assign the user copy permission. Set to false to remove copy permission.
executeBoolean: true or falseUser can execute workflows and abort tasks in a project.

Set value to true to assign the user copy permission. Set to false to remove copy permission.
adminBoolean: true or falseUser can modify another user's permissions on a project, add or remove people from the project and manage funding sources. They also have all of the above permissions.

Set value to true to assign the user copy permission. Set to false to remove copy permission.

Example request body

{
      "write": true,
}

Response

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

Example response body

{
  "write": true,
  "read": true,
  "copy": false,
  "execute": false,
  "admin": false
}
Language