Querying the User List
Function
This API is used to query the user list.
User management is supported only when SASL is enabled for the Kafka instance.
Debugging
You can use API Explorer to debug this API.
URI
GET /v2/{project_id}/instances/{instance_id}/users
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| instance_id | Yes | String | Instance ID. |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| users | Array of ShowInstanceUsersEntity objects | User list. |
| Parameter | Type | Description |
|---|---|---|
| user_name | String | Username. |
| role | String | User role. |
| default_app | Boolean | Whether an application is the default application. |
| created_time | Long | Creation time. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
Example Requests
Query the User List
GET https://{endpoint}/v2/{project_id}/instances/{instance_id}/users Example Responses
Status code: 200
Query succeeded.
{
"users" : [ {
"user_name" : "xxxa",
"role" : "guest",
"default_app" : false,
"created_time" : 1615431764734
}, {
"user_name" : "test",
"role" : "guest",
"default_app" : false,
"created_time" : 1615364062463
}, {
"user_name" : "ROOT",
"role" : "guest",
"default_app" : false,
"created_time" : 1617194246328
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Query succeeded. |
| 400 | Invalid parameters. |
| 403 | Authorization failed. |
Error Codes
See Error Codes.
Last Article: User Management
Next Article: Creating a User
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.