Skip to main content
GET
/
api
/
v2
/
teams
/
{teamKey}
/
roles
Get team custom roles
curl --request GET \
  --url https://app.launchdarkly.com/api/v2/teams/{teamKey}/roles \
  --header 'Authorization: <api-key>'
{
  "totalCount": 1,
  "items": [
    {
      "key": "role-key-123abc",
      "name": "Example role",
      "projects": {
        "totalCount": 1,
        "items": [
          {
            "_links": {
              "environments": {
                "href": "/api/v2/projects/example-project/environments",
                "type": "application/json"
              },
              "self": {
                "href": "/api/v2/projects/example-project",
                "type": "application/json"
              }
            },
            "key": "project-key-123abc",
            "name": "Example project"
          }
        ]
      },
      "appliedOn": "1648672018410"
    }
  ],
  "_links": {
    "self": {
      "href": "/api/v2/teams/example-team/roles?limit=25",
      "type": "application/json"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Path Parameters

teamKey
string<string>
required

The team key

Query Parameters

limit
integer<int64>

The number of roles 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 skips the first ten items and then returns the next items in the list, up to the query limit.

Response

Team roles response

totalCount
integer

The number of custom roles assigned to this team

Example:

1

items
object[]

An array of the custom roles that have been assigned to this team

The location and content type of related resources

Example:
{
"self": {
"href": "/api/v2/teams/example-team/roles?limit=25",
"type": "application/json"
}
}