OriginChainDB
Database endpoints

Read a materialized view

Returns the rows of a materialized view, filtered and masked by the caller's row-level policies.

GET /v1/tenants/{tenant}/sql/materialized-views/{name}

Read a view through the caller's policiesStored view rows may be older than the base table.
  1. Select the viewIdentify the materialized result to read.
  2. Apply row policies and masksRestrict the stored data for this caller.
  3. Read the returned rowsRefresh an on-demand view when updated contents are needed.

Before you start

Use your database bearer token.

Connection setup

Use an existing materialized view. The example targets demo_scores; on-demand views must be refreshed when you need updated rows.

Path parameters

FieldTypeRequired
tenantstringRequired
namestringRequired

Headers

FieldTypeRequiredDescription
x-oc-db-userstringOptionalActing database user (role, grant and row-policy checks). Send with x-oc-db-key.
x-oc-db-keystringOptionalAPI key of the x-oc-db-user user.

Read the result

rows contains stored view data after the caller's row policies and masks. This is not necessarily a fresh read of the base table; refresh an on-demand view when you need updated contents.

Response statuses

HTTP status reference
StatusWhat to do
200OK
400Correct the request before retrying.
401Check the credential and Authorization header.
402Check feature access or available credits.
403Check tenant access, roles and permissions.
404Check the resource ID and API route.
429Honor Retry-After when present; back off.
500Check the outcome before retrying a write.
502Check service availability and the write outcome.
503Honor Retry-After when present; check write outcomes.
ยฉ 2026 Silicoyn Technologies Pvt Ltd