List members of a project

This call returns a list of the members of the specified project. For each member, the response lists:

  • The member's username on the Seven Bridges Platform
  • The member's permissions in the project specified

👍

Project member permissions

For information about the permissions project members may have, see the documentation on setting permissions.

Request

https://api.sbgenomics.com/v2/projects/{owner}/{project}/members
https://eu-api.sbgenomics.com/v2/projects/{owner}/{id}/members

Example request

GET /v2/projects/rfranklin/my-project/members 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"
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
members = project.get_members()

for member in members:
    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

The ID of the project you are querying.

owner

The owner of the project you are querying.

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-project/members?offset=0&limit=50",
    "items": [
        {
            "href": "https://api.sbgenomics.com/v2/projects/rfranklin/my-project/members/jdoe",
            "id": "jdoe",
            "username": "jdoe",
            "email": "[email protected]",
            "type": "USER",
            "permissions": {
                "write": true,
                "read": true,
                "copy": true,
                "execute": true,
                "admin": true
            }
        },
        {
            "href": "https://api.sbgenomics.com/v2/projects/rfranklin/my-project/members/john.smith",
            "id": "john.smith",
            "username": "john.smith",
            "email": "[email protected]",
            "type": "USER",
            "permissions": {
                "write": true,
                "read": true,
                "copy": true,
                "execute": true,
                "admin": false
            }
        },
        {
            "href": "https://api.sbgenomics.com/v2/projects/rfranklin/my-project/members/francis.crick",
            "id": "fcrick",
            "username": "fcrick",
            "email": "[email protected]",
            "type": "USER",
            "permissions": {
                "write": true,
                "read": true,
                "copy": true,
                "execute": true,
                "admin": false
            }
        }
    ],
    "links": []
}