UI state
Once an iframe has loaded, the parent page can interact directly with it to get and set UI state (such as filters, time ranges, view types, and more). The Rill iframe exposes two functions for this, setState and getState, which you call using the postMessage JavaScript function. See the docs, or this page's source, for details.
Iframe request
POST https://api.rilldata.com/v1/orgs/demo/projects/rill-embedding/iframe
Authorization: Bearer <RILL_SERVICE_TOKEN>
Content-Type: application/json
{
"type": "explore",
"resource": "auctions_explore"
}Source: embedding/web/src/app/customization/ui-state/page.tsx
setState
getState
Loading...