Skip to main content

Views

Gateway prefix: ${API_BASE}/metadata/views/...

DTO fields (ViewDto)

  • name string, required, unique view name
  • description string, optional, description
  • query string, required, query text or DSL associated with the view

Create / update views

  • POST /views
  • PUT /views/{viewName}

Example: create then update description only:

curl -X POST "${API_BASE}/metadata/views" -H "Content-Type: application/json" \
-d '{"name":"sales_overview","description":"Sales view","query":"SELECT date, sum(amount) AS revenue FROM orders GROUP BY date"}'

curl -X PUT "${API_BASE}/metadata/views/sales_overview" -H "Content-Type: application/json" \
-d '{"description":"Updated desc"}'

Pagination and query by name

  • GET /views?page=&pageSize=&sortBy=&sortDirection=
  • GET /views/{viewName}
  • Header: X-Tenant-Id
curl "${API_BASE}/metadata/views?page=0&pageSize=10"
curl -X GET "${API_BASE}/metadata/views/sales_overview"