Skip to main content
POST
Handler for SQL CREATE MATERIALIZED VIEW statements

Path Parameters

app_id
string
required

Application ID

Body

application/json

SQL CREATE MATERIALIZED VIEW Request

sql
string
required

SQL CREATE MATERIALIZED VIEW statement Format: CREATE MATERIALIZED VIEW app::view_name AS SELECT ... FROM app::collection WHERE ... GROUP BY ... Example: "CREATE MATERIALIZED VIEW myapp::daily_summary AS SELECT market, SUM(volume) as total FROM myapp::trades GROUP BY market"

refresh_mode
string | null

Optional refresh mode: "live" (auto-refresh on write) or "lazy" (manual refresh) Defaults to "lazy"

Response

View created successfully