get /roles

Get the roles.

Returns the list of all roles.

Query parameters

offset (optional)
The number of entries to skip. Default is 0.
limit (optional)
The maximum number of entries to return. Default is 50.
sort (optional)

A comma separated list of fields to use for sorting the entries. Allowed field values are "name" and "description". Fields can be prefixed by "+" and "-" to indicate, respectively, ascending and descending order. Default is -created.

Usage example: /roles?sort=+name,-description

appId (optional)
The ID of the app to filter on.
rolename (optional)
The role name to use as a filter.
enabled (optional)
Indicates whether to retrieve the active roles (true) or inactive roles (false).

Return type

RoleListResponse

Example data

Content-Type: application/json

{ "data" : { "totalItems" : 0, "offset" : 6, "limit" : 1, "items" : [ { "hasAllActions" : true, "isSystemRole" : true, "hasAllApps" : true, "name" : "name", "description" : "description", "id" : "00000000-0000-0000-0000-000000000000", "enabled" : true }, { "hasAllActions" : true, "isSystemRole" : true, "hasAllApps" : true, "name" : "name", "description" : "description", "id" : "00000000-0000-0000-0000-000000000000", "enabled" : true } ] } }

Responses

200
Success. A paginated list of roles is returned.

400
The query string is malformed.