Querying User Permissions
Function
This API is used to query user permissions.
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 /v1/{project_id}/instances/{instance_id}/topics/{topic_name}/accesspolicy
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| instance_id | Yes | String | Instance ID. |
| topic_name | Yes | String | Topic name. |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| name | String | Topic name. |
| topic_type | Integer | Topic type. |
| policies | Array of PolicyEntity objects | Permission list. |
| Parameter | Type | Description |
|---|---|---|
| owner | Boolean | Whether the user is the one selected during topic creation. |
| user_name | String | Username. |
| access_policy | String | Permission type.
|
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
This API is used to query user permissions for a topic.
GET https://{endpoint}/v1/{project_id}/instances/{instance_id}/topics/{topic_name}/accesspolicy Example Responses
Status code: 200
Query succeeded.
{
"name" : "topic-test",
"policies" : [ {
"owner" : false,
"user_name" : "xxxa",
"access_policy" : "pub"
}, {
"owner" : false,
"user_name" : "root",
"access_policy" : "all"
} ],
"topic_type" : 0
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Query succeeded. |
| 400 | Invalid parameters. |
| 403 | Authorization failed. |
Error Codes
See Error Codes.
Last Article: Resetting a User Password
Next Article: Granting User Permissions
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.