Skip to content

http request get topic detail

Todd Palino edited this page Dec 1, 2017 · 1 revision

Name

Get Topic Detail

Usage

This endpoint returns the HEAD offsets for each partition in the specified topic, as retrieved from the brokers. Note that these brokers may be up to the number of seconds old specified by the broker-offsets configuration parameter.

URL path

GET /v3/kafka/(cluster)/topic/(topic)

Parameters

Name Format Description
cluster string The name of a Kafka cluster, as returned by the [[List Clusters
topic string The name of a Kafka topic consumed by the group, as returned by the [[List Consumer Topics

Response

The response contains an offsets key whose value is a list of partition offsets:

{
  "error": false,
  "message": "broker topic offsets returned",
  "offsets": [
    2290903,
    2898892,
    3902933,
    2328823
  ],
  "request": {
    "url": "/v3/kafka/clustername/topic/topicname",
    "host": "responding.host.example.com",
  }
}

Possible errors

  • Cluster Not Found If an unknown cluster name is provided, a 404 error will be returned with a JSON response body.
  • Topic Not Found If an unknown topic name is provided, a 404 error will be returned with a JSON response body.
  • JSON Encoding Error If there is a failure encoding the JSON response, a 500 error will be returned with a JSON response body.