Delete a User
This API allows you to permanently remove a user's account from the system. To use this API, you will need to provide the name of the user you wish to delete. After a successful request, the user will no longer have access to their account.
Before you begin
- Session ID is obtained from the login API.
- Ensure that the session ID is valid and has not expired.
- Make sure you have valid user name to be deleted.
Request Structure
| Endpoint: | /acctmgmt-remove-user |
| Type: | POST |
| Sample URL: | https://<IP/HostName/TenantName>:<GWPORT>/acctmgmt-remove-user?gwsource=externalTo understand the elements of the sample URL, click here. |
| Headers: | |
| Content-Type: | application/json |
| Name | Description |
|---|---|
| sessionId (or)
Token
|
(Mandatory) Use either Session Id or Token
received after login. Type: String Example: "sessionId": "ce7f1a14-2bf9-4e4a-89a8-bc780a255813" |
| OR | |
| username
|
(Mandatory) Use login name of the
user. Type: String Example: "admin" |
| password
|
(Mandatory) Password for the
username. Type: String Example: "AppViewX@123" |
| gwsource
|
(Mandatory) Source from which the request is
triggered. The values can be:
Type: String |
| Payload
|
(Mandatory) Input data for request body in application/json format. For payload details, see Payload section. |
Payload
| Name | Description |
|---|---|
| userNames
|
(Mandatory) Name of the user account. Note: You can delete multiple users by providing their usernames,
separated by commas: ["user_1", "user_2",
"user_3"]. Example: ["user_01"] |
Response Structure
- Status Code: 200 OK
- Message: Success.
- Headers:
- Content-Type: application/json
| Name | Description |
|---|---|
| response | Contains the response attributes for role deleted successfully. |
| message | Success message or failure description in case of error. |
| appStatusCode | Application specific status code for the response. Will be non-null for failure response. |
| tags | More info in case of failure response. |
Status Codes
| HTTP Code | appStatusCode | Response Message |
|---|---|---|
| 200 OK | null | Success |
| 404 Not Found | ACCT_US_001 | User Not Found. |
| 401 Unauthorized | AVX_GW_012 | Unauthorized access, reason - Invalid Token |
| 407 Proxy Authentication Required | AVX_GW_011 | Session validation failed, reason - Session information is missing. |
Sample Request/Response
Delete a user with user name user_01.
https://<IP/HostName/TenantName>:<GWPORT>/acctmgmt-remove-user?gwsource=external{
"payload":{"userNames": ["user_01"]}
}{
"response": {
"result": "Success",
"isOperationSuccess": true
},
"message": null,
"appStatusCode": null,
"tags": null,
"headers": null
}