# Get roles **GET /api/roles** Get roles with filters and pagination. ## Servers - Logto endpoint address.: https://[tenant_id].logto.app (Logto endpoint address.) ## Authentication methods - O auth2 ## Parameters #### Query parameters - **excludeUserId** (string) Exclude roles assigned to a user. - **excludeApplicationId** (string) Exclude roles assigned to an application. - **type** (string) Filter by role type. - **page** (integer) Page number (starts from 1). - **page_size** (integer) Entries per page. - **search_params** (object) Search query parameters. ## Responses ### 200: An array of roles matching the filters. #### Body Parameters: application/json (array[object]) - **tenantId** (string) - **id** (string) - **name** (string) - **description** (string) - **type** (string) - **isDefault** (boolean) - **usersCount** (number) - **featuredUsers** (array[object]) - **applicationsCount** (number) - **featuredApplications** (array[object]) ### 400: Bad Request ### 401: Unauthorized ### 403: Forbidden [Powered by Bump.sh](https://bump.sh)