API: Delete FileRun user accounts
| Target URL | /api.php/Core/!admin/users/delete |
| Required scope | admin |
| HTTP Method | POST |
| Output format | JSON |
Request Parameters Reference
| Parameter | Type | Required | Description |
|---|---|---|---|
| UIDS | array | Yes | Array of user ID integers |
| deleteHomeFolder | boolean | No | If included, this will cause the user(s) home folders to also be deleted. |
The deletion of an account is refused while the account owns accounts, groups, roles, metadata field sets or metadata file types, which it created as an independent administrator. The message gives their number: "This account created 3 user accounts, 1 groups and 0 roles that still exist. Delete them first, or deactivate the account instead.".
With deleteHomeFolder, the deletion of an account is refused when the home folder of another account is the same folder or is inside it, also through a symbolic link. A home folder that is the root of the file system, the installation folder, a folder inside it or a folder that contains it is never deleted: the account is deleted, and its message holds "The home folder could not be deleted!". See Deleting a user account.
The response
Each account is deleted on its own. The data object is keyed by user ID and holds, for each one, success and message. The request as a whole is successful even when some of the accounts could not be deleted, so read data for the outcome of each.
1{
2 "success": true,
3 "msg": ["..."],
4 "data": {
5 "44": {
6 "success": true,
7 "message": "..."
8 },
9 "45": {
10 "success": false,
11 "message": "..."
12 }
13 }
14}