v1

latestOpenAPI 3.0.3Apache 2.02026-07-17333686.7 KB
Materialized Views

Create a materialized view (or trigger rebuild)

REST equivalent of | materialize. If name already exists, triggers a versioned rebuild: old version keeps serving queries, new version builds in background, atomic swap on completion.

Send If-None-Match: * to get 409 Conflict if the view already exists (prevents accidental rebuilds).

post/views

Headers

If-None-Matchstring

Set to * to prevent rebuild of existing view

Request body

namestring required

Must start with mv_. Lowercase, underscores, alphanumeric.

qstring required

SPL2 pipeline (without | materialize)

retentionstring

Duration string. Default: same as index retention.

partition_bystring

Partition strategy expression

Example request

{
  "name": "mv_errors_5m",
  "q": "level=error | stats count, avg(duration) by source, time_bucket(timestamp, '5m') AS bucket",
  "retention": "90d",
  "partition_by": "date(timestamp)"
}

Response

Existing MV — versioned rebuild triggered