User role resources


Get user roles

GET /users/:ID/roles

Returns all roles that are assigned to the specified user. It's not guaranteed that the user is eligible for all assigned roles in the network context. For example, evaluation of roles may be influenced by Data Privacy Agreement (GDPR) settings or OnBehalf Access.

API authorization

Clients are recommended to work with the evaluated user roles endpoint, if effective role-assignments need to be known before doing an API request. Authorization on API requests are always checked against evaluated roles.

Get my user roles

Returns all roles that are assigned to the user of the current session.

GET /users/me/roles

Response

[
  "user",
  "manager",
  "admin"
]


Get evaluated roles

Returns all roles the user is eligible for in the network context. This can depend on network settings such as Data Privacy Agreement (GDPR)

GET /users/:ID/roles/evaluated

Get my evaluated roles

Returns all roles the user of the current session is eligible for in the network context.

GET /users/me/roles/evaluated

Response

[
  "user-limited"
]


Set roles

Set a list of roles for a user. To see a list of all available roles see Concepts|Roles

PUT /users/:ID/roles

INFO:Setting the roles replaces all existing roles!

Json Payload

[
  "user",
  "manager"
]

Response

[
  "user",
  "manager"
]

Get all roles

GET /roles

Retrieve a list of all available roles.

Response

[
  "user",
  "manager",
  "admin",
  ...
]