Users

Arcadia Enterprise provides URL access to ArcViz server object, 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 information only. When updating the users's groups or roles, only the ID fields are necessary.

The examples in this article use an APIKey obtained through the Manage API Keys interface, on the host:port/arc/apps/apikeys browser page of the ArcViz installation (see Creating New API Keys). The actual APIKey and the method of retrieving the key depends on the user system.

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}] }]' \
 api_url + '/users/3' 

Note that the API URL has the form [http|htttps]://host:port/arc/adminapi/version.

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