This API is used to query the user list.
User management is supported only when SASL is enabled for the Kafka instance.
GET /v2/{project_id}/instances/{instance_id}/users
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain it, see Obtaining a Project ID. |
instance_id |
Yes |
String |
Instance ID. |
None
Status code: 200
Parameter |
Type |
Description |
---|---|---|
users |
Array of ShowInstanceUsersEntity objects |
User list. |
Parameter |
Type |
Description |
---|---|---|
user_name |
String |
Username. A username must start with a letter. It can contain 4 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
user_desc |
String |
User description. |
role |
String |
User role. |
default_app |
Boolean |
Whether an application is the default application. |
created_time |
Long |
Creation time. |
Querying the user list.
GET https://{endpoint}/v2/{project_id}/instances/{instance_id}/users
Status code: 200
The query is successful.
{ "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 Code |
Description |
---|---|
200 |
The query is successful. |
See Error Codes.