Docs

Get Analytics Page Definition

Read a page's whole draft as one document, in the shape Set Analytics Page Definition takes: change it and send it back. The ETag header carries its revision.

GET

Path

Path parameters
stringrequired

The page id, from List Analytics Pages.

Headers

Optional headers
string

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.

Response fields

pageobject

The page settings, as Update Analytics Page takes them.

  • namestring

    The page title.

  • descriptionstring

    The line under the title, or null.

  • iconstring

    The page icon id, or null.

  • iconColorstring

    The page icon color, or null.

  • fullWidthboolean

    Whether the page spans the whole window.

  • showPanelSourcesboolean

    Whether each panel shows its data sources' app icons.

  • themeIdstring

    The page theme, from List Analytics Themes, or null when it follows its folder or the company default.

  • styleobject

    Style overrides on top of the theme, by option key, or null.

  • isPausedboolean

    Whether the page's own data refreshes are paused.

variablesarray of objects

The page variables (its filters), in page order, as Set Analytics Page Variables takes them.

  • namestring

    The variable name. Queries read it as $<name>.

  • typestring

    What it holds.

    • dateRangeA date window.
    • selectOne value, or several with multiple, from a list of choices.
    • searchFree text a viewer types.
    • toggleAn on or off switch.
  • controlstring

    chip shows a picker on the page; none has no picker.

    • chip
    • none
  • labelstring

    The picker label.

  • defaultobject

    What the page opens with: a date preset or range, all or a choice value, or true or false for a toggle.

  • multipleboolean

    A select that takes several choices.

  • labeledBystring

    A select set by a row click: the clicked row field that names the value.

  • optionsobject

    A select: where its choices come from, as dataSourceId with query or valueField and labelField, or typed values.

  • presetsarray

    A dateRange: its preset menu, in order.

  • showCalendarboolean

    A dateRange: false allows presets only.

  • timeGranularityboolean

    A dateRange: custom ranges carry times.

tabsarray of objects

The page tabs, in order, or null when the page has none.

  • idstring

    The tab id.

  • namestring

    The tab name.

panelsarray of objects

Every panel in the draft, in the shape Update Analytics Panel takes, with its grid place and tab.

  • idstring

    The panel id.

  • namestring

    The panel's title, shown in its card header.

  • descriptionstring

    The line under the title when the panel opens as a full-page drill-down view.

  • placementstring

    Where the panel shows.

    • pageOn the page grid.
    • drillOff the grid: it opens when a click on another panel drills into it, narrowed by the clicked row.
  • displayTypestring

    How 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.

    • tableDraws a table panel.
    • barDraws a bar panel.
    • lineDraws a line panel.
    • comboDraws a combo panel.
    • paretoDraws a pareto panel.
    • bumpDraws a bump panel.
    • scatterDraws a scatter panel.
    • bubbleDraws a bubble panel.
    • quadrantDraws a quadrant panel.
    • pieDraws a pie panel.
    • treemapDraws a treemap panel.
    • heatmapDraws a heatmap panel.
    • pivotDraws a pivot panel.
    • cohortDraws a cohort panel.
    • statusgridDraws a statusgrid panel.
    • activityDraws a activity panel.
    • funnelDraws a funnel panel.
    • waterfallDraws a waterfall panel.
    • sankeyDraws a sankey panel.
    • chordDraws a chord panel.
    • statetimelineDraws a statetimeline panel.
    • timelineDraws a timeline panel.
    • statDraws a stat panel.
    • trendDraws a trend panel.
    • progressDraws a progress panel.
    • gaugeDraws a gauge panel.
    • bulletDraws a bullet panel.
    • reportDraws a report panel.
    • documentDraws a document panel.
    • workbookDraws a workbook panel.
    • htmlDraws a html panel.
    • mapDraws a map panel.
    • regionDraws a region panel.
    • tabsDraws a tabs panel.
    • groupDraws a group panel.
  • dataSourcesarray

    The data sources feeding the panel, in order.

    • dataSourceIdstring

      The data source, from List Analytics Data Sources.

    • aliasstring

      The name the source's query and the transform code use for its rows.

    • querystring

      DuckDB SQL over this source's rows, with the alias as the table name. Empty when the panel shows every row as stored.

    • followPageDateboolean

      Whether the page's date filter narrows this source. False for an all-time figure on a date-filtered page.

  • transformCodestring

    JavaScript function body that receives each source as a named input and returns the rows to show. Empty when the source queries return the rows directly.

  • columnsarray

    Table panels: the columns shown, in order. Null when the panel picks its columns from the rows.

    • keystring

      The row key the column shows (dot paths allowed). For a button column, the identifier that names its click event.

    • typestring

      How the value is formatted and aligned. Absent for plain text.

      • stringFormats the value as string.
      • numberFormats the value as number.
      • percentFormats the value as percent.
      • ratioFormats the value as ratio.
      • currencyFormats the value as currency.
      • durationFormats the value as duration.
      • rankFormats the value as rank.
      • booleanFormats the value as boolean.
      • dateFormats the value as date.
      • objectFormats the value as object.
      • listFormats the value as list.
      • htmlFormats the value as html.
      • buttonFormats the value as button.
    • labelstring

      Button columns: the text on the button.

    • tooltipstring

      Button columns: the sentence shown on hover.

    • widthnumber

      The column width in pixels for everyone. Absent when the column is as wide as its content.

  • formatobject

    How each column's values are formatted, keyed by column, for any display type: { "<column>": { "type": "currency", ... } }. Null when none is set.

  • linksobject

    Table panels: the link each cell of a column opens, keyed by column. Null when none is set.

  • styleobject

    The color of each series or category, keyed by its name. Null when none is set.

  • settingsobject

    The 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. Only the blocks the panel stores are present.

  • onobject

    What clicking the panel's items does, keyed by event (rowClick, valueClick, "button:<column key>" ...): { "rowClick": { "action": "navigatePage", "pageId": "..." } }. Empty when nothing is wired.

  • interactionobject

    Stat panels: the toggle page variable a click on the tile flips. Null for a normal panel.

    • togglesstring

      The toggle page variable.

  • paramsobject

    Drill-down panels: the human label of each $param its SQL reads, keyed by param: { "userId": { "label": "User", "labeledBy": "userName" } }. Null when none is declared.

  • displayCodestring

    JavaScript function body that returns the display settings from the page variables. Kept, but unused, while displayMode is basic.

  • aiSnippetsCodestring

    Report panels: JavaScript function body returning the AI-written sections of the report. Empty when it has none.

  • layoutobject

    The panel's place on the page grid. Null when it was never placed (it then flows full width in creation order), and for a drill-down or a panel inside a container.

    • xnumber

      Leftmost column on the 12-column grid, 0-11.

    • ynumber

      Top row, from 0.

    • wnumber

      Width in columns, 1-12.

    • hnumber

      Height in rows (one row is about 48px). Null when the panel is as tall as what it shows.

  • tabIdstring

    The page tab the panel sits on, from Get Analytics Page. Null on a page without tabs, and for a drill-down or a panel inside a container.

revisionstring

The draft revision: send it in If-Match to Set Analytics Page Definition. It changes whenever anything in this definition does.