List Teams
GET /teams
GET /teamsInteractive request editor loads with JavaScript.
Authorization
BearerAdminToken Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.
In: header
Query Parameters
1-based page number. Requires page_size on the same
request.
1 <= value <= 10000000Page size. Values above 200 are clamped to 200. Omit to return the full list.
1 <= valueResponse Body
application/json
application/json
application/json
curl -X GET "$AISIX_CP/teams" \ -H "Authorization: Bearer $AISIX_TOKEN"OK
{
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
"display_name": "string",
"description": "string",
"created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"member_count": 0
}
],
"total": 0,
"page": 0,
"page_size": 0
}Request body or parameters failed validation.
{
"error": {
"code": "string",
"message": "string"
}
}Missing or invalid bearer.
{
"error": {
"code": "UNAUTHENTICATED",
"message": "no org context"
}
}Complete operation details and schema variants
GET /teams
List Teams
List the organization's teams, each with its current member
count. Pagination is opt-in: omit page_size to get every team
in one response. page is only meaningful together with
page_size and is rejected without it.
Parameters
-
page(query, integer, optional): 1-based page number. Requirespage_sizeon the same request. -
page_size(query, integer, optional): Page size. Values above 200 are clamped to 200. Omit to return the full list.
Responses
-
200: OK -
data(array, required): -
data[].id(string, required): Team ID. -
data[].org_id(string, required): Organization that owns the team. -
data[].display_name(string, required): Team name, unique within the organization. -
data[].description(string, required): Free-text description. Empty when unset. -
data[].created_by(string, required): User who created the team. -
data[].created_at(string, required): -
data[].updated_at(string, required): -
data[].member_count(integer, required): Members currently on the team. -
total(integer, required): Teams matching across all pages. Equals the length ofdatafor an unpaged request. -
page(integer, required): -
page_size(integer, required): Page size actually applied, after clamping.0when the request was unpaged. -
400: Request body or parameters failed validation. -
error(object, required): Error details. -
error.code(string, required): Machine-readable identifier. Examples:UNAUTHENTICATED,INVALID_REQUEST,MASTER_KEY_UNSET,INTERNAL. -
error.message(string, required): Human-readable explanation; safe to surface to operators. -
401: Missing or invalid bearer. Response fields (application/json): identical toGET /teams, response 400 above.
cURL
curl -X GET '$AISIX_CP/teams' -H 'Authorization: Bearer $AISIX_TOKEN'