Obtaining Kafka Topic Details
Function
This API is used to obtain Kafka topic details.
Calling Method
For details, see Calling APIs.
URI
GET /v2/kafka/{project_id}/instances/{instance_id}/topics-detail/{topic}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID. For details, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
|
instance_id |
Yes |
String |
Definition Instance ID. You can call the API for querying all instances to obtain the instance ID. The instance ID is in the response body. Constraints N/A Range N/A Default Value N/A |
|
topic |
Yes |
String |
Definition Topic name. Constraints N/A Range N/A Default Value N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
topic |
String |
Definition Topic name. Range N/A |
|
create_time |
Long |
Definition Creation time. Range N/A |
|
partitions |
Array of partitions objects |
Definition Partition list. |
Example Requests
GET https://{endpoint}/v2/kafka/{project_id}/instances/{instance_id}/topics-detail/{topic}
Example Responses
Status code: 200
Kafka topic details obtained.
[ {
"topic" : "topic-test",
"create_time" : 1763447003740,
"partitions" : [ {
"partition" : 0,
"leader" : 2,
"replicas" : [ 2 ]
}, {
"partition" : 1,
"leader" : 0,
"replicas" : [ 0 ]
}, {
"partition" : 2,
"leader" : 1,
"replicas" : [ 1 ]
} ]
} ]
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Kafka topic details obtained. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.