Logstreem
HTTP ingest

HTTP ingest

The one endpoint everything else is built on — JSON, NDJSON, gzip.

POST /v1/ingest/:dataset accepts an array of JSON objects or newline-delimited JSON. The dataset is created on first write.

curl -X POST https://api.logstreem.com/v1/ingest/api-gateway-prod \
  -H "Authorization: Bearer $LOGSTREEM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[
    { "level": "info",  "service": "api-gateway", "status": 200, "latency": 31 },
    { "level": "error", "service": "checkout",    "status": 503, "latency": 3814 }
  ]'

The response

200 OK
{
  "object": "ingest_result",
  "dataset": "api-gateway-prod",
  "ingested": 2,
  "failed": 0,
  "processed_bytes": 428,
  "blocks_created": 1
}

Partial success returns 200

A malformed event inside an otherwise valid batch is dropped and counted in failed — the request still succeeds. Check failed, do not just check the status code.

Options

Query parameters

timestamp-fieldstringdefault _time

Which field holds the event time.

timestamp-formatstring

A Go time layout, when your timestamps are not RFC 3339 or unix.

csv-delimiterstring

Set to parse the body as CSV instead of JSON.