HTTP API

Traditional HTTP API

Batch has a super simple HTTP API for accepting event data. There is only one POST method which requires you to pass in a Batch-Token header.

post
Add a new event

https://http-collector.batch.sh/v1/collection
Returns 200 on success. Returns 401 if Batch-Token is invalid.
Request
Response
Request
Headers
Batch-Token
optional
string
Collection token
Response
200: OK
Event has been accepted, index and archived.
{"message":"event has been successfully collected"}

When should you use this API?

The HTTP API does not support batching and is not intended for high throughput collection. The goal of the HTTP API is to provide you with a way to send us data in the easiest way possible - via a curl or a quick script.

If you need high throughput - use either plumber, the gRPC API or the kafka sink connector (beta).

Throughput

Under optimal conditions, you can reach up to ~5,000 events/sec ingestion speeds but this will vary based on your location/latency and client server.