List teams

GET
/api/v2/teams

Return a list of teams.

By default, this returns the first 20 teams. Page through this list with the limit parameter and by following the first, prev, next, and last links in the _links field that returns. If those links do not appear, the pages they refer to don’t exist. For example, the first and prev links will be missing from the response on the first page, because there is no previous page and you cannot return to the first page when you are already on the first page.

Filtering teams

LaunchDarkly supports the following fields for filters:

  • query is a string that matches against the teams’ names and keys. It is not case-sensitive.
    • A request with query:abc returns teams with the string abc in their name or key.
  • nomembers is a boolean that filters the list of teams who have 0 members
    • A request with nomembers:true returns teams that have 0 members
    • A request with nomembers:false returns teams that have 1 or more members

Expanding the teams response

LaunchDarkly supports expanding several fields in the “List teams” response. By default, these fields are not included in the response.

To expand the response, append the expand query parameter and add a comma-separated list with any of the following fields:

  • members includes the total count of members that belong to the team.
  • roles includes a paginated list of the custom roles that you have assigned to the team.
  • roleAttributes includes a list of the role attributes that you have assigned to the team.
  • projects includes a paginated list of the projects that the team has any write access to.
  • maintainers includes a paginated list of the maintainers that you have assigned to the team.

For example, expand=members,maintainers includes the members and maintainers fields in the response.

Query parameters

limitlongOptional

The number of teams to return in the response. Defaults to 20.

offsetlongOptional

Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next limit items.

filterstringOptional

A comma-separated list of filters. Each filter is constructed as field:value.

expandstringOptional

A comma-separated list of properties that can reveal additional information in the response.

Response

Teams collection response

itemslist of objects

An array of teams

totalCountintegerOptional

The number of teams

Errors

Built with