Skip to content

Partitioning

A partition restricts which rows an embed may load. It is part of authorization, enforced when Ridge serves data, and cannot be widened by dashboard state or browser code.

Do not confuse a partition with a component filter:

PartitionInteractive filter
PurposeEnforce row-level accessChange the current view
Chosen byYour trusted integrationViewer or host UI
Enforced byRidge data requestsDashboard state
Can browser code widen it?NoYes

Apply a partition

text
1. Open the dashboard's Embed dialog.
2. Choose Iframe Embed.
3. Enter the viewer's partition value.
4. Generate a signed URL.

The partition parameters are covered by the URL signature.
Changing or removing them invalidates the URL.
js
// Your server, after authenticating the current user.
const response = await fetch("https://app.ridgedata.ai/api/embed/token", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.RIDGE_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    dashboardIds: ["dashboard-id-123"],
    partitionFilters: [{ column: "tenant_id", value: currentUser.tenantId }]
  })
});

Each partition filter is a { column, value } pair, where value is a string. Multiple filters all have to match.

Trust boundary

Derive partition values from an authenticated server session or another trusted identity source. Never accept a tenant id from the browser and forward it without authorization; that would let the caller choose whose rows to request.

After a partition is applied, interactive filters operate only within the permitted rows. Clearing a component filter does not remove or weaken the partition.

Ridge AI