View as Markdown

Roles

v1 has two roles. An admin administers the tenant and sees everything in it. A user sees what their access points open and does what their groups give. Aleta's staff are not users of your tenant: Aleta works with its fleet key.

The list is fixed and has no history. Both routes need access:read.

The role

idstring

admin or user. A user's role and an invite's role take these ids.

namestring

Admin or User.

descriptionstring

What the role may do.


GET/v1/roles

List roles

Both roles, in the standard v1 list envelope, on one page: limit is the number of roles and next_cursor is null.

Request
GET/v1/roles
curl https://api.aleta.ai/v1/roles \
  -H "Authorization: Bearer {access_token}"
Response
{
  "data": [
    {
      "id": "admin",
      "name": "Admin",
      "description": "Administers the tenant and sees everything in it. Only admins invite users and create API keys. Admins are not members of groups."
    },
    {
      "id": "user",
      "name": "User",
      "description": "Works in the tenant. What a user can see and do comes from the user's groups and access points."
    }
  ],
  "next_cursor": null,
  "limit": 2
}

GET/v1/roles/{id}

Retrieve a role

One role by its exact, case-sensitive id (admin or user); any other id is 404 not_found.

Request
GET/v1/roles/{id}
curl https://api.aleta.ai/v1/roles/admin \
  -H "Authorization: Bearer {access_token}"
Response
{
  "id": "admin",
  "name": "Admin",
  "description": "Administers the tenant and sees everything in it. Only admins invite users and create API keys. Admins are not members of groups."
}