POST
/v1/mgmt/role/search

Search roles, using a valid management key.

This API endpoint allows administrators to search against existing roles.

This endpoint returns an array of roles including their name, description, and permissionsNames that match the search parameters.

See also

Endpoint Authentication

Use authorization bearer header with the following format:

Authorization: Bearer \<ProjectId:ManagementKey\>

Try it

/v1/mgmt/role/search

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

< Project ID >:< Management Key > as bearer

In: header

Request Body

tenantIdsarray<string>

roleNamesarray<string>

roleNameLikestring

permissionNamesarray<string>

textstring

Full text search across relevant columns

sortarray<object>

Status codeDescription
200OK
curl -X POST "https://api.descope.com/v1/mgmt/role/search" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ProjectId:ManagementKey>" \
  -d '{
  "tenantIds": [
    "string"
  ],
  "roleNames": [
    "string"
  ],
  "roleNameLike": "string",
  "permissionNames": [
    "string"
  ],
  "text": "string",
  "sort": [
    {
      "field": "string",
      "desc": true
    }
  ]
}'

{
  "roles": [
    {
      "name": "string",
      "description": "string",
      "permissionNames": [
        "string"
      ],
      "createdTime": 0,
      "tenantId": "string"
    }
  ]
}

Was this helpful?