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
idstringadminoruser. A user'sroleand an invite'sroletake these ids.namestringAdminorUser.descriptionstringWhat the role may do.
GET
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
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
Retrieve a role
One role by its exact, case-sensitive id (admin or user); any other id is 404 not_found.
Request
GET
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."
}