GET /topics/{string: topic_name}/partitions
Retrieves a list of partitions for the topic.
Description
Depending on the configuration, the type of information retrieved has different behavior.
See the streams.default.stream
in Configuration Parameters.
Parameters Defined | Response |
---|---|
streams.default.stream is defined | Gets metadata about specific HPE Ezmeral Data Fabric Streams partitions within a topic. The user could pass fully qualified topic name or not. If a fully qualified topic name is not used, metadata is retrieved and appended to the default stream path. |
streams.default.stream is not defined | Gets metadata about specific HPE Ezmeral Data Fabric Streams partitions within topic. The user could only pass fully qualified topic name that contains stream path. |
Parameters | Description |
---|---|
topic_name (string) | Name of the topic. |
Syntax
http://<host>:8082/topics/<topic_name>/partitions
Request Example
curl -X GET -H "Content-Type: application/vnd.kafka.v2"
"http://localhost:8082/topics/testtopic1/partitions"
Response Example
[
{
"partition":0,
"leader":0,
"replicas":
[{
"broker":0,
"leader":true,
"in_sync":true
}]
},
{
"partition":1,
"leader":0,
"replicas":
[{
"broker":0,
"leader":true,
"in_sync":true
}]
}
]