Roles

List roles

Returns all roles, including their names and their unique identifiers.

get/api/v2/roles

Request

  • Base URL
    https://api.datadoghq.com
  • URL
    https://api.datadoghq.com/api/v2/roles
  • Auth
    • API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
    • or OAuth 2
      Authorization code: /oauth2/v1/authorize
      Token URL: /oauth2/v1/token scopes: user_access_read

Query parameters

page[size]integer
Example:10

Size for a given page. The maximum allowed value is 100.

page[number]integer

Specific page number to return.

sort'name' | '-name' | 'modified_at' | '-modified_at' | 'user_count' | '-user_count'

Sorting options for roles.

Sort roles depending on the given field. Sort order is ascending by default. Sort order is descending if the field is prefixed by a negative sign, for example: sort=-name.

filterstring

Filter all roles by the given string.

filter[id]string

Filter all roles by the given list of role IDs.

Response

OK

Example response

{
  "data": [
    {
      "relationships": {
        "permissions": {
          "data": [
            {
              "type": "permissions"
            }
          ]
        }
      },
      "type": "roles"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.