Skip to navigation

Update a custom view (experimental)

⚠️ Experimental — this endpoint may change or be removed without notice and is not subject to v2 backwards-compatibility guarantees. Do not build production-critical integrations against it yet.

Partially updates a view. Omitted fields are left unchanged. For REVISIONS, prefer the incremental fields — bundleEdits (exact search-and-replace on the stored render bundle) and queryUpserts/queryRemovals (per-query changes) — so you transmit only what changed instead of re-sending the whole payload. The full-replacement fields remain for rewrites: renderBundle, and queries (a FULL replacement of the query list — never drop queries the user didn’t ask to remove). Replacement and incremental forms of the same aspect cannot be combined. The resulting SQL and bundle pass the same validation as createCustomView (SELECT-only, size cap, self-contained, paid:data listener). Works on DRAFT or PUBLISHED views — published embeds pick the change up on their next load. If the queries or hierarchy setting change during validation, returns 409 CUSTOM_VIEW_UPDATE_CONFLICT; fetch the current authoring definition and reapply your changes before retrying.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Path parameters

displayIdstringRequired

Request

Body
hierarchyEnabledbooleanOptional

Enable customer unit navigation for a customer-scoped view. Setting true requires customer hierarchies to be enabled for your organization, and every query must support unit selection. Existing views default to false.

capsEnabledbooleanOptional

Send the customer’s unit caps to the render bundle as context.caps. Needs hierarchyEnabled on a customer-scoped view. Turn it on only for views that draw cap usage: each load then reads cap usage from billing. Caps are spend policy, so an API key also needs read:billing to receive them in the data (they are left out otherwise) or to mint this view’s embed token. Defaults to false.

namestringOptional1-255 characters

New human-readable view name.

descriptionstring or nullOptional<=2048 characters

New description; pass null to clear it.

querieslist of objectsOptional

Full replacement of the view’s query list. Each SQL is re-validated (SELECT-only) exactly like createCustomView. For changing one or two queries, prefer queryUpserts/queryRemovals instead. Cannot be combined with them.

renderBundlestringOptional>=1 character

Replacement render bundle. Re-validated (size cap, self-contained, paid:data listener) exactly like createCustomView. For small changes, prefer bundleEdits instead. Cannot be combined with bundleEdits.

bundleEditslist of objectsOptional

PREFERRED for revisions: exact search-and-replace edits applied in order to the stored render bundle, so you send only the changed text instead of re-transmitting the whole bundle. The edited result passes the same validation as a full replacement. Cannot be combined with renderBundle.

queryUpsertslist of objectsOptional

PREFERRED for revisions: per-query changes — each entry replaces the stored query with the same id, or is appended as a new query. Queries not mentioned are left unchanged. Cannot be combined with queries.

queryRemovalslist of stringsOptional

Ids of stored queries to remove (applied before queryUpserts). Rejected if an id does not exist. Cannot be combined with queries.

filterslist of objects or nullOptional

Full replacement of the view’s declared filter parameters; pass null to remove them all. Every {filter_<name>:String} placeholder the (resulting) queries reference must stay declared.

Response

200
displayIdstring

Stable public identifier used in preview/embed URLs.

namestring
statusenum

A view is DRAFT until explicitly published. For customer-scoped views, only PUBLISHED views are embeddable and served to end-customers; a DRAFT is not. For organization-scoped views, publishing is only a ‘ready to use’ marker — both DRAFT and PUBLISHED are visible to your organization’s members in Paid (publishing does not change who in the org can see it), and neither is ever embeddable to an end-customer.

Allowed values:
previewUrlstring or nullformat: "uri"
Absolute URL to open this view in the Paid app for preview. Surface it to the user after creating or publishing a view. Null when the app URL is not configured.
scopeenum

‘customer’: data is scoped to one viewing customer and the view is embeddable per-customer. ‘organization’: data is org-wide and the view is internal-only.

Allowed values:
hierarchyEnabledbooleanOptional

Enable customer unit navigation for a customer-scoped view. Setting true requires customer hierarchies to be enabled for your organization, and every query must support unit selection. Existing views default to false.

capsEnabledbooleanOptional

Send the customer’s unit caps to the render bundle as context.caps. Needs hierarchyEnabled on a customer-scoped view. Turn it on only for views that draw cap usage: each load then reads cap usage from billing. Caps are spend policy, so an API key also needs read:billing to receive them in the data (they are left out otherwise) or to mint this view’s embed token. Defaults to false.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error