Permissions
Global permission management and superuser access.
GET /api/users/{username}/global-permissions
Get a user's global permissions.
Authentication: Required
Permissions: tenant:superuser
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
username | string | Username |
Response:
An object mapping each registered global-permission key to a boolean.
{
"_links": {
"self": {
"href": "https://informer.example.com/api/users/annie.larson/global-permissions"
}
},
"jobCreation": true,
"viewAllTeams": false,
"viewAllUsers": true,
"billingManage": false,
"apiTokenCreation": true,
"painlessScriptCreation": false
}
PUT /api/users/{username}/global-permissions
Set a user's global permissions. Only known permission keys are accepted; unknown keys are stripped, and omitted keys keep their current value.
Authentication: Required
Permissions: tenant:superuser
Request Body:
An object of { permissionKey: boolean }. See Global Permission Keys below.
{
"apiTokenCreation": true,
"jobCreation": true,
"viewAllUsers": true
}
{
"_links": {
"self": {
"href": "https://informer.example.com/api/users/annie.larson/global-permissions"
}
},
"apiTokenCreation": true,
"jobCreation": true,
"viewAllUsers": true
}
Use Case:
Grant or revoke global capabilities for a user.
Superuser Management
GET /api/users/{username}/superuser
Check whether a user has superuser privileges.
Permissions: tenant:superuser
Response:
A bare boolean.
false
PUT /api/users/{username}/superuser
Grant (or clear) superuser privileges. The caller must already be a superuser, and the admin account's status cannot be changed through this route.
Permissions: tenant:superuser
Request Body:
| Field | Type | Description |
|---|---|---|
superuser | boolean | Whether the user is a superuser |
{
"superuser": true
}
{
"_links": {
"self": {
"href": "https://informer.example.com/api/users/annie.larson/superuser"
}
},
"superuser": true
}
DELETE /api/users/{username}/superuser
Revoke superuser privileges.
Permissions: tenant:superuser
Response:
Responds 200 with an empty body.
Global Permission Keys
The keys accepted by the global-permissions endpoints:
| Key | Description |
|---|---|
viewAllUsers | View all users in the tenant |
viewAllTeams | View all teams in the tenant |
apiTokenCreation | Create API tokens |
jobCreation | Create jobs |
billingManage | Manage billing and subscriptions |
painlessScriptCreation | Author Painless scripts |