Skip to main content
GET
/
api
/
svc
/
v1
/
teams
/
user
List teams
curl --request GET \
  --url https://{controlPlaneURL}/api/svc/v1/teams/user \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://{controlPlaneURL}/api/svc/v1/teams/user"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://{controlPlaneURL}/api/svc/v1/teams/user', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{controlPlaneURL}/api/svc/v1/teams/user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://{controlPlaneURL}/api/svc/v1/teams/user"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://{controlPlaneURL}/api/svc/v1/teams/user")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{controlPlaneURL}/api/svc/v1/teams/user")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "id": "jqfwg345gi25n5ju2yz5iz6m",
      "description": "<string>",
      "tenantName": "<string>",
      "accountId": "<string>",
      "createdBySubject": {
        "subjectId": "<string>",
        "subjectSlug": "<string>",
        "subjectDisplayName": "<string>",
        "subjectPatName": "<string>",
        "subjectControllerName": "<string>",
        "subjectExternalIdentitySlug": "<string>"
      },
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "manifest": {
        "type": "team",
        "name": "<string>",
        "members": [
          "<string>"
        ],
        "displayName": "<string>",
        "description": "<string>",
        "managers": [
          "<string>"
        ],
        "ownedBy": {
          "account": "<string>"
        },
        "tags": {},
        "identity_provider_mapping": [
          {
            "identity_provider": "<string>",
            "value": "<string>"
          }
        ]
      },
      "isEditable": true,
      "members": [
        "<string>"
      ],
      "metadata": {
        "createdByScim": true,
        "scimExternalId": "<string>"
      },
      "roles": [
        "<string>"
      ],
      "topMembers": [
        "<string>"
      ],
      "topManagers": [
        "<string>"
      ],
      "totalMemberCount": 123,
      "totalManagerCount": 123
    }
  ],
  "pagination": {
    "total": 100,
    "offset": 0,
    "limit": 10
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

limit
integer | null
default:100

Number of items per page

Required range: 1 <= x <= 1000
Example:

10

offset
integer | null
default:0

Number of items to skip

Required range: x >= 0
Example:

0

type
enum<string> | null

Filter teams by type.

Available options:
team,
sso-team
Example:

"team"

role
enum<string> | null

Filter to teams where the caller holds this role. manager returns teams the caller can manage (team managers and admins).

Available options:
manager
Example:

"manager"

attributes
string[] | null

Comma-separated list of attributes to return (e.g. id,teamName). When provided, only the specified fields are fetched. id is always included.

Example:

"id,teamName,manifest"

Response

200 - application/json

Paginated list of teams the caller has access to.

data
TeamDto · object[]
required

Array of teams matching the query.

pagination
Pagination · object
required

Pagination metadata.