GET
/rolesGet roles
Returns a list of roles. Roles can be assigned to users and admins to control their permissions and scope
offsetintegeroptional
Number of items to skip from the beginning of the result set. Used for pagination in combination with the limit parameter
limitintegeroptional
The maximum number of items to return. Max value is 500, default is 100
orderstringoptional
Ordering roles by name. Default ASC
200successful operation
adminsarray<string>optional
list of admin usernames carrying this role, set on read
created_atintegeroptional
creation time as unix timestamp in milliseconds
descriptionstringoptional
optional description
idintegeroptional
namestringoptional
name is unique
resource_isolationintegeroptional
Resource isolation level:
* `0` - disabled
* `1` - enabled. The groups and folders carrying the role are the ones its admins read, an account reaches the groups and folders of its own role, and the storage allowlist is enforced on every save. It requires `settings.storage_allowlist.local.users_base_dir`.
Supported data providers: MySQL, MariaDB, PostgreSQL, CockroachDB, SQLite. The number of roles that can enable it is licensed, see `LicenseFeatures.isolated_roles`
settingsobjectoptional
Additional settings of a role. Omit it when the role carries none
updated_atintegeroptional
last update time as unix timestamp in milliseconds
usersarray<string>optional
list of usernames carrying this role, set on read
400Bad Request
errorstringoptional
error description if any
messagestringoptional
message, can be empty
401Unauthorized
errorstringoptional
error description if any
messagestringoptional
message, can be empty
403Forbidden
errorstringoptional
error description if any
messagestringoptional
message, can be empty
500Internal Server Error
errorstringoptional
error description if any
messagestringoptional
message, can be empty
defaultUnexpected Error
errorstringoptional
error description if any
messagestringoptional
message, can be empty
Error handling
A 400 is returned: Bad Request. A 401 is returned: Unauthorized. A 403 is returned: Forbidden. A 500 is returned: Internal Server Error. Any other status is an error: Unexpected Error.