List all your teams in a division

This call returns a list of all teams in a division that you are a member of. Each team's ID, name as well as your role in the team will be returned. To list all teams in your division regardless of whether you're a member or not, use the query parameter _all (see below).

Request

https://api.sbgenomics.com/v2/divisions/{division_id}/teams
https://eu-api.sbgenomics.com/v2/divisions/{division_id}/teams

Example request

GET /v2/divisions/my-division/teams 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/my-division/teams \
  -H 'cache-control: no-cache' \
  -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')

division = api.divisions.get(id='my-division')

# send GET request to SB API
teams = division.get_teams()

for team in teams:
    print(team.id, team.name)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Content-Type
required

application/json

Query parameters

Name

Data type

Description

division_id
required

string

The ID of the division you are querying.

_all

boolean

This field can be true or false. Set this field to true if you want to list all teams within the division (regardless of whether you are a member of a team or not).

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": "api.sbgenomics.com/v2/teams?division=my-division&offset=0&limit=3",
  "items": [
    {
      "href": "api.sbgenomics.com/v2/teams/232c475c-a3a0-4127-92b5-f545829ec213",
      "id": "232c475c-a3a0-4127-92b5-f545829ec213",
      "name": "My team",
    },
    {
      "href": "api.sbgenomics.com/v2/teams/924646fe-fe78-45b2-a20a-f473a8dcfe7b",
      "id": "924646fe-fe78-45b2-a20a-f473a8dcfe7b",
      "name": "My team 2"
    },
    {
      "href": "api.sbgenomics.com/v2/teams/044825c1-ff50-4766-b081-283880be146f",
      "id": "044825c1-ff50-4766-b081-283880be146f",
      "name": "My team 3"
    }
  ],
  "links": []
}