OriginChainDB
Database endpoints

Refresh a materialized view

Recomputes a materialized view from its base table and replaces its stored rows.

POST /v1/tenants/{tenant}/sql/materialized-views/{name}/refresh

Recompute a view from current source rowsRefresh replaces stored contents without changing the view definition.
  1. Identify the stored viewSelect the view whose contents need updating.
  2. Re-run its source queryRecompute and replace the materialized rows.
  3. Check count and refresh timeInspect rows_materialized and refresh_ts.

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_materialized and refresh_ts describe the replacement contents. This refresh recomputes the view from its source; it does not change the view definition.

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.
422Correct the values or unsupported combination.
429Honor Retry-After when present; back off.
500Check the outcome before retrying a write.
501Check deployment support for this operation.
502Check service availability and the write outcome.
503Honor Retry-After when present; check write outcomes.
ยฉ 2026 Silicoyn Technologies Pvt Ltd