This documentation is for WSO2 Private PaaS 4.1.0. View documentation for the latest release.
Getting Details of Users - WSO2 Private PaaS 4.1.0 - WSO2 Documentation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
||
Skip to end of metadata
Go to start of metadata

You can get details of user using the CLI tool or REST API as shown below:

 

Getting details of users via the CLI

Overview
CLI commandlist-users
DescriptionRetrieve details of all users.
Example

Retrieve details of all available users.

list-users
Sample output
Users:
+----------+------------------------------------------------------------------+
| Username | Role                                                             |
+----------+------------------------------------------------------------------+
| admin    | Internal/82e8c404-75bb-ee47-ece5-a9f3b996f1350.11836030522910046 |
+----------+------------------------------------------------------------------+
| kim      | admin                                                            |
+----------+------------------------------------------------------------------+

Getting details of users via the REST API

Overview
DescriptionRetrieve details of all the users.
Resource Path/users
HTTP MethodGET
Request/Response Formatapplication/json
Command format
curl -X GET -H "Content-Type: application/json" -k -v -u <USERNAME>:<PASSWORD> https://<PRIVATE_PAAS_HOST>:<PRIVATE_PAAS_HTTPS_PORT>/api/users
  • By default, <USERNAME>:<PASSWORD> is admin:admin.
  • By default, <PRIVATE_PAAS_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified.
  • By default, <PRIVATE_PAAS_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n, the default port value needs to be incremented by n.
Example

Retrieve details of all available users.

curl -X GET -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/users
Sample output
> GET /api/users 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:02:43 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Server: WSO2 Carbon Server
< 
[{"role":"Internal\/82e8c404-75bb-ee47-ece5-a9f3b996f1350.11836030522910046","userName":"admin"},{"role":"admin","userName":"admin2"},{"role":"admin","userName":"kim"}]

You will come across the following HTTP status codes while getting the details of users:

HTTP status code

201, 500

See the descriptions of the HTTP status codes here.

 


 

 

  • No labels