Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rootprint.io/llms.txt

Use this file to discover all available pages before exploring further.

Rootprint exposes an authenticated NDJSON gateway at /api/ingest/ndjson. Each ingest API key is scoped to a single index; Rootprint forwards the request body unmodified to Quickwit. Use this endpoint when you already control the wire format and want to write to a custom-schema index.
For OpenTelemetry-instrumented apps, prefer the OTLP endpoint — it handles batching, retries, and schema mapping automatically.

Setup

1

Pick the target index

Decide which Quickwit index you’ll write to. The default OTEL index is otel-logs-v0_9 — see Indexes for its schema, or follow Create a custom index to define your own first.
2

Create an ingest API key

In Settings → API keys, click Create API key, pick the target index, and choose the Ingest role. Copy the value shown on creation. API keys are scoped to one index — you cannot reuse one across indexes.
3

POST NDJSON to the gateway

Replace <your-rootprint> and <your-ingest-token>. The payload is one JSON document per line - no trailing comma.
curl -X POST 'https://<your-rootprint>/api/ingest/ndjson' \
  -H 'Authorization: Bearer <your-ingest-token>' \
  -H 'Content-Type: application/x-ndjson' \
  --data-binary @- <<EOF
{"timestamp_nanos":$(date +%s)000000000,"severity_text":"INFO","body":{"message":"User logged in"},"service_name":"frontend","attributes":{},"resource_attributes":{},"trace_id":"","span_id":"","trace_flags":0,"observed_timestamp_nanos":$(date +%s)000000000,"severity_number":9,"dropped_attributes_count":0,"resource_dropped_attributes_count":0,"scope_name":"","scope_version":"","scope_attributes":{},"scope_dropped_attributes_count":0}
{"timestamp_nanos":$(date +%s)000000000,"severity_text":"ERROR","body":{"message":"Checkout failed"},"service_name":"frontend","attributes":{},"resource_attributes":{},"trace_id":"","span_id":"","trace_flags":0,"observed_timestamp_nanos":$(date +%s)000000000,"severity_number":17,"dropped_attributes_count":0,"resource_dropped_attributes_count":0,"scope_name":"","scope_version":"","scope_attributes":{},"scope_dropped_attributes_count":0}
EOF
The unquoted heredoc lets $(date +%s)000000000 stamp each entry with the current time in Unix epoch nanoseconds (UTC) — second precision, which is plenty here — so they appear in Search right away instead of in the past. This works the same on Linux and macOS.
4

Verify in Rootprint

Open Search, pick your index from the selector, and look for the records you just sent.

Payload format

Rootprint forwards the body unchanged. You must send the format your API key’s Quickwit index expects - typically NDJSON with Content-Type: application/x-ndjson. The payload must match the target index schema; Quickwit rejects documents that don’t. See Indexes for the built-in otel-logs-v0_9 schema, or the index’s Configuration tab for Rootprint’s display mapping over your custom schema.

Troubleshooting

  • 401 — missing or malformed Bearer token.
  • 403 — the API key is invalid or revoked. Create a new ingest API key for that index in Settings → API keys.
  • 400 — NDJSON parse error. Common causes: trailing comma between objects, a JSON array instead of one-object-per-line, wrong Content-Type.
  • Accepted but not visible in Search — Quickwit has not flushed the new documents yet. Wait a few seconds and search again.