Skip to main content

Batch telemetry

Reduce round-trips by sending multiple events in a single POST /telemetry/batch request.

Request

curl -X POST "https://api.nexalayer.net/v1/telemetry/batch" \
  -H "X-API-Key: <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [
      {
        "session_id": "sess_xxx",
        "event_type": "success",
        "status_code": 200,
        "latency_ms": 200
      },
      {
        "session_id": "sess_xxx",
        "event_type": "http_error",
        "status_code": 429,
        "latency_ms": 150
      }
    ]
  }'
Each event must include session_id and event_type; other fields (e.g. status_code, latency_ms, target_host, error_message) follow the same schema as report-event. Next: Session health.