Skip to content

Users ​

User management. Only root users can create, delete, and fully manage users. admin users can list users. Regular user accounts can only view and update their own profile.

Routes ​

MethodPathAuthDescription
GET/api/usersJWT (admin/root)List users
GET/api/user/:idJWT (admin/root/user)Get single user (users can only see self)
PUT/api/userJWT (root)Create a user
POST/api/user/:idJWT (root)Create or update a user
PATCH/api/user/:idJWT (root/admin/user)Update user (users/admins can only update self)
DELETE/api/user/:idJWT (root)Delete single user
DELETE/api/usersJWT (root)Bulk delete users

List Users ​

GET /api/users?query=<JSON>

Filterable fields: id (numeric), username (string), email (string), usergroup (string).

Create User (PUT) ​

PUT /api/user

Body ​

FieldTypeRequiredDescription
idnumberNoEntity ID
usernamestringYesLogin username
passwordstringYesPassword
passwordrepeatstringNoPassword confirmation
usergroupenum: root, admin, userYesUser role
emailstringYesEmail address
roapikeystringNoRead-only API key
rwapikeystringNoRead-write API key
ipstringNoIP restriction
configobjectNoConfiguration object
rightsarrayNoRights assignments

Username and email must be unique.

Update User (POST) ​

POST /api/user/:id

Body ​

FieldTypeRequiredDescription
idnumberNoEntity ID
usernamestringYesLogin username
passwordstringNoPassword
passwordrepeatstringNoPassword confirmation
usergroupenum: root, admin, userYesUser role
emailstringYesEmail address
roapikeystringYesRead-only API key
rwapikeystringYesRead-write API key
ipstringYesIP restriction
configobjectYesConfiguration object
rightsarrayNoRights assignments

Partial Update (PATCH) ​

PATCH /api/user/:id

Body ​

FieldTypeRequiredDescription
idnumberNoEntity ID
usernamestringNoLogin username
passwordstringNoPassword
passwordrepeatstringNoPassword confirmation
usergroupenum: root, admin, userNoUser role
emailstringNoEmail address
roapikeystringNoRead-only API key
rwapikeystringNoRead-write API key
ipstringNoIP restriction
configobjectNoConfiguration object
rightsarrayNoRights assignments

Non-root users can only PATCH their own account.

Delete ​

Single: DELETE /api/user/:id (root only)

Bulk: DELETE /api/users with body {"where": {"id": {"$in": [1, 2, 3]}}} (root only)