Docs

Query teams

POST
/teams/query

Returns the teams of a project, paginated with a cursor.

project_id names the project to list; without it, the credential's own project is listed.

Authorization

headerAuthorizationBearer <token>

Scope: team.read

Query Parameters

project_id?string

The project the request addresses. Omit it to address the credential's own project.

Match^[a-zA-Z0-9_-]+$

Request Body

Request to query the teams of a project.

application/json
  1. body

Request to query the teams of a project.

limit?limit
Range1 <= value <= 100
Default20
page_token?|

Token to retrieve the next page of results. Must be sent with the same sorting as the request that issued the token. Omitting sorting reuses the default sort and only succeeds when that default matches the token.

sorting?
filter?array<>

Filter criteria for querying teams.

Response Body

The list of teams was returned successfully

application/json
  1. response

Paginated list of teams.

teams*array<>
next_page_token?|

Token to pass as page_token in the next request to fetch the following page. Absent when there are no more results. The follow-up request must repeat the same sorting that produced this token (omit only when both pages use the default).

Example Request
import { configureZitadel, getApi } from "@zitadel/api/config";// In the browser, through the SDK proxy: the session cookie authenticates the call.const client = getApi(configureZitadel({ projectId: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" }));const teams = await client.queryTeams({});
Example Response
{  "teams": [    {      "id": "string",      "name": "string",      "status": "active",      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "next_page_token": "string"}

Was this helpful?