Skip to main content
POST
/
apps
/
{app_id}
/
views
Create a new materialized view POST /apps/:app_id/views
curl --request POST \
  --url https://api.example.com/apps/{app_id}/views \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "query": "<unknown>",
  "source_collections": [
    "<string>"
  ],
  "refresh_mode": "<string>",
  "variables": {}
}
'
{
  "message": "<string>",
  "success": true,
  "ticket_id": "<string>",
  "view_name": "<string>"
}

Path Parameters

app_id
string
required

Application ID

Body

application/json

Request body for creating a materialized view

name
string
required
query
any
required
source_collections
string[]
required
refresh_mode
string | null

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

variables
object

Optional named variables for simplified query parameters Maps URL parameter names to query field paths Examples: {"market": "market"} -> ?market=BTC {"min_price": "avg_price_24h.$gte"} -> ?min_price=1000

Response

Materialized view created successfully

Response body for creating a materialized view

message
string
required
success
boolean
required
ticket_id
string
required
view_name
string
required