Get a list of users
Description
URL |
scheme://domain:port/platform/ws/users |
|
Description |
The logged on user must have view_configure permission on the setting resource to use this API. By default, gets a list of all users, in all roles. |
|
HTTP-Method |
GET |
|
Parameters |
Name |
Description |
rolenames |
Optional. Gets a list of users that have the specified roles. To specify multiple roles, separate with a comma(,). For example: cluster_admin,normal. To get a list of roles, use the API /platform/ws/roles. |
Request
Request-Method |
GET |
|
Request-URI |
/platform/ws/users /platform/ws/users?rolenames=%s |
|
Request-Header |
Name |
Value |
Accept |
application/xml or application/json |
|
Message-body |
empty |
Response
Response-Code |
|
|
Response-Header |
Name |
Value |
Content-Type |
application/xml or application/json |
|
Message Body | Success Message | If successful, returns user information. For additional information, refer to the schema file ./schemas/rbac/users.xsd and ./schemas/rbac/user.xsd.
|
Failure Message | If not successful, returns an error message. For additional information, refer to the schema file ./schemas/rbac/error.xsd.
|
Example: Get a list of all users
# Request
GET /platform/ws/users HTTP/1.1
Host: www.example.org
# Response
200 Successful
Content-Type: application/xml;
<users total =”2”>
<atom:link rel="self" href="http://www.example.org/platfom/ws/users"/>
<user name=”user0”/>
<user name=”user1”/>
</users>
Example: Get a list of all users with roles normal_user and cluster_admin
# Request
GET /platform/ws/users?rolenames=normal_user,cluster_admin HTTP/1.1
Host: www.example.org
# Response
200 Successful
Content-Type: application/xml;
<users total=”1”>
<atom:link rel="self" href="http://www.example.org/platfom/ws/users?rolename=normal_user,cluster_admin"/>
<user name=”user1”/>
</users>
Related APIs
To get a list of roles, use the API /platform/ws/roles.