Skip to content

Export records

POST
/api/v1/clusters/{id}/topics/{topic}/export
curl --request POST \
--url http://localhost:8080/api/v1/clusters/example/topics/example/export \
--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, "format": "ndjson", "limit": 1, "timeoutSeconds": 1 }'

Brokerium Enterprise, feature message-tools. Role: viewer. Streams the matching records as a file with complete values: NDJSON (the default), a JSON array or CSV. Keys, values and header values that are not UTF-8 are base64-encoded. At most limit records (a million) within timeoutSeconds (600 by default, at most 3600). Exports are audited as topic.export.

id
required
string
topic
required
string
X-Brokerium-Request
required
string
Allowed value: 1

Required on every non-GET request.

Media typeapplication/json
object
partitions

All partitions when empty.

Array<integer>
fromTime

Unix milliseconds, inclusive.

integer format: int64
toTime

Unix milliseconds, exclusive.

integer format: int64
resume

Continues an earlier search from the offsets in its next.

Array<object>
object
partition
integer format: int32
offset
integer format: int64
key

Either a text the bytes contain or a regular expression (RE2 syntax), at most 1024 bytes.

object
contains
string
regex
string
value

Either a text the bytes contain or a regular expression (RE2 syntax), at most 1024 bytes.

object
contains
string
regex
string
header
object
key
required
string
value

Either a text the bytes contain or a regular expression (RE2 syntax), at most 1024 bytes.

object
contains
string
regex
string
ignoreCase
boolean
format
string
default: ndjson
Allowed values: ndjson json csv
limit
integer format: int64
timeoutSeconds
integer

The file.

string

Example generated

example

Error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

Error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

Error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

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.