List all your divisions

v2/divisions

This call returns a list of all divisions you are a member of. Each divison's ID, name and URL on the Seven Bridges Platform will be returned.

Request

https://api.sbgenomics.com/v2/divisions
https://eu-api.sbgenomics.com/v2/divisions

Example request

GET /v2/divisions HTTP/1.1
Host: api.sbgenomics.com
Content-type: application/json
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
curl -X GET \
  https://api.sbgenomics.com/v2/divisions \
  -H 'content-type: application/json' \
  -H 'x-sbg-advance-access: advance' \
  -H 'x-sbg-auth-token: 3259c50e1ac5426ea8f1273259740f74'
from sevenbridges import Api

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

# send GET request to SB API
divisions = api.divisions.query()

for division in divisions:
    print(division.id, division.name)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Content-Type
required

application/json

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": "http://api.sbgenomics.com/v2/divisions?offset=0&limit=4",
  "items": [
    {
      "href": "http://api.sbgenomics.com/v2/divisions/my-division",
      "id": "my-division",
      "name": "My Division"
    },
    {
      "href": "http://api.sbgenomics.com/v2/divisions/my-division-3",
      "id": "my-division-3",
      "name": "My Division 3"
    },
    {
      "href": "http://api.sbgenomics.com/v2/divisions/my-division-2",
      "id": "my-division-2",
      "name": "My Division 2"
    },
    {
      "href": "http://api.sbgenomics.com/v2/divisions/my-division-4",
      "id": "my-division-4",
      "name": "My Division 4"
    }
  ],
  "links": []
}