HTTP Methods and URI Summary

This section provides HTTP method and URI summaries for versions API v1 and API v2 of the Kafka REST Proxy for MapR-ES.

API v2: Kafka REST Proxy Summary

Availability of Kafka REST Proxy API v2 started in Kafka REST 4.0.0 on Core 6.0.x.
HTTP Method URI Description
GET /topics Retrieves a list of topic names.
GET /topics/{string: topic_name} Retrieves metadata about a specific topic.
POST /topics/{string: topic_name} Produces messages to a topic.
GET /topics/{string: topic_name}/partitions Retrieves a list of partitions for the topic.
GET /topics/{string: topic_name}/partitions/{string: partition_id} Retrieves metadata about a specific partition within a topic.
POST /topics/{string: topic_name}/partitions/{string: partition_id} Produces messages into a partition of a topic.
POST /consumers/{string: group_name} Creates a new consumer instance in the consumer group.
DELETE /consumers/{string: group_name}/instances/{string: instance_id} Destroys the consumer instance.
POST /consumers/{string: group_name}/instances/{string: consumer_instance_id}/offsets Commits a list of offsets for the consumer. When the post body is empty, it commits all the records that have been fetched by the consumer instance.
GET /consumers/{string: group_name)/instances/{string: instance_id}/offsets Gets the last committed offsets for the given partitions (whether the commit happened by this process or another).
POST /consumers/{string: group_name}/instances/{string: instance_id}/subscription Subscribes to the given list of topics or a topic pattern to get dynamically assigned partitions. If a prior subscription exists, it would be replaced by the latest subscription.
GET /consumers/{string: group_name}/instances/{string: instance_id}/subscription Gets the current subscribed list of topics.
DELETE /consumers/{string: group_name}/instances/{string: instance_id}/subscription Unsubscribes from topics currently subscribed to.
POST /consumers/{string: group_name}/instances/{string: instance_id}/assignments Manually assigns a list of partitions to a consumer.
GET /consumers/{string: group_name}/instances/{string: instance_id}/assignments Retrieves the list of partitions manually assigned to this consumer.
POST /consumers/{string: group_name}/instances/{string: instance_id}/positions Overrides the fetch offsets that the consumer will use for the next set of records to fetch.
POST /consumers/{string: group_name}/instances/{string: instance_id}/positions/beginning Seek to the first offset for each of the given partitions.
POST /consumers/{string: group_name}/instances/{string: instance_id}/positions/end Seek to the last offset for each of the given partitions.
GET GET /consumers/{string: group_name}/instances/{string: instance_id}/records Fetches data for the topics or partitions specified using one of the subscribe/assign APIs.
GET /streams/{string: stream_name}/topics Retrieves a list of topics in a given stream.

API v1: Kafka REST Proxy Summary

HTTP Method URI Description
GET /topics Retrieves a list of topic names.
GET /topics/{topic: string} Retrieves metadata about a specific topic.
POST /topics/{topic: string} Produces a message into a topic.
GET /topics/{topic: string}/partitions

Retrieves a list of partitions for the topic.

GET /topics/{topic: string}/partitions/{partition_id: string} Retrieves metadata about specific partition in a topic.
POST /topics/{topic: string}/partitions/{partition_id: string} Produces messages to one partition of the topic.
GET /topics/{topic: string}/partition/{partition_id: string}/messages?offset={int}[&count={int}] Consumes messages from one partition of the topic.
GET /stream/{stream: string}/topics Retrieves a list of topics in a given stream.
POST /consumers/{group: string} Creates a new consumer instance in the consumer group.
POST /consumers/{group: string}/instances/{instance: string}/offsets Commits offsets for the consumer. Returns a list of the partitions with the committed offsets.
DELETE /consumers/{group: string}/instances/{instance: string} Destroys the consumer instance.
GET /consumers/{group: string}/instances/{instance: string}/topics/{topic: string} Consumes messages from a topic.