Interface | https://[endpoint].ctapi.ctyun.cn/v1/topic/query | |||
Request Method | GET | |||
Request Parameters | Required or Not | Position | Parameter Type | Description |
prodInstId | Yes | header | String | Instance ID |
topicName | Yes | header | String | Topic Name |
Response Parameter | Parameter Type | Description | ||
total | Integer | The total number of topic query results. | ||
data | Array | The array of topic query results. | ||
tenantName | String | Tenant ID. | ||
cluster | String | Instance ID. | ||
partitionNum | Integer | Number of partitions. | ||
isPrivate | Integer | Whether the topic is private. 1 private, 2 public. | ||
ctime | Long | Created At | ||
topicPartitions | Array | Partition status list. | ||
leader | Integer | Partition leaser. | ||
partition | Integer | Partition ID. | ||
replicas | Array | Partition replica list. | ||
isr | Array | Synchronization partition list. | ||
Examples of a Successful Response | ||||
{ "returnObj": { "total": 1, "data": [ { "id": 41, "tenantName": "126", "cluster": "172", "name": "pps2", "partitionNum": 2, "isPrivate": 2, "ctime": 1571280134000, "description": null, "topicPartitions": [ { "leader": 0, "partition": 0, "replicas": [ 0 ], "isr": [ 0 ], "under replicated": false }, { "leader": 0, "partition": 1, "replicas": [ 0 ], "isr": [ 0 ], "under replicated": false } ] } ] }, "message": "success", "statusCode": "800" } | ||||
Example of a Failed Response | ||||
{ "returnObj": {}, "message": "...", "statusCode": "900" } | ||||
Querying a Topic
2024-05-09 08:39:01