Skip to main content
When you have a stream of log records rather than a file, post them directly to a source. Splendor accepts a batch and processes it asynchronously.

Prerequisites

  • A source to ingest into (see Ingest a dataset for creating one).
  • An ingest token, or your bearer token with access to the tenant.

Send a batch

POST /v1/ingest/sources/{source_key}/logs accepts a batch of records and returns 202 Accepted. The records are queued and become searchable once indexed.
curl https://api.withsplendor.com/v1/ingest/sources/app-logs/logs \
  -H "Authorization: Bearer $SPLENDOR_TOKEN" \
  -H "X-Splendor-Tenant-Id: $SPLENDOR_TENANT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "records": [
      {"level": "error", "message": "connection timeout after 30s", "service": "checkout"},
      {"level": "info", "message": "request completed", "service": "checkout"}
    ]
  }'
The response includes how many records were received and a fragment_id for the batch.
A 202 means the batch was accepted, not that it is searchable yet. Track progress with ingest runs or dataset readiness.

Ingest a dataset

Upload a file through a hosted source.

Run a search

Query the logs once they are indexed.