Logstreem
Ingest NDJSON
POST

Ingest NDJSON

Newline-delimited JSON, the streaming-friendly format.

Same endpoint, Content-Type: application/x-ndjson. One JSON object per line, no enclosing array — so a producer can stream without buffering the whole batch.

curl -X POST https://api.logstreem.com/v1/ingest/api-gateway-prod \
  -H "Authorization: Bearer $LOGSTREEM_TOKEN" \
  -H "Content-Type: application/x-ndjson" \
  -H "Content-Encoding: gzip" \
  --data-binary @<(gzip -c events.ndjson)

Always gzip

Structured logs compress 8–15x. Content-Encoding: gzip costs microseconds of CPU and buys you an order of magnitude more events per request.
POST/v1/ingest/{dataset}

Path parameters

datasetstringrequired

Target dataset.

curl -X POST https://api.logstreem.com/v1/ingest/{dataset} \
  -H "Authorization: Bearer $LOGSTREEM_TOKEN"

Responses

200OK
{
  "object": "ingest_result",
  "dataset": "api-gateway-prod",
  "ingested": 3,
  "failed": 0,
  "processed_bytes": 642,
  "blocks_created": 1
}
401Unauthorized
{
  "error": {
    "type": "authentication_error",
    "code": "missing_token",
    "message": "No API token provided.",
    "doc_url": "https://logstreem.com/docs/errors#missing_token",
    "request_id": "req_9f3c2a7b41de08c5b2e6"
  }
}