Metadata API
List Topics
GET /topics
Lists all topics belonging to the user.
Response:
JSON Map of topic name to topic’s partition:
List Consumers
GET /consumers
Lists consumers belonging to the user known by the REST server.
Response:
JSON array of GroupAssignments
.
List Committed Offsets
[GET | POST] /committed/$CONSUMER_GROUP/$INSTANCE_ID?timeout=$TIMEOUT
Returns the last committed offsets for the topic partitions inside the group.
Can be used alongside Commit Consumer API. Request body should be a single
TopicPartition
object or an array of TopicPartition
s:
timeout
parameter defines the time to wait at most for the offsets in
milliseconds. It’s optional and its default value is 10 seconds (10000
).
- List committed offset for a single topic partition:
- List committed offsets for multiple topic partitions:
- List committed offsets with a
1 second
timeout:
Response:
Returns a JSON array of TopicPartitionOffset
s:
Get Topic Partition Offsets
[GET | POST] /offsets/$TIMESTAMP?timeout=$TIMEOUT
Returns the offsets for the given partitions by timestamp. The returned offset for each partition is the earliest offset whose timestamp is greater than or equal to the given timestamp in the corresponding partition.
Request body should be a single TopicPartition
object or an array of
TopicPartition
s:
timeout
parameter defines the time to wait at most for the offsets in
milliseconds. It’s optional and its default value is 10 seconds (10000
).
-
Offset for a single topic partition:
-
Offsets for multiple topic partitions:
To find out the first and the end offsets for the partitions, earliest
and
latest
strings should be used as timestamp values.
-
Beginning offsets for topic partitions:
-
End offsets for topic partitions:
-
Offsets with a
1 second
timeout:
Response:
Returns a JSON array of TopicPartitionOffset
s:
Was this page helpful?