LemursEye
Documentation
API

List roles and permissions

GEThttps://lemurseye.com/api/v1/roles

Returns 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 (tenant or platform) and a readable label.

  • roles[].idstring

    The role's id, used in the paths below (owner, manager, ...).

  • roles[].namestring

    Display name.

  • roles[].descriptionstring

    What the role is for.

  • roles[].scopestring

    tenant (yours to give) or platform (LemursEye staff only).

  • roles[].permissionsstring[]

    The permission keys the role holds in your company.

  • roles[].userCountinteger

    How many people hold it.

  • roles[].customisedboolean

    true when 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.