Skip to main content
PUT
cURL

Authorizations

Authorization
string
header
required

Hiloop API key sent as an HTTP Bearer token.

Path Parameters

name
string
required

The view name (unique within the organization); supplied by the path.

Body

application/json

Create or replace a data view by name (upsert). The path {name} is authoritative; a name inside the body is ignored.

name
string

The view name (unique within the organization); supplied by the path.

description
string

An optional human description.

spec
object

The data-view spec (opaque JSON, the engine's tagged DataViewSpec). Compile-validated before store.

Response

OK

A structured data view: a named, versioned spec that compiles 1:1 to a safe query.

name
string

The view name, unique within an organization among non-deleted views.

description
string

A human description, surfaced in the console switcher.

spec
object

The data-view spec as opaque JSON — the engine's tagged DataViewSpec: a raw Sql SELECT, plus opaque render config. Carried as a Struct so the spec schema lives in ONE place (the engine's serde types); the service never re-models it. Re-validated against the current column allowlist on store and on every run, so a view referencing a dropped column fails closed with INVALID_ARGUMENT rather than serving a stale result.

spec_version
string

Monotonic per-edit version; the store bumps it on each upsert.