v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
Teams

Get team custom roles

Fetch the custom roles that have been assigned to the team. To learn more, read Managing team permissions.

get/api/v2/teams/{teamKey}/roles

Path parameters

teamKeystring string required

The team key

The team key

Query parameters

limitinteger

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

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

offsetinteger

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.

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

totalCountinteger

The number of custom roles assigned to this team

_linksobject

The location and content type of related resources

Example response

{
  "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"
          }
        ]
      }
    }
  ],
  "_links": {
    "self": {
      "href": "/api/v2/teams/example-team/roles?limit=25",
      "type": "application/json"
    }
  }
}