Teams (beta)

A team is a group of members in your LaunchDarkly account. A team can have maintainers who are able to add and remove team members. It also can have custom roles assigned to it that allows shared access to those roles for all team members.

The Teams API allows you to create, read, update, and delete a team.

List 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 returned _links field. These links are not present if 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.

Filtering teams

LaunchDarkly supports the query field for filtering. query is a string that matches against the teams' names and keys. It is not case sensitive. For example, the filter query:abc matches teams with the string abc in their name or key.

Request
Security:
ApiKey (readwrite)
query Parameters
limit
integer <int64>

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

offset
integer <int64>

Where to start in the list. This is for use with pagination. For example, an offset of 10 would skip the first ten items and then return the next limit items.

filter
string <string>

A comma-separated list of filters. Each filter is of the form field:value. Supported fields are explained above.

Responses
200

Teams collection response JSON

401

Invalid access token

405

Method not allowed

429

Rate limited

get/api/v2/teams
Request samples
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/teams \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "items": [
    ],
  • "_links": {
    },
  • "totalCount": 0
}

Create team

Create a team

Request
Security:
ApiKey (readwrite)
Request Body schema: application/json
customRoleKeys
Array of strings

List of custom role keys the team will access

description
string

A description of the team

key
required
string

The team's key or ID

memberIDs
Array of strings

A list of member IDs who belong to the team

name
required
string

A human-friendly name for the team

Array of objects (PermissionGrantInput)

A list of permission grants to apply to the team. Can use "maintainTeam" to add team maintainers

Responses
201

Successful teams response

400

Invalid request

401

Invalid access token

405

Method not allowed

429

Rate limited

post/api/v2/teams
Request samples
application/json
{
  • "customRoleKeys": [
    ],
  • "description": "string",
  • "key": "string",
  • "memberIDs": [
    ],
  • "name": "string",
  • "permissionGrants": [
    ]
}
Response samples
application/json
{
  • "customRoleKeys": [
    ],
  • "description": "string",
  • "key": "string",
  • "memberIDs": [
    ],
  • "name": "string",
  • "permissionGrants": [
    ],
  • "projectKeys": [
    ],
  • "_access": {
    },
  • "_createdAt": 0,
  • "_links": {
    },
  • "_updatedAt": 0,
  • "_version": 0
}

Get team

Fetch a team by key

Request
Security:
ApiKey (readwrite)
path Parameters
key
required
string <string>

The team key

Responses
200

Team response JSON

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

405

Method not allowed

429

Rate limited

get/api/v2/teams/{key}
Request samples
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/teams/:key \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "customRoleKeys": [
    ],
  • "description": "string",
  • "key": "string",
  • "memberIDs": [
    ],
  • "name": "string",
  • "permissionGrants": [
    ],
  • "projectKeys": [
    ],
  • "_access": {
    },
  • "_createdAt": 0,
  • "_links": {
    },
  • "_updatedAt": 0,
  • "_version": 0
}

Update team

Perform a partial update to a team.

The body of a semantic patch request takes the following three properties:

  1. comment string: (Optional) A description of the update.
  2. instructions array: (Required) The action or list of actions to be performed by the update. Each update action in the list must be an object/hash table with a kind property, although depending on the action, other properties may be necessary. Read below for more information on the specific supported semantic patch instructions.

If any instruction in the patch encounters an error, the error will be returned and the flag will not be changed. In general, instructions will silently do nothing if the flag is already in the state requested by the patch instruction. They will generally error if a parameter refers to something that does not exist. Other specific error conditions are noted in the instruction descriptions.

Instructions

addCustomRoles

Adds custom roles to the team. Team members will have these custom roles granted to them.

Parameters
  • values: list of custom role keys

removeCustomRoles

Removes the custom roles on the team. Team members will no longer have these custom roles granted to them.

Parameters
  • values: list of custom role keys

addMembers

Adds members to the team.

Parameters
  • values: list of member IDs

removeMembers

Removes members from the team.

Parameters
  • values: list of member IDs

addPermissionGrants

Adds permission grants to members for the team, allowing them to, for example, act as a team maintainer. A permission grant may have either an actionSet or a list of actions but not both at the same time. The members do not have to be team members to have a permission grant for the team.

Parameters
  • actionSet: name of the action set
  • actions: list of actions
  • memberIDs: list of member IDs

removePermissionGrants

Removes permission grants from members for the team. The actionSet and actions must match an existing permission grant.

Parameters
  • actionSet: name of the action set
  • actions: list of actions
  • memberIDs: list of member IDs

updateDescription

Updates the team's description.

Parameters
  • value: the team's new description

updateName

Updates the team's name.

Parameters
  • value: the team's new name
Request
Security:
ApiKey (readwrite)
path Parameters
key
required
string <string>

The team key

Request Body schema: application/json
Comment
string
Array of objects (Instructions)
Responses
200

Teams collection response JSON

400

Invalid request

401

Invalid access token

404

Invalid resource identifier

405

Method not allowed

409

Status conflict

429

Rate limited

patch/api/v2/teams/{key}
Request samples
application/json
{
  • "Comment": "string",
  • "Instructions": [
    ]
}
Response samples
application/json
{
  • "items": [
    ],
  • "_links": {
    },
  • "totalCount": 0
}

Delete team

Delete a team by key

Request
Security:
ApiKey (readwrite)
path Parameters
key
required
string <string>

The team key

Responses
204

Action succeeded

401

Invalid access token

404

Invalid resource identifier

429

Rate limited

delete/api/v2/teams/{key}
Request samples
curl -i -X DELETE \
  https://app.launchdarkly.com/api/v2/teams/:key \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "code": "unauthorized",
  • "message": "invalid key"
}