You can delete a user using the CLI tool, REST API or the PPaaS Console as shown below:
Deleting a user via the CLI
Overview
CLI command | remove-user |
Description | Delete a specific user. |
Command format | remove-user <USERNAME> |
Parameter definition
Short option | Long option | Description | Required | Example value |
---|---|---|---|---|
N/A | N/A | Username of user | Yes | kim |
Example
Delete the user with the username: kim.
remove-user kim
Sample output
User deleted successfully: [user] kim
Deleting a user via the REST API
Overview
Description | Delete a specific user. |
Resource Path | /users/{userName} |
HTTP Method | DELETE |
Request/Response Format | application/json |
Command format | curl -X DELETE -H "Content-Type: application/json" -k -v -u <USERNAME>:<PASSWORD> https://<PRIVATE_PAAS_HOST>:<PRIVATE_PAAS_HTTPS_PORT>/api/users/{userName}
|
Example
Add the user defined in the user.json
file.
curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/users/kim
Sample output
> DELETE /api/users/kim HTTP/1.1 > Host: localhost:9443 > Authorization: Basic YWRtaW46YWRtaW4= > User-Agent: curl/7.43.0 > Accept: */* > Content-Type: application/json > < HTTP/1.1 200 OK < Date: Wed, 14 Oct 2015 05:10:18 GMT < Content-Type: application/json < Transfer-Encoding: chunked < Server: WSO2 Carbon Server < {"status":"success","message":"User deleted successfully: [user] kim"}
You will come across the following HTTP status codes while deleting a user:
HTTP status code | 201, 500 See the descriptions of the HTTP status codes here. |
Deleting a user via the PPaaS Console
Follow the instructions below to delete a user:
Only users who belong to the admin user role are allowed to delete users in PPaaS.
- Click Users on the home page.
- Click Manage Users.
- Click Delete.
- Click Yes to delete the user.
Overview
Content Tools
Activity