Dandelion - API Documentation - User Management
Module name: users
Index
resetpassword
Endpoint: /api/users/resetpassword
Method: POST
Parameters: [uid]
, pw
Parameter | Type | Default | Required |
---|---|---|---|
uid |
int | false | |
pw |
string | true |
Description: Reset password for uid
(defaults to API key user) to password pw
.
Example Return Data:
Returned Values:
- data (string) - User displayable string if the save was successful or not
Permissions Needed:
- Edit user (if
uid
is given)
create
Endpoint: /api/users/create
Method: POST
Parameters: username
, password
, fullname
, role
, [cheesto]
Parameter | Type | Default | Required |
---|---|---|---|
username |
string | true | |
password |
string | true | |
fullname |
string | true | |
role |
int | true | |
cheesto |
string | true | false |
Description: Create new user. The cheesto
parameter determines if a Ĉeesto account will be created for this user. role
is the ID of the group to which the user should belong. (See Rights getlist function)
Example Return Data:
Returned Values:
- data (string) - User displayable string if the save was successful or not
Permissions Needed:
- Create user
edit
Endpoint: /api/users/edit
Method: POST
Parameters: uid
, [fullname]
, [role]
, [prompt]
, [theme]
Parameter | Type | Default | Required |
---|---|---|---|
uid |
int | true | |
fullname |
string | false | |
role |
int | false | |
prompt |
int | false | |
theme |
string | false |
Description: Edit properties of a user. The defaults for optional parameters are the values currently present on the user.
Example Return Data:
Returned Values:
- data (string) - User displayable string if the save was successful or not
Permissions Needed:
- Edit user
delete
Endpoint: /api/users/delete
Method: POST
Parameters: uid
Parameter | Type | Default | Required |
---|---|---|---|
uid |
int | true |
Description: Delete user uid
.
Example Return Data:
Returned Values:
- data (string) - User displayable string if the save was successful or not
Permissions Needed:
- Delete user
enable
Endpoint: /api/users/enable
Method: POST
Parameters: uid
Parameter | Type | Default | Required |
---|---|---|---|
uid |
int | true |
Description: Enable user uid
.
Example Return Data:
Returned Values:
- data (string) - User displayable string if the save was successful or not
Permissions Needed:
- Edit user
Dandelion Version
- 6.1.0
disable
Endpoint: /api/users/disable
Method: POST
Parameters: uid
Parameter | Type | Default | Required |
---|---|---|---|
uid |
int | true |
Description: Disable user uid
.
Example Return Data:
Returned Values:
- data (string) - User displayable string if the save was successful or not
Permissions Needed:
- Edit user
Dandelion Version
- 6.1.0
getusers
Endpoint: /api/users/getusers
Method: GET
Parameters: None
Description: Get list of user’s and their information
Example Return Data:
Returned Values:
Per User
- id (int) - ID of user
- fullname (string) - Full name of user
- username (string) - …username
- group_id (int) - ID for user’s group
- created (string, date) - When the user was created
- theme (string) - Preferred theme of user
- initial_login (int) - Value to determine if user needs to reset password, also reserved for future use
- disabled (bool) - Whether or not the user is disabled
Permissions Needed:
- Edit user
Notes:
- The
disabled
field was added in version 6.1.
getuser
Endpoint: /api/users/getuser
Method: GET
Parameters: uid
Parameter | Type | Default | Required |
---|---|---|---|
uid |
int | false (see note 2) |
Description: Get information for user uid
. If uid
is not given, the user of the API key will be assumed.
Example Return Data:
Returned Values:
Per User
- id (int) - ID of user
- fullname (string) - Full name of user
- username (string) - …username
- group_id (int) - ID for user’s group
- created (string, date) - When the user was created
- theme (string) - Preferred theme of user
- initial_login (int) - Value to determine if user needs to reset password, also reserved for future use
- disabled (bool) - Whether or not the user is disabled
Permissions Needed:
- Edit user
Notes:
- The
disabled
field was added in version 6.1. - The
uid
parameter was required up to version 6.1.