Delete a user
DELETE
Soft-deletes a back-office user so they no longer appear in List users or sign in; the record is kept. You cannot delete a user whose role has more access than your own.
How to use it
- Get the user ID from List users.
- Send the delete; the user is soft-deleted, disappears from List users and can no longer sign in, but the record is kept.
- You cannot delete a user whose role has more access than your own.
BearerAuthheader
AuthorizationBearer <JWT>id*integerID of the record.
Format
int64OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request worked, ERROR when it did not.
message*stringShort human-readable message describing the result, for logs or display; do not parse it.
data?The user's profile as it now stands. Passwords and PINs are never returned.
Example Request
curl -X DELETE 'https://beta.iotoms.com/api/v1/management/users/0'Example Response
{ "status": "string", "message": "string", "data": { "userId": 0, "username": "string", "roleId": 0, "enablePin": true, "firstName": "string", "lastName": "string", "email": "string", "passwordUpdatedOn": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "status": "string" }}