Users

When creating a new user, you must supply the password field. You must also supply the password field when updating a user's password. Like in the GUI, a regular user (non-admin) can only change their own password, and must supply the current password in the old_password field.

Supplying None (or null in the API demo page, the javascript version of None) for the password makes the user account unusable for login.

For the list of groups and roles, the name is supplied for informatio only. When updating the users's groups or roles, only the ID fields are necessary. Here is a CURL example for setting the roles for user ID=3 to IDs 5, 7, and 8:

curl -s \
 -X POST \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: apikey api_key" \
 -d 'data=[{"roles": [{"id":5}, {"id":7}, {"id":8}] }]' \
 127.0.0.1:7999/arc/adminapi/users/3
JSON Fields for Users Data Type
Field Detail Only Updatable Description
id No No User ID
username No Yes Username, limited to alphanumeric, period, underscore, and dash
is_superuser No No Indicates the admin userm, who has full permissions
is_active Yes No

TRUE: user can long through the UI

FALSE: user cannot login through the UI, but trusted authentication works

date_joined Yes No Shows the creation date for this user's metadata entry
last_login Yes No Shows the last login date for this user
groups Yes Yes List of groups to which this user belongs; each entry shows group ID and group name
roles Yes Yes List of roles to which this user belongs; each entry shows role ID and role name