iotoms Docs

Delete a user

DELETE
/api/v1/management/users/{id}

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

  1. Get the user ID from List users.
  2. Send the delete; the user is soft-deleted, disappears from List users and can no longer sign in, but the record is kept.
  3. You cannot delete a user whose role has more access than your own.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*integer

ID of the record.

Formatint64

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request worked, ERROR when it did not.

message*string

Short 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"  }}