Query parameters
-
excludeUserId
string Exclude roles assigned to a user.
-
excludeApplicationId
string Exclude roles assigned to an application.
-
type
string Filter by role type.
Values are
User
orMachineToMachine
. -
page
integer Page number (starts from 1).
Minimum value is
1
. Default value is1
. -
page_size
integer Entries per page.
Minimum value is
1
. Default value is20
. -
search_params
object Search query parameters.
GET
/api/roles
curl \
--request GET 'https://[tenant_id].logto.app/api/roles' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
[
{
"tenantId": "string",
"id": "string",
"name": "string",
"description": "string",
"type": "User",
"isDefault": true,
"usersCount": 42.0,
"featuredUsers": [
{
"id": "string",
"avatar": "string",
"name": "string"
}
],
"applicationsCount": 42.0,
"featuredApplications": [
{
"id": "string",
"name": "string",
"type": "Native"
}
]
}
]