Herald
OpenapiUser

Get the current user's roles and permissions

Returns all roles (role names) and permissions (permission names) of the currently logged-in user. Returns the roles and permissions the user actually holds, without expanding the full set of realm permission definitions.

GET
/api/user/roles

Returns all roles (role names) and permissions (permission names) of the currently logged-in user. Returns the roles and permissions the user actually holds, without expanding the full set of realm permission definitions.

Response Body

User roles and permissions retrieved

application/json
  1. response
permissions*array<string>
roles*array<string>
Example Request
curl -X GET 'https://example.com/api/user/roles'
Example Response
{
  "permissions": [
    "string"
  ],
  "roles": [
    "string"
  ]
}