Manage the local user accounts of the device
Users authenticated through RADIUS, TACACS+ or LDAP have no local record. Such a user can call these endpoints only with the admin role and always acts on other users’ records.
USER object:
{
"id": 2,
"username": "operator1",
"name": "First_Operator",
"email": "operator@example.com",
"role": "operator",
"active": true,
"creation_time": 1790332850,
"modification_time": 1790332854,
"last_access": 1790332853,
"custom_config": {}
}id - unsigned integer, assigned by the device (read-only)username - string, lowercase, starts with a letter followed by letters, numbers or underscores, 1 to 32 characterspassword - string, at least 8 characters with 1 number, 1 lowercase and 1 uppercase letter; accepted in requests, never returnedname - string or null, letters, numbers or underscores only, 1 to 255 charactersemail - string or null, must be a valid e-mail addressrole - viewer, operator or admin; defaults to vieweractive - true if the user may log in; defaults to falsecreation_time, modification_time, last_access - epoch seconds (read-only)custom_config - reserved for GUI settings, currently always an empty objectA field that violates its constraint is rejected with 422 and a Validation errors: ... message that names the field (see Responses).
/api/usersGETadminUSER objects in data/api/users/{id}GETviewer for the own record, admin for any otherUSER object in data{id} is not a number, 404 if no such user, 401 Insufficient permission when a non-admin asks for another user/api/usersPOSTadminUSER object without id; username and password are mandatory, name and email may be omitted or nullSuccessfully added the user., the created USER in dataThe username already exists: <username>, 422 on a constraint violation"active": true cannot log in until an admin enables the account./api/users/{id}PUTviewer for the own record, admin for any otherUSER object; fields that are omitted keep their current value, so a partial body such as {"name": "New_Name"} is valid. Sending password sets a new password.Successfully updated the user., the updated USER in datausername is taken, 422 on a constraint violation, and 400 for the self-modification rules belowrole (The user cannot change their access level) or active flag (The user cannot disable itself).username (Non-admin user cannot change their own username)./api/users/{id}DELETEadminSuccessfully deleted the user., the deleted USER in dataThe user cannot delete itself, 404 if no such user