This document will walk you through the steps needed to delete a user permanently from Orbita.
For advanced users only.
Prerequisites
Postman application
Admin login credentials to the environment
Familiarity using APIs. Refer,How do I use Rest APIs?.
Steps to follow
Log in as Admin user
Use the login API (Method: POST) to login to the environment
https://<domain>.orbita.cloud:8443/api/login
.In the Headers tab, add the Key as
Content-Type
and the Value asapplication/json
.In the Body tab, use the admin’s username and password and click “Send”.
{ "username":"example@orbita.com", "password":"Password@123" }
You will receive a
token
in the response body.Copy the token for later use. Best way is to add the token to the environment variables.
Getting the User ID
User ID of the user from Experience Manager
You can get the User ID from the Experience Manager.
Go to Experience Manager > Global Settings and User profile menu > Users.
Select the user you would like to delete permanently from the list of users.
In the URL of the web browser, you will get the User ID as shown below.
User ID of the user that is already deleted from Experience Manager.
If you have deleted the user in Experience Manager (soft delete), you cannot view the user in the User list in Experience Manager but the user is still available in the database.
Use the Search User API (Method: POST)
https://<domain>.orbita.cloud:8443/api/users/search
In the Headers tab, add the Key as
Content-Type
and the Value asapplication/json
.
Add another Key asAuthorization
and set the Value asBearer <token>
In the Body tab, use the admin’s username and password and click “Send”.
{ "query": { "username":"signupuser1@example.com" } }
You will receive a response body as shown below.
The value of_id
property is the user id.
Delete the user
Use the Delete API (Method: DELETE) to delete the user
https://<domain>.orbita.cloud:8443/api/users/<userid>?force=<true/false>
.
For hard delete -force=true
.
For soft delete -force=false
.In the Headers tab, add the Key as
Content-Type
and the Value asapplication/json
.
Add another Key asAuthorization
and set the Value asBearer <token>
You will get an empty body in the response with code 204.
You have successfully hard deleted the user.