Roles

Get roles with filters and pagination.

get/api/roles

Request

  • Base URL: https://[tenant_id].logto.app
  • URL: https://[tenant_id].logto.app/api/roles
  • Auth: OAuth 2 (client credentials, token URL /oidc/token, scopes: all)

Query parameters

excludeUserIdstring

Exclude roles assigned to a user.

excludeApplicationIdstring

Exclude roles assigned to an application.

type'User' | 'MachineToMachine'

Filter by role type.

pageinteger

Page number (starts from 1).

page_sizeinteger

Entries per page.

search_paramsobject

Search query parameters.

Response

An array of roles matching the filters.

tenantIdstring required
idstring required
namestring required
descriptionstring required
type'User' | 'MachineToMachine' required
isDefaultboolean required
usersCountnumber required
applicationsCountnumber required

Changes

    • breaking

      the /// response property's maxLength was increased from 12 to 128 for the response status