List roles and permissions
https://lemurseye.com/api/v1/rolesReturns the permission catalog and every role with the permissions it holds in your company: the grid behind the console's Roles page.
Roles with scope: "tenant" are the ones you can give people: owner, manager, viewer, installer (each explained in People and roles). A platform role is LemursEye staff's and can never be given.
Permission: users:read or roles:manage. The token is sent as Authorization: Bearer <token>; see Authentication.
Response
200 The catalog and the roles.
Response fields
permissions[]object[]Every permission:
key(as used everywhere, e.g.fleet:write),resource,action,scope(tenantorplatform) and a readablelabel.roles[].idstringThe role's id, used in the paths below (
owner,manager, ...).roles[].namestringDisplay name.
roles[].descriptionstringWhat the role is for.
roles[].scopestringtenant(yours to give) orplatform(LemursEye staff only).roles[].permissionsstring[]The permission keys the role holds in your company.
roles[].userCountintegerHow many people hold it.
roles[].customisedbooleantruewhen your company changed it from the default.
Errors
Where a message is listed, it comes back as JSON: { "error": "..." }. Otherwise only the status code is returned.
- 401
No token, or it has expired.
- 403
The token has none of
users:read,roles:manage.