Delete a User

Endpoint URL: https://<your server/rest/users/:username
Endpoint URI: users/:username

Action: DELETE

Deletes a user.

Note

Ensure that you have logged into the Cybereason platform. For details, see Log in with the API.

Request Headers

You must add an Content-Type:application/json header with the request.

Note

If you are using cURL, add the authorization cookie details or the path to the file with cookie details with every request.


Request Body

None


Request Parameters

URL/URI parameters: You must provide the username parameter in the URL of the request.

Request Body Parameters: None


Response Status Codes

This request can return the following status codes:

  • 200: Success OK with details on the operation


Response Success Schema

The response one of the following status messages:

  • success (Success)


Response Failure

The response one of the following status messages:

  • success (Success)

  • badUsername (Invalid username)

  • badBasicPassword (Invalid password when using the basic password complexity)

  • badStrictPassword (Invalid password when using the strict password complexity)

  • previousPassword (Password is the same as a previous password)

  • userExists (User already exists)

  • userNotChanged (No changes in user data)

  • userNotFound (Platform did not find the user)

  • staleUser (User marked as stale)

  • actionNotAllowed (Update action not allowed)

  • errorOccured (A general error occurred)

  • actionFailed (Creation action failed)

  • badTotpSid (The TFA secret key is not valid)

  • incorrectPassword (The password is not correct)

  • illegaleLocale (User locale is not valid)


Important Response Fields

You want to ensure that the request returns the success message.


Example: Delete a user

Request

curl --request DELETE \
    --url https://12.34.56.78/rest/users/[email protected] \
    --header 'Content-Type:application/json' \

Response

This response has been shortened to show a single example of the fields for a user. A real response would contain many more users than this response.

"success"