INGEST API
Send events over the TrafficWar ingest API.
Use the HTTP API when no official SDK fits. Capture accepts one event object, batch accepts a bare event array, and both authenticate with a service API key.
JSON batch request
curl https://ingest.trafficwar.tech/v1/server/batch \
-H "Authorization: Bearer $TRAFFICWAR_API_KEY" \
-H "Content-Type: application/json" \
--data '[{"event":"http","label":"Health","path":"/health","http_method":"GET","latency_ms":3.4,"status_code":200}]'Request behavior
- Content-Type may be application/json or application/msgpack.
- /capture accepts one event object; /batch accepts a bare array, not an object containing an events property.
- A request may contain at most 10,000 events.
- Plan quotas are hard all-or-nothing limits; a rejected batch is not partially charged.
- HTTP 200 is returned only after the ClickHouse insert succeeds.
Choose server or web routes deliberately
Trusted runtimes should use /v1/server/capture or /v1/server/batch. Browser routes are subject to the service CORS allowlist and should use credentials intended for that browser integration.