API Users - maxgrafik/violetCMS GitHub Wiki
[
{
shortname: <string>,
name: <string>,
title: <string>,
enabled: <boolean>
},
...
]
shortname is the name of the user’s settings JSON file from the /violet/users directory. You always use the shortname to refer to a user through the API.
{
name: <string>,
title: <string>,
email: <email>,
language: <string>, (country code)
enabled: <boolean>,
access: [<string>, ...]
}
The access array contains the names of all components the user is allowed to access through the API.
q=users
Gets a list of all users.
q=users&name=<shortname>
Gets the settings for the given user.
q=users&action=create
Creates a new user. You provide a user settings struct as described above. You may additionally provide a password field to set the password for this new user. Passwords will be stored as salted hash using PHP’s password_hash function. The shortname is derived from the provided name.
q=users&name=<shortname>&action=update
Updates the user settings with the provided data. The shortname will not be updated.
q=users&name=<shortname>&action=delete
Deletes the specified user. No message body.