/projects/{project_owner}/{project}/members
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 the CGC:
- 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.
Request
Example request
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 tofalse
by default. The exception to this rule is theread
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 CGC 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 CGC 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 settingread
permissions tofalse
, they will still default totrue
.
Example request body
Response
See a list of CGC-specific response codes that may be contained in the body of the response.