Browse messages
GET
/api/v1/clusters/{id}/topics/{topic}/messages
const url = 'http://localhost:8080/api/v1/clusters/example/topics/example/messages?from=latest&limit=50';const options = {method: 'GET', headers: {cookie: 'brokerium_session=<brokerium_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8080/api/v1/clusters/example/topics/example/messages?from=latest&limit=50' \ --cookie brokerium_session=<brokerium_session>Role: viewer. Non-UTF-8 keys and values are returned base64-encoded.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
topic
required
string
Query Parameters
Section titled “Query Parameters”partition
integer format: int32
from
string
offset
integer format: int64
Start offset when from=offset.
timestamp
integer format: int64
Start time in Unix milliseconds when from=timestamp.
limit
integer
Responses
Section titled “Responses”Messages.
Media typeapplication/json
object
messages
Array<object>
object
partition
integer format: int32
offset
integer format: int64
timestamp
string format: date-time
key
string | null
value
string | null
headers
Array<object>
object
key
required
string
value
required
string
keyEncoding
string
valueEncoding
string
Example
{ "messages": [ { "keyEncoding": "utf8", "valueEncoding": "utf8" } ]}Apache®, Apache Kafka® and Kafka® are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. Brokerium is not affiliated with, endorsed by, or sponsored by the Apache Software Foundation.