Get a project member's permissions

This returns the permissions of a specified user within a specified project.

Users may have the following permissions on the Seven Bridges Platform:

  • Read
  • Write
  • Copy
  • Execute
  • Admin

Permissions are granted at the project-level. You may, for instance, have admin permission in one project, execute permission in another, and read-only permission in a third.

For more information on permissions on the Seven Bridges Platform, see the documentation on setting permissions.

Request

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

Example request

GET /v2/projects/rfranklin/my-project/members/jane_doe HTTP/1.1
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
curl -s -H "X-SBG-Auth-Token: 6282d5e2121d43e7900e9d52b15845e7" -H "content-type: application/json" -X GET "https://api.sbgenomics.com/v2/projects/rfranklin/my-project/members/Jane_Doe"
from sevenbridges import Api

api = Api(url='https://api.sbgenomics.com/v2',
          token='3259c50e1ac5426ea8f1273259740f74')

project = api.projects.get(id='rfranklin/my-project')

# send GET request to SB API
member = project.get_member(username='jane_doe')

print(member.username, member.permissions)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Path parameters

Name

Description

project_owner
required

The Seven Bridges Platform username of the user who owns the project.

project
required

The short name of the project to access.

username
required

The Seven Bridges Platform username of the user whose permissions you are enquiring about.

Query parameters

Name

Data type

Description

fields

string

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

Response

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

Example response body

{
    "href": "https://api.sbgenomics.com/v2/projects/rfranklin/my-project1/members/Jane_Doe",
    "username": "Jane_Doe",
    "email: "[email protected]",
    "permissions": {
        "write": true,
        "read": true,
        "copy": false,
        "execute": true,
        "admin": false
    }
}