Validate Analytics Page Definition
Check a body for Set Analytics Page Definition without saving anything. It answers every problem Set would refuse, each with its JSON Pointer. Unlike Validate Workflow Definition it answers no definition or refs: a new panel gets its id only when it is written, so Set Analytics Page Definition answers both. A click or container naming a panel the body creates is checked for its event and target here, and in full when it is written.
Path
The page id, from List Analytics Pages.
Headers
Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. Here a key acts in another organization only as one of its members: with "Use this key across all of your organizations" on, in an organization its creator belongs to with a role. Child organizations and MindCloud staff access do not reach this endpoint. Every response's X-Company-Id header names the organization it acted in. See Organizations.
Body
The page settings; only those that differ are written.
The page settings, as Update Analytics Page takes them. Left out, they stay as they are; a setting left out of page stays too.
namestringThe page title.
descriptionstringThe line under the title, or null when it has none.
iconstringAn icon id from the app icon catalog, or null when it has none.
iconColorstringAn icon color from the app palette, or null when it has none.
fullWidthbooleanWhether the page spans the whole window.
showPanelSourcesbooleanWhether each panel shows its data sources' app icons.
themeIdstringA theme id from List Analytics Themes, or null to follow the folder or company default.
styleobjectStyle overrides on top of the theme, by option key, such as { "seriesColors": [...] }. Each option sent replaces that option, null clears one, and style null clears every override. Values are checked against the theme's option registry.
isPausedbooleantrue stops the page's data from refreshing; false resumes it (a folder above it can still keep it paused).
Every page variable, in page order.
Every variable (filter) the page should have, in page order, as Set Analytics Page Variables takes them. Left out, they stay as they are.
Every tab, in order, or null for none.
Every tab the page should have, in order, or null for no tabs. Left out, they stay as they are. A tab left out is deleted with the panels on it.
idstringAn existing tab id, from Get Analytics Page Definition, to keep that tab.
refstringYour own name for a new item, used in place of its id anywhere in this body. The answer maps each ref to the id it got.
namestringrequiredThe tab name.
Every panel the page should have. A new one has a ref; an existing one its id.
Every panel the page should have, at most 100. A panel left out is deleted.
idstringAn existing panel id on this page, from Get Analytics Page Definition, to keep and change that panel.
refstringYour own name for a new item, used in place of its id anywhere in this body. The answer maps each ref to the id it got.
namestringThe panel's title. Setting it turns off automatic renaming for this panel.
descriptionstringThe line under the title when the panel opens as a full-page drill-down view. An empty string clears it.
placementstringpage puts the panel on the grid; drill takes it off the grid, to open when another panel drills into it.
pagedrill
dataSourcesarray of objectsEvery data source feeding the panel, in order. Replaces the list.
dataSourceIdstringrequiredThe data source, from List Analytics Data Sources.
aliasstringThe name the query and transform code use for the source's rows. Made from the source's name when left out.
querystringDuckDB SQL over the source's rows, with the alias as the table name: filter, group, sort and limit here. An empty string shows every row.
followPageDatebooleanfalse keeps the page's date filter off this source (an all-time figure).
transformCodestringJavaScript function body receiving each source as a named input ({ alias }) and returning the rows to show. Use it only for what SQL cannot do. Saving it runs it; read the result with Get Analytics Panel Output. An empty string removes it.
displayTypestringHow the panel draws its rows. One of: table, bar, line, combo, pareto, bump, scatter, bubble, quadrant, pie, treemap, heatmap, pivot, cohort, statusgrid, activity, funnel, waterfall, sankey, chord, statetimeline, timeline, stat, trend, progress, gauge, bullet, report, document, workbook, html, map, region, tabs, group.
tablebarlinecomboparetobumpscatterbubblequadrantpietreemapheatmappivotcohortstatusgridactivityfunnelwaterfallsankeychordstatetimelinetimelinestattrendprogressgaugebulletreportdocumentworkbookhtmlmapregiontabsgroup
columnsarray of objectsTable panels: the columns shown, in order. Replaces the list; an empty list lets the panel pick its columns from the rows. Null clears them.
keystringrequiredThe row key to show (dot paths allowed). A button column takes an identifier you choose, which names its click event "button:<key>".
typestringHow the value is formatted: string, number, percent, ratio, currency, duration, rank, boolean, date, object, list, html, button.
stringnumberpercentratiocurrencydurationrankbooleandateobjectlisthtmlbutton
labelstringButton columns: the text on the button.
tooltipstringButton columns: one sentence shown on hover.
widthnumber or stringThe width in pixels, 64-800. An empty string returns it to the width of its content.
formatobjectHow each column's values are formatted, keyed by column: { "<column>": { "type": "currency" } }. Merged over what is stored; null for a column takes its format off. Null clears every format.
linksobjectTable panels: the link each cell of a column opens, keyed by column. Merged over what is stored; null for a column takes its link off. Null clears every link.
styleobjectThe color of each series or category, keyed by its name. Merged over what is stored; null for a name takes its color off. Null clears every color.
settingsobjectThe settings of the panel's display type, keyed by block (annotations, tooltip, chart, bump, scatter, pie, treemap, cellGrid, statusGrid, activity, funnel, waterfall, sankey, chord, statetimeline, stat, trend, target, report, document, workbook, html, map, region, tabs, group), as Get Analytics Panel answers them. A block is refused on a type that does not draw it.
annotationsobjectThe annotations settings. A block you send is merged over the stored one: send only the fields you change.
tooltipobjectThe tooltip settings. A block you send is merged over the stored one: send only the fields you change.
chartobjectThe chart settings. A block you send is merged over the stored one: send only the fields you change.
bumpobjectThe bump settings. A block you send is merged over the stored one: send only the fields you change.
scatterobjectThe scatter settings. A block you send is merged over the stored one: send only the fields you change.
pieobjectThe pie settings. A block you send is merged over the stored one: send only the fields you change.
treemapobjectThe treemap settings. A block you send is merged over the stored one: send only the fields you change.
cellGridobjectThe cellGrid settings. A block you send is merged over the stored one: send only the fields you change.
statusGridobjectThe statusGrid settings. A block you send is merged over the stored one: send only the fields you change.
activityobjectThe activity settings. A block you send is merged over the stored one: send only the fields you change.
funnelobjectThe funnel settings. A block you send is merged over the stored one: send only the fields you change.
waterfallobjectThe waterfall settings. A block you send is merged over the stored one: send only the fields you change.
sankeyobjectThe sankey settings. A block you send is merged over the stored one: send only the fields you change.
chordobjectThe chord settings. A block you send is merged over the stored one: send only the fields you change.
statetimelineobjectThe statetimeline settings. A block you send is merged over the stored one: send only the fields you change.
statobjectThe stat settings. A block you send is merged over the stored one: send only the fields you change.
trendobjectThe trend settings. A block you send is merged over the stored one: send only the fields you change.
targetobjectThe target settings. A block you send is merged over the stored one: send only the fields you change.
reportobjectThe report settings. A block you send is merged over the stored one: send only the fields you change.
documentobjectThe document settings. A block you send is merged over the stored one: send only the fields you change.
workbookobjectThe workbook settings. A block you send is merged over the stored one: send only the fields you change.
htmlobjectThe html settings. A block you send is merged over the stored one: send only the fields you change.
mapobjectThe map settings. A block you send is merged over the stored one: send only the fields you change.
regionobjectThe region settings. A block you send is merged over the stored one: send only the fields you change.
tabsobjectThe tabs settings. A block you send is merged over the stored one: send only the fields you change. { items: [panel ids], ... } replaces the child list; null releases every child back to the grid.
groupobjectThe group settings. A block you send is merged over the stored one: send only the fields you change. { items: [panel ids], ... } replaces the child list; null releases every child back to the grid.
onobjectWhat clicking the panel's items does, keyed by event: rowClick, valueClick and the other events the display type fires, or "button:<column key>" for a button column. Replaces every wiring; null clears them all.
interactionobjectStat panels: make the tile a control that flips a toggle page variable. null makes it a normal panel again.
togglesstringrequiredThe toggle page variable the tile flips.
paramsobjectDrill-down panels: labels for the $params the source SQL reads, keyed by param. Replaces them; null clears them.
displayCodestringAdvanced display: JavaScript function body that returns the display settings from the page variables. It is run when you save. An empty string goes back to the static settings and keeps the code.
aiSnippetsCodestringReport panels: JavaScript function body returning { KEY: { prompt, additionalContext } } for the {{KEY}} tokens the transform writes. An empty string removes it.
layoutobjectThe panel's place on the grid. Null on a drill-down or a panel inside a container, which take none; null on a grid panel keeps its place.
xnumberrequiredLeftmost column, 0-11.
ynumberrequiredTop row, from 0.
wnumberrequiredWidth in columns, 1-12.
hnumberHeight in rows; null or left out keeps the panel as tall as what it shows.
heightModestringauto takes a fixed height off, so the panel is as tall as what it shows.
auto
tabIdstringThe tab the panel sits on: a tab id, or a tab ref from tabs. Required on a new grid panel when the page has tabs; null keeps an existing panel on its tab.
Every receipt a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED answered for this body.
Only after a 409 ANALYTICS_EMBED_CONFIRMATION_REQUIRED for this body: every confirmationReceipt such answers gave, confirming the changes to the published embeds they list. A body that deletes several embedded panels or tabs collects one receipt per deletion.
Ignored; send the revision in If-Match.
Ignored, so a definition read can be sent back as it is. Send the revision in If-Match.
Response fields
validbooleanTrue when Set Analytics Page Definition would accept this body against the draft as it is now.
revisionstringThe draft revision it was checked against.
issuesarray of objectsEvery problem with the body, each with its JSON Pointer.
pathstringA JSON Pointer to the problem in the body.
codestringWhat is wrong, such as UNKNOWN_PANEL, DUPLICATE_REF or INVALID_ARGS.
messagestringWhat is wrong and how to fix it.