Skip to main content

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:

ParameterTypeDescription
usernamestringUsername

Response:

An object mapping each registered global-permission key to a boolean.

Get global permissionsGET /api/users/annie.larson/global-permissions
The full permission map for the user, every registered key resolved to a boolean.
Response · 200
{
"_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
}
Captured from the API examples test suite; ids and timestamps are normalized.

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.

Set global permissionsPUT /api/users/annie.larson/global-permissions
Only known permission keys are accepted; unknown keys are stripped. Omitted keys keep their current value. Valid keys come from the globalPermissions registry (e.g. apiTokenCreation, jobCreation, viewAllUsers, viewAllTeams, billingManage, painlessScriptCreation).
Request body
{
"apiTokenCreation": true,
"jobCreation": true,
"viewAllUsers": true
}
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/users/annie.larson/global-permissions"
}
},
"apiTokenCreation": true,
"jobCreation": true,
"viewAllUsers": true
}
Captured from the API examples test suite; ids and timestamps are normalized.

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.

Check superuser statusGET /api/users/annie.larson/superuser
Responds with the boolean superuser flag.
Response · 200
false
Captured from the API examples test suite; ids and timestamps are normalized.

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:

FieldTypeDescription
superuserbooleanWhether the user is a superuser
Grant superuserPUT /api/users/annie.larson/superuser
Caller must already be a superuser. The admin account’s superuser status cannot be changed through this route.
Request body
{
"superuser": true
}
Response · 200
{
"_links": {
"self": {
"href": "https://informer.example.com/api/users/annie.larson/superuser"
}
},
"superuser": true
}
Captured from the API examples test suite; ids and timestamps are normalized.

DELETE /api/users/{username}/superuser

Revoke superuser privileges.

Permissions: tenant:superuser

Response:

Responds 200 with an empty body.

Revoke superuserDELETE /api/users/annie.larson/superuser
Clears the superuser flag. Responds 200 with an empty body.
Response · 200 · no body
Captured from the API examples test suite; ids and timestamps are normalized.

Global Permission Keys

The keys accepted by the global-permissions endpoints:

KeyDescription
viewAllUsersView all users in the tenant
viewAllTeamsView all teams in the tenant
apiTokenCreationCreate API tokens
jobCreationCreate jobs
billingManageManage billing and subscriptions
painlessScriptCreationAuthor Painless scripts