Search records
const url = 'http://localhost:8080/api/v1/clusters/example/topics/example/search';const options = { method: 'POST', headers: { cookie: 'brokerium_session=<brokerium_session>', 'X-Brokerium-Request': '1', 'Content-Type': 'application/json' }, body: '{"partitions":[1],"fromTime":1,"toTime":1,"resume":[{"partition":1,"offset":1}],"key":{"contains":"example","regex":"example"},"value":{"contains":"example","regex":"example"},"header":{"key":"example","value":{"contains":"example","regex":"example"}},"ignoreCase":true,"limit":1,"maxRecords":1,"timeoutSeconds":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/v1/clusters/example/topics/example/search \ --header 'Content-Type: application/json' \ --header 'X-Brokerium-Request: 1' \ --cookie brokerium_session=<brokerium_session> \ --data '{ "partitions": [ 1 ], "fromTime": 1, "toTime": 1, "resume": [ { "partition": 1, "offset": 1 } ], "key": { "contains": "example", "regex": "example" }, "value": { "contains": "example", "regex": "example" }, "header": { "key": "example", "value": { "contains": "example", "regex": "example" } }, "ignoreCase": true, "limit": 1, "maxRecords": 1, "timeoutSeconds": 1 }'Brokerium Enterprise, feature message-tools. Role: viewer. Reads the selected partitions from the start of the time range (or the earliest record) and returns the records that match, sorted by partition and offset. The search stops after limit matches (100 by default, at most 1000), maxRecords records read (a million by default) or timeoutSeconds (30 by default, at most 300); pass next as resume to continue.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Required on every non-GET request.
Request Bodyrequired
Section titled “Request Bodyrequired”object
All partitions when empty.
Unix milliseconds, inclusive.
Unix milliseconds, exclusive.
Continues an earlier search from the offsets in its next.
object
Either a text the bytes contain or a regular expression (RE2 syntax), at most 1024 bytes.
object
Either a text the bytes contain or a regular expression (RE2 syntax), at most 1024 bytes.
object
object
Either a text the bytes contain or a regular expression (RE2 syntax), at most 1024 bytes.
object
Example generated
{ "partitions": [ 1 ], "fromTime": 1, "toTime": 1, "resume": [ { "partition": 1, "offset": 1 } ], "key": { "contains": "example", "regex": "example" }, "value": { "contains": "example", "regex": "example" }, "header": { "key": "example", "value": { "contains": "example", "regex": "example" } }, "ignoreCase": true, "limit": 1, "maxRecords": 1, "timeoutSeconds": 1}Responses
Section titled “Responses”Matches and how far the search got.
object
Records read.
The first offset not read in each partition.
object
Every partition was read to the end of the range.
What ended an incomplete search.
object
object
Omitted for text.
Example
{ "stopped": "limit", "messages": [ { "headers": [ { "encoding": "utf8" } ], "keyEncoding": "utf8", "valueEncoding": "utf8" } ]}Error.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}Error.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}Error.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}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.