Skip to main content

Content

What viewers see on a report, for reading or checking it without downloading a file. getReportContent answers the text of each visible slide and the values in its charts and tables. getReportSlideImages renders slides as images, to check their layout.

Both take slide ids, so after a message to the slides agent you can look at only the slides it changed.

Get report content

GET https://api.rollstack.com/public/v1/reports/{id}/content

What a viewer sees on a report's visible slides: titles, text, and each chart's and table's values. On a long report, pass slideIds for only the slides you need, such as a reply's changedSlideIds.

Requires the slide_decks:read scope.

Operation ID: getReportContent.

Path parameters

  • id (string, required): The report to act on, by its id from listReports or createReport. Only reports whose type is SlideDeck work here: another type, such as a Google Slides presentation, returns 400. You can also copy it from the report's link in Rollstack: it's the part right after /slides/.

Query parameters

  • slideIds (string or array of string): The slides to return, from a reply's changedSlideIds or an earlier getReportContent call. If omitted, every visible slide is returned. Hidden slides and ids that are not slides of the report are ignored. Up to 20 ids: repeat the parameter for each one, as in ?slideIds=a&slideIds=b. Example: f1e2d3c4-b5a6-4978-8a1b-2c3d4e5f6a7b.

Response 200

Success

application/json

  • slides (array of object, required): The report's visible slides in report order, or only those in slideIds. Hidden slides are never included.
    • index (number, required): The slide's position in the report as viewers see it, counting only visible slides and starting at 0. It stays the same when slideIds narrows the list.
    • id (string, required): Identifies the slide. Pass it in slideIds to getReportSlideImages or exportReport, or to sendReportMessage to tell the slides agent which slides your message is about.
    • title (string or null, required): The slide's title: the text in its title box. null when the slide has no title box, or the box is empty.
    • texts (array of string, required): The text of each text box and shape on the slide, title included. Text from the slide's master and layout is left out, and so are empty boxes.
    • charts (array of object, required): The charts on the slide, with the data each one shows.
      • title (string or null, required): The chart title shown on the slide. null when the chart has no title, and always for a table.
      • type (string, required): What kind of chart it is: bar, line or pie. A chart that combines kinds, such as bars with a line, takes the kind of its first series, and a chart with no series is chart. Always table for a table.
      • values (object, required): The data the chart or table shows, as columns and rows.
        • columns (array of string, required): The column headers: for a chart, the names of the data columns it draws; for a table, the text of its first row.
        • rows (array of array of string or number or null, required): The data, one array per row, with its values in the order of columns. A chart's numbers are raw values, before the chart's number format is applied; a table's cells are text. At most 200 rows; truncated says whether there were more.
        • truncated (boolean, required): Whether the chart or table has more than 200 rows, in which case rows contains only the first 200.
    • tables (array of object, required): The tables on the slide, with the text of their cells. A table's first row is returned as its columns, and the other rows as its rows.
      • title (string or null, required): The chart title shown on the slide. null when the chart has no title, and always for a table.
      • type (string, required): What kind of chart it is: bar, line or pie. A chart that combines kinds, such as bars with a line, takes the kind of its first series, and a chart with no series is chart. Always table for a table.
      • values (object, required): The data the chart or table shows, as columns and rows.
        • columns (array of string, required): The column headers: for a chart, the names of the data columns it draws; for a table, the text of its first row.
        • rows (array of array of string or number or null, required): The data, one array per row, with its values in the order of columns. A chart's numbers are raw values, before the chart's number format is applied; a table's cells are text. At most 200 rows; truncated says whether there were more.
        • truncated (boolean, required): Whether the chart or table has more than 200 rows, in which case rows contains only the first 200.

Get report design

GET https://api.rollstack.com/public/v1/reports/{id}/design

Start here to design a slide deck's slides yourself, as HTML. A call without layoutIds answers the guide to writing a slide for this report, which you follow, and what a slide is drawn on: the canvas size, the theme colours and, when the report has a template, its layouts by name. Call it again with layoutIds for the layouts you will use, to get the box each one's title goes in and the areas to keep clear.

Requires the slide_decks:read scope.

Operation ID: getReportDesign.

Path parameters

  • id (string, required): The report to act on, by its id from listReports or createReport. Only reports whose type is SlideDeck work here: another type, such as a Google Slides presentation, returns 400. You can also copy it from the report's link in Rollstack: it's the part right after /slides/.

Query parameters

  • layoutIds (string or array of string): The layouts to describe in full, by their id from a first call without it. At most 10: repeat the parameter for each one, as in ?layoutIds=a&layoutIds=b. Left out, only the template's style is described.

Response 200

Success

application/json

  • canvas (object, required): The report's slide size in CSS pixels. A slide's <section> is exactly this large.
    • width (number, required)
    • height (number, required)
  • theme (array of object, required): The report's theme colours. A slide uses these and no others.
    • variable (string, required): The CSS variable a slide names the colour by, as in var(--accent1).
    • hex (string, required): The colour it stands for in this report.
  • layouts (array of object, required): The layouts of the report's template. Empty when the report has no template of its own: lay slides out freely then.
    • id (string, required): The id a slide names the layout by, as data-layout-id on its <section>.
    • name (string, required): The layout's name in the template.
    • type (string or null, required): The layout's kind in the template, such as title or obj, when it has one.
  • layoutDetails (string or null, required): How to write on the template, as Markdown: the type and colours its slides are set in, and for each layout named in layoutIds the box its title goes in, its other placeholders with their ids and boxes, and the areas to keep clear. Null when the report has no template of its own.
  • guide (string): How to write a slide for this report, as Markdown: the HTML a slide is made of, the styles that are kept, how to place charts, tables and figures from its datasheets, and how to check and save it. Read it before writing any slide. Only on a call without layoutIds.

Get slide drafts

GET https://api.rollstack.com/public/v1/reports/{id}/slides/html

The HTML drafts slides of a slide deck were made from, to change them and save them again with saveReportSlides under the same ids. A slide changed in Rollstack since its draft was saved, by a person in the editor or by Rollstack's agent, answers the draft as it was saved with changedInRollstack, the list of what was changed since: make every one of those changes in the draft first, so the work done there is kept, then make your own. A slide made by hand in the editor has no draft (html is null): a draft sent under its id rewrites the whole slide, dropping what was done there, so look at it with getReportSlideImages and ask the user first. At most 10 slides a call.

Requires the slide_decks:read scope.

Operation ID: getReportSlideHtml.

Path parameters

  • id (string, required): The report to act on, by its id from listReports or createReport. Only reports whose type is SlideDeck work here: another type, such as a Google Slides presentation, returns 400. You can also copy it from the report's link in Rollstack: it's the part right after /slides/.

Query parameters

  • slideIds (string or array of string, required): The slides whose drafts to read, by their id from getReportContent or a reply's changedSlideIds, hidden ones included. Ids that are not slides of the report are ignored. 1 to 10 ids: repeat the parameter for each one, as in ?slideIds=a&slideIds=b. Example: f1e2d3c4-b5a6-4978-8a1b-2c3d4e5f6a7b.

Response 200

Success

application/json

  • slides (array of object, required): The slides asked for, in report order. Ids that are not slides of the report are left out.
    • id (string, required): The slide.
    • html (string or null, required): The draft the slide was made from, as one <section> of HTML. Null for a slide made by hand in the editor, which has none: a draft sent under its id rewrites the whole slide and drops what was done there. With changedInRollstack, the draft as it was saved, before those changes.
    • changedInRollstack (array of object): Only on a slide changed in Rollstack since its draft was saved, by a person in the editor or by Rollstack's agent: an entry per element changed, with was the element as the draft drew it and now as it stands. reworded: its text now reads now.text. moved: it sits in now's box. restyled: its font, colour, fill or grouping changed, so look at it with getReportSlideImages. removed has no now and added no was. html is the draft as saved, so it has none of them: make each in the draft before saving it, or saving drops it. Empty when the slide shows what the draft says again.
      • changes (array of string, required)
      • was (object or null, required)
        • kind (string, required): What it is, such as text, chart, table, data text, picture or shape.
        • text (string, required): Its words, or the template of a data text. Empty for an element without words.
        • left (number or null, required): Its box in canvas px, as far as a draft sets it: null where a data update does.
        • top (number or null, required)
        • width (number or null, required)
        • height (number or null, required)
        • rotation (number or null, required): In degrees.
      • now (object or null, required)
        • kind (string, required): What it is, such as text, chart, table, data text, picture or shape.
        • text (string, required): Its words, or the template of a data text. Empty for an element without words.
        • left (number or null, required): Its box in canvas px, as far as a draft sets it: null where a data update does.
        • top (number or null, required)
        • width (number or null, required)
        • height (number or null, required)
        • rotation (number or null, required): In degrees.

Get slide images

GET https://api.rollstack.com/public/v1/reports/{id}/slides/images

Renders slides of a report as images, as viewers see them, so you can check how they look: text that overflows or overlaps, or a chart too small to read. After a message's turn, pass its replies' changedSlideIds. At most 10 slides a call; hidden slides are left out. Counts against the 10 exports a minute per user.

Requires the slide_decks:read scope.

Operation ID: getReportSlideImages.

Path parameters

  • id (string, required): The report to act on, by its id from listReports or createReport. Only reports whose type is SlideDeck work here: another type, such as a Google Slides presentation, returns 400. You can also copy it from the report's link in Rollstack: it's the part right after /slides/.

Query parameters

  • slideIds (string or array of string, required): The slides to render, from getReportContent or a reply's changedSlideIds. Hidden slides and ids that are not slides of the report are ignored. 1 to 10 ids: repeat the parameter for each one, as in ?slideIds=a&slideIds=b. Example: f1e2d3c4-b5a6-4978-8a1b-2c3d4e5f6a7b.

Response 200

Success

application/json

  • slides (array of object, required): The rendered slides, in report order, whatever order slideIds lists them in. Hidden slides, and any slide that could not be rendered, are left out.
    • id (string, required): The slide the image shows, as passed in slideIds.
    • mimeType (image/jpeg, required): The format of the image. Always image/jpeg.
    • data (string (base64), required): The slide as viewers see it, as a JPEG image encoded in base64.

Arrange slides

PATCH https://api.rollstack.com/public/v1/reports/{id}/slides

Moves, removes, hides or shows slides of a slide deck, with nothing on them changed. Read the slides' ids with getReportContent. order puts the slides in a new order and names every slide that stays, once each; remove takes slides out of the report; hide keeps a slide in the report but out of what is presented and exported, and show brings it back. Take the change back by restoring versionBeforeId with restoreReportVersion. Called with nothing to change, it answers every slide in order with whether it is hidden: getReportContent leaves hidden slides out. Only the report's editors may.

Requires the slide_decks:write scope.

Operation ID: arrangeReportSlides.

Path parameters

  • id (string, required): The report to act on, by its id from listReports or createReport. Only reports whose type is SlideDeck work here: another type, such as a Google Slides presentation, returns 400. You can also copy it from the report's link in Rollstack: it's the part right after /slides/.

Headers

  • Idempotency-Key (string): A unique value, such as a UUID, that makes retrying this call safe. A retry with the same key within 24 hours answers the first call's result instead of running it again. Use a new key for each new call. From 1 to 255 printable ASCII characters.

Request body, required

application/json

  • order (array of string): The report's slides in their new order, by their id from getReportContent: every slide that stays, once each. Leave it out to keep the order.
  • remove (array of string): The slides to remove from the report, by their ids.
  • hide (array of string): The slides to hide, by their ids: they stay in the report and are left out when it is presented or exported.
  • show (array of string): The hidden slides to show again, by their ids.

Response 200

Success

application/json

  • versionBeforeId (string): The version saved just before the change: restore it with restoreReportVersion to take the change back. Absent when nothing changed.
  • slides (array of object, required): The report's slides after the change, in order.
    • id (string, required): The slide.
    • hidden (boolean, required): Whether the slide is hidden.

Save draft slides

POST https://api.rollstack.com/public/v1/reports/{id}/slides

Writes slides you wrote as HTML into a slide deck, as the slides agent's are: a draft sent under the id of a slide of the report replaces that slide where it is, any other is added right after the slide named in afterSlideId, or at the end without one, and every other slide stays. To move, remove or hide slides, use arrangeReportSlides. Render them with renderReportSlides first: nothing is saved while a draft still has an issue, and the issues come back instead. A chart or table a draft places is filled with its datasheet's data as part of the save, with no change to the slides. Take the save back by restoring versionBeforeId with restoreReportVersion. Only the report's editors may. At most 10 drafts a call, and 20 renders and saves a minute per user.

Requires the slide_decks:write scope.

Operation ID: saveReportSlides.

Path parameters

  • id (string, required): The report to act on, by its id from listReports or createReport. Only reports whose type is SlideDeck work here: another type, such as a Google Slides presentation, returns 400. You can also copy it from the report's link in Rollstack: it's the part right after /slides/.

Headers

  • Idempotency-Key (string): A unique value, such as a UUID, that makes retrying this call safe. A retry with the same key within 24 hours answers the first call's result instead of running it again. Use a new key for each new call. From 1 to 255 printable ASCII characters.

Request body, required

application/json

  • slides (array of object, required): The draft slides to save, 1 to 10 a call, each under an id of its own.
    • id (string, required): The id you give the slide: letters, digits, _ and -, at most 64 characters. Pass an existing slide's id to redraw that slide.
    • html (string, required): The slide as one <section> of HTML, as large as the report's canvas. No scripts, embedded pages, event attributes or anything loaded from outside it.
  • afterSlideId (string): The slide of the report the new slides go right after, by its id from getReportContent. Without it they are added at the end. A draft sent under the id of a slide of the report replaces that slide where it is.

Response 200

Success

application/json

  • saved (boolean, required): Whether the drafts were written into the report. False while any of them still has an issue: nothing is written then.
  • versionBeforeId (string): The version of the report saved before this change. Restore it with restoreReportVersion to take the change back.
  • conversionError (string): Why the drafts could not be turned into slides, when one could not. Fix it and save again.
  • slides (array of object, required): The drafts, in the order they were sent.
    • id (string, required): The draft, by the id it was sent with.
    • slideId (string or null, required): The slide of the report the draft became: a new id for a new slide, the same id for a slide it replaced. Send a later draft under this id to change the slide. Null when nothing was saved.
    • issues (array of string, required): What to fix before the draft can be saved.
    • notes (array of string, required): What to check by eye. These block nothing.
  • datasheets (array of object, required): The datasheets whose charts and tables the save placed. Their data is read as part of the save, so the slides show it at once, unless the source is slow: then the save answers first and the data follows.
    • id (string, required): The datasheet.
    • error (string or null, required): Why its data is not on the slide: the read failed, or it is still running and the slide shows the data once it ends. Null when the data was read.

Change theme

PATCH https://api.rollstack.com/public/v1/reports/{id}/theme

Changes a slide deck's theme: its colours, its heading font and its body font. This is how a deck takes a brand's colours, such as the ones the user names or the ones of a presentation they gave you: read the colours yourself and send each in the slot whose job it does. Every slide follows wherever it uses the theme's colours, and so do the template's layouts and the slides you write next, which keep using the theme variables that getReportDesign lists. Call it before you write slides, then call getReportDesign again for the colours as they are now. A slot sent with a colour another slot already has is saved one step of blue away from it (#2D6A4F and #2D6A50), which looks the same: saved slides tell theme colours apart by their value, so the answer can differ from what you sent by that step. A change that would leave text unreadable on its background changes nothing and answers the pair to fix, and so does a font the editor does not have. A new font sets text wider or narrower than the old one: on a deck that already has slides, look at each with getReportSlideImages afterwards and save again the ones whose text no longer fits. It changes colours and fonts only: for a presentation's layouts and logo, the user imports it as a template in Rollstack, which answers in listTemplates. Only the report's editors may. Answers the theme after the change and the version saved before it.

Requires the slide_decks:write scope.

Operation ID: updateReportTheme.

Path parameters

  • id (string, required): The report to act on, by its id from listReports or createReport. Only reports whose type is SlideDeck work here: another type, such as a Google Slides presentation, returns 400. You can also copy it from the report's link in Rollstack: it's the part right after /slides/.

Headers

  • Idempotency-Key (string): A unique value, such as a UUID, that makes retrying this call safe. A retry with the same key within 24 hours answers the first call's result instead of running it again. Use a new key for each new call. From 1 to 255 printable ASCII characters.

Request body, required

application/json

  • colors (object): The theme colours to change, each as #RRGGBB. The ones left out stay as they are. Each has a job on the slides, so put a brand's colours where they belong: its dark text colour in dark1, its background in light1, its main brand colour in accent1.
    • dark1 (string): Main text: titles and body text on the slide background.
    • dark2 (string): Secondary text: captions, sources and muted labels, quieter than dark1 but readable.
    • light1 (string): The slide background.
    • light2 (string): The second surface: cards, panels and table header rows. Close to light1 but visibly different from it.
    • accent1 (string): The main highlight: key numbers, accent bars and rules, the first chart series.
    • accent2 (string): The second chart series and highlight.
    • accent3 (string): The third chart series and highlight.
    • accent4 (string): The fourth chart series and highlight.
    • accent5 (string): The fifth chart series and highlight.
    • accent6 (string): The sixth chart series and highlight.
    • hyperlink (string): Link text, readable on light1.
    • followedHyperlink (string): Visited link text, readable on light1.
  • headingFont (string): The font family for titles and headings, by its published name, such as Inter. A font the editor does not have is refused.
  • bodyFont (string): The font family for all other text, by its published name.

Response 200

Success

application/json

  • When changed is true
    • changed (true, required)
    • versionBeforeId (string, required): The version saved just before the change: restore it with restoreReportVersion to take the change back.
    • colors (object, required): The report's theme colours after the change, by slot, as getReportDesign lists them in theme.
    • headingFont (string, required): The font of titles and headings after the change.
    • bodyFont (string, required): The font of all other text after the change.
  • When changed is false
    • changed (false, required)
    • refused (string, required): invalid: fix what reason names and send the change again. needs-agent: only Rollstack's agent can make this change, so ask the user whether to hand it over with sendReportMessage. One of invalid, needs-agent.
    • reason (string, required): Why nothing changed: the pairs of colours the change would leave unreadable, a font the editor lacks, or a background picture that could not be read.

Render draft slides

POST https://api.rollstack.com/public/v1/reports/{id}/slides/render

Renders slides you wrote as HTML on a slide deck's template, so you can design slides yourself instead of asking the slides agent. It saves nothing. Each draft answers its image, the issues to fix and notes to check by eye: fix the issues and render again until none are left. Call getReportDesign first and follow the guide it answers. A chart or table a draft places is drawn with its datasheet's data, or with the data of datasheetChanges you tried with previewReportDatasheetChanges and have not saved yet: save them with saveReportDatasheetChanges before you save the slides. A render that carries datasheetChanges runs one at a time with your queryReportData, previewReportDatasheetChanges and saveReportDatasheetChanges calls: send it only once those have answered. Only the report's editors may. At most 10 drafts a call, and 20 renders and saves a minute per user.

Requires the slide_decks:write scope.

Operation ID: renderReportSlides.

Path parameters

  • id (string, required): The report to act on, by its id from listReports or createReport. Only reports whose type is SlideDeck work here: another type, such as a Google Slides presentation, returns 400. You can also copy it from the report's link in Rollstack: it's the part right after /slides/.

Headers

  • Idempotency-Key (string): A unique value, such as a UUID, that makes retrying this call safe. A retry with the same key within 24 hours answers the first call's result instead of running it again. Use a new key for each new call. From 1 to 255 printable ASCII characters.

Request body, required

application/json

  • slides (array of object, required): The draft slides to render, 1 to 10 a call, each under an id of its own.
    • id (string, required): The id you give the slide: letters, digits, _ and -, at most 64 characters. Pass an existing slide's id to redraw that slide.
    • html (string, required): The slide as one <section> of HTML, as large as the report's canvas. No scripts, embedded pages, event attributes or anything loaded from outside it.
  • datasheetChanges (array of object): Changes to the report's datasheets that aren't saved yet, the ones you tried with previewReportDatasheetChanges: the drafts draw their charts and tables with the data they give, and a new datasheet is placed by the id the preview answered. Save them with saveReportDatasheetChanges before you save the slides.
    • When type is create
      • type (create, required)
      • temporaryId (string, required): A stable id for the new datasheet, which later changes in this patch reference it by
      • name (string, required): The datasheet's name
      • reads (array of object, required): The elements it reads, each once: the one a query reads, or those a join reads
        • alias (string, required): The name SQL reads this element by in FROM/JOIN, and ops name it by as a ref
        • datasheetRef (string (uuid), required): An existing datasheet that reads one element: the new datasheet reads that element, with its filters
        • readType (string or null): Omit to read it as that datasheet does One of aggregated, raw.
      • parameters (array of object, required): User-controlled periods, limits, thresholds and selections: SQL reads them as columns of the params input, a step as {"type":"parameter","key":"<key>"}
        • key (string, required)
        • parameter (object, required)
          • When type is string
            • label (string, required)
            • type (string, required)
            • value (string or null, required)
          • When type is integer
            • label (string, required)
            • type (integer, required)
            • value (integer or null, required)
          • When type is number
            • label (string, required)
            • type (number, required)
            • value (number or null, required)
          • When type is boolean
            • label (string, required)
            • type (boolean, required)
            • value (boolean or null, required)
          • When type is date
            • label (string, required)
            • type (date, required)
            • value (string (date) or null, required)
          • When type is timestamp
            • label (string, required)
            • type (timestamp, required)
            • value (string (date-time) or null, required)
      • query (object or null): The data as the Edit data editor builds it, over the one read; give query, or ops over several reads
        • customFields (array of object): Columns worked out on each source row before the filters and the grouping, which filters, dimensions, splits and measures can then name like a source column. A formula reads one row only and may name an earlier custom field. Examples: price times quantity, summed by region; deal-size bands with if(); diffdays between two dates, then averaged
          • formula (string, required): A formula over one source row: ${Column} names a source column or an earlier custom field. No sum(), mean(), min(), max(), median(), count(), offset(), index() or running
          total(), which read other rows
          • as (string, required): The column's name
        • dimensions (array of object, required): The columns to group by
          • column (string, required): A column name, exact and case-sensitive
          • bucket (string or null, required): A date unit to group a date or timestamp column by (month: each month of each year), a part of the date over every year (monthofyear: Jan to Dec, quarterofyear: 1 to 4, dayofweek: Mon to Sun), else null. This year beside last year by month is monthofyear split by the year One of day, week, month, quarter, year, month_of_year, quarter_of_year, day_of_week.
          • as (string): Omit for the default name
          • groups (array of object): A text column only: values shown under one name, e.g. Email and Telephone as "Email & Tel"; the others keep theirs
          • fill (boolean): A date grouped by a unit or a part only, one key at most: every period between the first and the last (every month, quarter or weekday of a part), for each combination of the other keys, a count or sum of no rows as 0. Omit to show only the periods the rows have
        • measures (array of object, required)
          • fn (string, required): One of sum, avg, min, max, median, count, count_distinct, first, last.
          • column (string or null, required): null only with count, which counts rows
          • as (string): Omit for the default name, such as "Sum of Sales"
          • filters (array of object): Only the rows these all match, beside measures of every row: e.g. a count of the mortgages that are Buy to Let. Omit for every row
        • pivots (array of object, required): Dimensions whose values become columns, outer first: each level splits the one above; empty for none
          • column (string, required): A column name, exact and case-sensitive
          • bucket (string or null, required): A date unit to group a date or timestamp column by (month: each month of each year), a part of the date over every year (monthofyear: Jan to Dec, quarterofyear: 1 to 4, dayofweek: Mon to Sun), else null. This year beside last year by month is monthofyear split by the year One of day, week, month, quarter, year, month_of_year, quarter_of_year, day_of_week.
          • as (string): Omit for the default name
          • groups (array of object): A text column only: values shown under one name, e.g. Email and Telephone as "Email & Tel"; the others keep theirs
          • fill (boolean): A date grouped by a unit or a part only, one key at most: every period between the first and the last (every month, quarter or weekday of a part), for each combination of the other keys, a count or sum of no rows as 0. Omit to show only the periods the rows have
        • calculations (array of object): Columns beside each row over every row the aggregate gives: a rank, a percent of total, a difference or percent difference from the previous row ordered by the only dimension, a total/average/min/max of a measure, or a formula over the row's dimensions and measures, such as a rate. A formula with sum(), mean(), min() or max() reads only the rows the limit keeps, such as each top 10 row's share of the 10. Need a dimension or measure and no split
          • When fn is rank
            • fn (rank, required)
            • column (string, required): A measure, by its name before renames
            • direction (string, required): desc: the largest ranks 1 One of asc, desc.
            • as (string): The new column's name. Omit for the default name
          • When fn is percent_of_total
            • fn (percent_of_total, required)
            • column (string, required): A measure, by its name before renames
            • as (string): The new column's name. Omit for the default name
          • Option 3
            • fn (string, required): One of difference, percent_difference.
            • column (string, required): A measure, by its name before renames
            • orderBy (string, required): The query's only dimension, such as a month, by its name before renames: the rows are ordered by it, oldest first
            • offset (integer): How many rows back to compare with; omit for 1, the previous row
            • as (string): The new column's name. Omit for the default name
          • Option 4
            • fn (string, required): One of sum, avg, min, max.
            • column (string, required): A measure, by its name before renames
            • as (string): The new column's name. Omit for the default name
          • When fn is formula
            • fn (formula, required)
            • formula (string, required): A formula: ${Column} names a dimension or measure by its name before renames; numbers, "text", yes, no, null; + - * / (dividing by 0 gives empty); = != < <= > >=; AND, OR, NOT; if(condition, then, else), coalesce(a, b), round(x, digits), abs(x), concat(a, b), isnull(x), tostring(x); sum(x), mean(x), min(x) and max(x) of a column over the rows shown, after the row limit, such as ${Sales} / sum(${Sales}) for each row's share of the rows shown; offset(x, n), the value n rows below in the rows shown (-1 the row above, empty past the first or last), and index(x, n), the value in row n of the rows shown (counting from 1), such as ${Sales} - offset(${Sales}, 1) for the lead over the next row; median(x), and count(x) of its values that aren't empty, over the rows shown; runningtotal(x), the sum of x from the first row shown down to this one, in the rows' order; power(x, y), x to the power y (empty for a negative x with a fractional y); diffdays(start, end), the whole days from the start date to the end date, negative when the end is earlier, empty when either is empty
            • as (string, required): The column's name
        • columnOrder (array of string): Every column once, by its name before renames, in the order to show them, removed columns optional; omit for dimensions, measures, then calculations
        • pivotLayout (object): Omit for the default: columns in the order their values first appear
          • columns (object, required)
            • When mode is fixed
              • mode (fixed, required)
              • values (array of object, required): One column per value, each under its own name: two values never share a column
            • When mode is discover
              • mode (discover, required)
              • order (string, required): One of asc, desc, first_seen.
              • limit (integer, required)
          • nullLabel (string or null, required): Column name for NULL values; null drops them
          • fill (number or null, required): Value for empty cells; null leaves them empty
        • filters (array of object, required): All must hold
          • When kind is compare
            • kind (compare, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of eq, neq, gt, gte, lt, lte.
            • value (object, required)
          • When kind is in
            • kind (in, required)
            • column (string, required): A column name, exact and case-sensitive
            • values (array of object, required)
            • negate (boolean, required)
          • When kind is between
            • kind (between, required)
            • column (string, required): A column name, exact and case-sensitive
            • from (object, required)
            • to (object, required)
          • When kind is text
            • kind (text, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of equals, contains, starts_with, ends_with.
            • value (object, required)
            • caseSensitive (boolean, required)
            • negate (boolean, required)
          • When kind is is_blank
            • kind (is_blank, required)
            • column (string, required): A column name, exact and case-sensitive
            • negate (boolean, required)
          • When kind is relative_date
            • kind (relative_date, required)
            • column (string, required): A column name, exact and case-sensitive
            • range (string, required): One of current, last, next.
            • count (integer or null, required)
            • unit (string, required): One of day, week, month, quarter, year.
            • complete (boolean): last/next only: whole units, leaving out the current one, e.g. the last 3 complete months on Oct 21 are Jul, Aug and Sep. Omit for the window through today
            • includeCurrent (boolean): With complete only: the current unit too, e.g. the last 1 complete year with the current one is last year and this year. Omit to leave it out
            • toDate (boolean): current only: the unit so far, through today, e.g. this year to date. Omit for the whole unit
            • earlier (object): current/last only: the same window, this many units earlier: this year to date 1 year earlier is the same dates last year, and the last 3 complete months 3 months earlier are the 3 months before them. Omit for the window itself
        • renames (array of object): Output columns under another name
          • from (string, required): A column name, exact and case-sensitive
          • to (string, required): The column's new name
        • sorts (array of object, required): Columns to sort by, the first first, each next one breaking ties; empty for none
          • column (string, required): A column, by its name before renames; a split's cell by its values
          • direction (string, required): One of asc, desc.
          • nulls (string): One of first, last.
        • limit (integer or object or null, required): Rows to keep: a number, an integer parameter, or null for all
          • type (parameter, required)
          • key (string, required)
        • limitFrom (string): One of start, end.
        • totals (object): A table's total row, its subtotal rows and, with a split, its Total column, each measure over the rows shown (under a limit, only those). Omit for none
          • row (boolean, required): A last row with the total of each column; charts leave it out
          • column (boolean, required): With a pivot after the aggregate: a Total column with each row across the pivot
          • subtotals (boolean): Grouped by two or more columns: a subtotal row above each group of every group-by column but the last, as a pivot table's subtotals, with each measure over the group's rows; charts leave them out
        • formats (array of object): numfmt patterns by output column
          • column (string, required): An output column, by the name it is shown under, after any rename
          • format (string, required): numfmt pattern, e.g. #,##0.00, $#,##0, 0.0%, yyyy-mm-dd
        • removedColumns (array of string): Columns, by their name before renames, to leave out of the rows while keeping the grouping, e.g. group by region and month but show no region column; a split's column is named by its values
        • keepGroupsWhere (array of object): Conditions on the grouped rows' dimensions and measures (by their name before renames), all of which must hold, right after the grouping and before the calculations, the sort and the limit, as SQL's HAVING does, so the calculations and the limit only see the rows kept: each region's share among the regions with more than 20 deals. To keep rows by a measure or a calculation while the calculations still cover every group, as for the top 10 of the customers over 1,000,000, use keepRowsBeforeLimit. Needs a dimension or measure and no split
          • When kind is compare
            • kind (compare, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of eq, neq, gt, gte, lt, lte.
            • value (object, required)
          • When kind is in
            • kind (in, required)
            • column (string, required): A column name, exact and case-sensitive
            • values (array of object, required)
            • negate (boolean, required)
          • When kind is between
            • kind (between, required)
            • column (string, required): A column name, exact and case-sensitive
            • from (object, required)
            • to (object, required)
          • When kind is text
            • kind (text, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of equals, contains, starts_with, ends_with.
            • value (object, required)
            • caseSensitive (boolean, required)
            • negate (boolean, required)
          • When kind is is_blank
            • kind (is_blank, required)
            • column (string, required): A column name, exact and case-sensitive
            • negate (boolean, required)
          • When kind is relative_date
            • kind (relative_date, required)
            • column (string, required): A column name, exact and case-sensitive
            • range (string, required): One of current, last, next.
            • count (integer or null, required)
            • unit (string, required): One of day, week, month, quarter, year.
            • complete (boolean): last/next only: whole units, leaving out the current one, e.g. the last 3 complete months on Oct 21 are Jul, Aug and Sep. Omit for the window through today
            • includeCurrent (boolean): With complete only: the current unit too, e.g. the last 1 complete year with the current one is last year and this year. Omit to leave it out
            • toDate (boolean): current only: the unit so far, through today, e.g. this year to date. Omit for the whole unit
            • earlier (object): current/last only: the same window, this many units earlier: this year to date 1 year earlier is the same dates last year, and the last 3 complete months 3 months earlier are the 3 months before them. Omit for the window itself
        • keepRowsBeforeLimit (array of object): Conditions on the grouped rows' dimensions, measures and before-limit calculations (by their name before renames), all of which must hold, after the calculations and before the column order, the sort and the limit, so the limit counts only the rows kept while the calculations still cover every group: the top 10 customers of those over 1,000,000, the regions with over 5% of the total. A condition on a calculation that reads the rows the limit keeps (sum(), offset()) goes in keepRowsWhere. Needs a dimension or measure and no split
          • When kind is compare
            • kind (compare, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of eq, neq, gt, gte, lt, lte.
            • value (object, required)
          • When kind is in
            • kind (in, required)
            • column (string, required): A column name, exact and case-sensitive
            • values (array of object, required)
            • negate (boolean, required)
          • When kind is between
            • kind (between, required)
            • column (string, required): A column name, exact and case-sensitive
            • from (object, required)
            • to (object, required)
          • When kind is text
            • kind (text, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of equals, contains, starts_with, ends_with.
            • value (object, required)
            • caseSensitive (boolean, required)
            • negate (boolean, required)
          • When kind is is_blank
            • kind (is_blank, required)
            • column (string, required): A column name, exact and case-sensitive
            • negate (boolean, required)
          • When kind is relative_date
            • kind (relative_date, required)
            • column (string, required): A column name, exact and case-sensitive
            • range (string, required): One of current, last, next.
            • count (integer or null, required)
            • unit (string, required): One of day, week, month, quarter, year.
            • complete (boolean): last/next only: whole units, leaving out the current one, e.g. the last 3 complete months on Oct 21 are Jul, Aug and Sep. Omit for the window through today
            • includeCurrent (boolean): With complete only: the current unit too, e.g. the last 1 complete year with the current one is last year and this year. Omit to leave it out
            • toDate (boolean): current only: the unit so far, through today, e.g. this year to date. Omit for the whole unit
            • earlier (object): current/last only: the same window, this many units earlier: this year to date 1 year earlier is the same dates last year, and the last 3 complete months 3 months earlier are the 3 months before them. Omit for the window itself
        • keepRowsWhere (array of object): Conditions on the rows' own columns (dimensions, measures and calculations by their name before renames), all of which must hold, after the sort, the limit and every calculation: keep the rank 1 row of the top 10, with its share of the 10. To keep rows before the limit, use keepRowsBeforeLimit. Needs a dimension or measure and no split
          • When kind is compare
            • kind (compare, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of eq, neq, gt, gte, lt, lte.
            • value (object, required)
          • When kind is in
            • kind (in, required)
            • column (string, required): A column name, exact and case-sensitive
            • values (array of object, required)
            • negate (boolean, required)
          • When kind is between
            • kind (between, required)
            • column (string, required): A column name, exact and case-sensitive
            • from (object, required)
            • to (object, required)
          • When kind is text
            • kind (text, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of equals, contains, starts_with, ends_with.
            • value (object, required)
            • caseSensitive (boolean, required)
            • negate (boolean, required)
          • When kind is is_blank
            • kind (is_blank, required)
            • column (string, required): A column name, exact and case-sensitive
            • negate (boolean, required)
          • When kind is relative_date
            • kind (relative_date, required)
            • column (string, required): A column name, exact and case-sensitive
            • range (string, required): One of current, last, next.
            • count (integer or null, required)
            • unit (string, required): One of day, week, month, quarter, year.
            • complete (boolean): last/next only: whole units, leaving out the current one, e.g. the last 3 complete months on Oct 21 are Jul, Aug and Sep. Omit for the window through today
            • includeCurrent (boolean): With complete only: the current unit too, e.g. the last 1 complete year with the current one is last year and this year. Omit to leave it out
            • toDate (boolean): current only: the unit so far, through today, e.g. this year to date. Omit for the whole unit
            • earlier (object): current/last only: the same window, this many units earlier: this year to date 1 year earlier is the same dates last year, and the last 3 complete months 3 months earlier are the 3 months before them. Omit for the window itself
      • ops (array of object or null): Only over several reads: a join step over every read first, naming each read in its inputs (from op, ref the read alias), then steps
        • ref (string, required): An existing op id to keep that op, or a new short name
        • title (string or null): Omit to keep a kept op's title; a step op without one shows its step summary
        • inputs (array of object or null): Omit to keep a kept op wired as it is (one that read the op above reads its new op above). A new op reads the op above, which SQL reads as input; a new first op reads the datasheet's one read, as source or the read's alias
        • step (object or null): A step op's call; on a kept op, send it only to change it
          • fn (string, required): One of select, rename, filter, sort, limit, aggregate, pivot, window, join.
          • params (object, required): The params of its fn, whose exact JSON Schema getReportDataGuide answers when you name the fn in stepFunctions
      • formats (array of object or null): With ops; a query has its own formats
        • column (string, required): An output column, by the name it is shown under, after any rename
        • format (string, required): numfmt pattern, e.g. #,##0.00, $#,##0, 0.0%, yyyy-mm-dd
      • sql (string or null): In place of a query or ops: one DuckDB SELECT over the reads, each a table named by its alias, with its formats in formats. Only for what a query can't do, such as a date stored as text (CAST("Month" AS DATE) AS "Month") or a figure from two datasheets that read one row each (SELECT won."Revenue" / goal."Goal" AS "Share of goal" FROM won, goal)
    • When type is set-query
      • type (set-query, required)
      • datasheetRef (string, required): An existing datasheet id, or the temporaryId of a datasheet created earlier in this patch
      • parameters (array of object or null): Replaces the datasheet's complete parameter set; omit to keep it
        • key (string, required)
        • parameter (object, required)
          • When type is string
            • label (string, required)
            • type (string, required)
            • value (string or null, required)
          • When type is integer
            • label (string, required)
            • type (integer, required)
            • value (integer or null, required)
          • When type is number
            • label (string, required)
            • type (number, required)
            • value (number or null, required)
          • When type is boolean
            • label (string, required)
            • type (boolean, required)
            • value (boolean or null, required)
          • When type is date
            • label (string, required)
            • type (date, required)
            • value (string (date) or null, required)
          • When type is timestamp
            • label (string, required)
            • type (timestamp, required)
            • value (string (date-time) or null, required)
      • query (object, required): The data as the Edit data editor builds it, replacing all the datasheet's ops but its read: getReportDatasheet gives its current query to start from
        • customFields (array of object): Columns worked out on each source row before the filters and the grouping, which filters, dimensions, splits and measures can then name like a source column. A formula reads one row only and may name an earlier custom field. Examples: price times quantity, summed by region; deal-size bands with if(); diffdays between two dates, then averaged
          • formula (string, required): A formula over one source row: ${Column} names a source column or an earlier custom field. No sum(), mean(), min(), max(), median(), count(), offset(), index() or running
          total(), which read other rows
          • as (string, required): The column's name
        • dimensions (array of object, required): The columns to group by
          • column (string, required): A column name, exact and case-sensitive
          • bucket (string or null, required): A date unit to group a date or timestamp column by (month: each month of each year), a part of the date over every year (monthofyear: Jan to Dec, quarterofyear: 1 to 4, dayofweek: Mon to Sun), else null. This year beside last year by month is monthofyear split by the year One of day, week, month, quarter, year, month_of_year, quarter_of_year, day_of_week.
          • as (string): Omit for the default name
          • groups (array of object): A text column only: values shown under one name, e.g. Email and Telephone as "Email & Tel"; the others keep theirs
            • name (string, required)
            • values (array of string, required)
          • fill (boolean): A date grouped by a unit or a part only, one key at most: every period between the first and the last (every month, quarter or weekday of a part), for each combination of the other keys, a count or sum of no rows as 0. Omit to show only the periods the rows have
        • measures (array of object, required)
          • fn (string, required): One of sum, avg, min, max, median, count, count_distinct, first, last.
          • column (string or null, required): null only with count, which counts rows
          • as (string): Omit for the default name, such as "Sum of Sales"
          • filters (array of object): Only the rows these all match, beside measures of every row: e.g. a count of the mortgages that are Buy to Let. Omit for every row
        • pivots (array of object, required): Dimensions whose values become columns, outer first: each level splits the one above; empty for none
          • column (string, required): A column name, exact and case-sensitive
          • bucket (string or null, required): A date unit to group a date or timestamp column by (month: each month of each year), a part of the date over every year (monthofyear: Jan to Dec, quarterofyear: 1 to 4, dayofweek: Mon to Sun), else null. This year beside last year by month is monthofyear split by the year One of day, week, month, quarter, year, month_of_year, quarter_of_year, day_of_week.
          • as (string): Omit for the default name
          • groups (array of object): A text column only: values shown under one name, e.g. Email and Telephone as "Email & Tel"; the others keep theirs
            • name (string, required)
            • values (array of string, required)
          • fill (boolean): A date grouped by a unit or a part only, one key at most: every period between the first and the last (every month, quarter or weekday of a part), for each combination of the other keys, a count or sum of no rows as 0. Omit to show only the periods the rows have
        • calculations (array of object): Columns beside each row over every row the aggregate gives: a rank, a percent of total, a difference or percent difference from the previous row ordered by the only dimension, a total/average/min/max of a measure, or a formula over the row's dimensions and measures, such as a rate. A formula with sum(), mean(), min() or max() reads only the rows the limit keeps, such as each top 10 row's share of the 10. Need a dimension or measure and no split
          • When fn is rank
            • fn (rank, required)
            • column (string, required): A measure, by its name before renames
            • direction (string, required): desc: the largest ranks 1 One of asc, desc.
            • as (string): The new column's name. Omit for the default name
          • When fn is percent_of_total
            • fn (percent_of_total, required)
            • column (string, required): A measure, by its name before renames
            • as (string): The new column's name. Omit for the default name
          • Option 3
            • fn (string, required): One of difference, percent_difference.
            • column (string, required): A measure, by its name before renames
            • orderBy (string, required): The query's only dimension, such as a month, by its name before renames: the rows are ordered by it, oldest first
            • offset (integer): How many rows back to compare with; omit for 1, the previous row
            • as (string): The new column's name. Omit for the default name
          • Option 4
            • fn (string, required): One of sum, avg, min, max.
            • column (string, required): A measure, by its name before renames
            • as (string): The new column's name. Omit for the default name
          • When fn is formula
            • fn (formula, required)
            • formula (string, required): A formula: ${Column} names a dimension or measure by its name before renames; numbers, "text", yes, no, null; + - * / (dividing by 0 gives empty); = != < <= > >=; AND, OR, NOT; if(condition, then, else), coalesce(a, b), round(x, digits), abs(x), concat(a, b), isnull(x), tostring(x); sum(x), mean(x), min(x) and max(x) of a column over the rows shown, after the row limit, such as ${Sales} / sum(${Sales}) for each row's share of the rows shown; offset(x, n), the value n rows below in the rows shown (-1 the row above, empty past the first or last), and index(x, n), the value in row n of the rows shown (counting from 1), such as ${Sales} - offset(${Sales}, 1) for the lead over the next row; median(x), and count(x) of its values that aren't empty, over the rows shown; runningtotal(x), the sum of x from the first row shown down to this one, in the rows' order; power(x, y), x to the power y (empty for a negative x with a fractional y); diffdays(start, end), the whole days from the start date to the end date, negative when the end is earlier, empty when either is empty
            • as (string, required): The column's name
        • columnOrder (array of string): Every column once, by its name before renames, in the order to show them, removed columns optional; omit for dimensions, measures, then calculations
        • pivotLayout (object): Omit for the default: columns in the order their values first appear
          • columns (object, required)
            • When mode is fixed
              • mode (fixed, required)
              • values (array of object, required): One column per value, each under its own name: two values never share a column
            • When mode is discover
              • mode (discover, required)
              • order (string, required): One of asc, desc, first_seen.
              • limit (integer, required)
          • nullLabel (string or null, required): Column name for NULL values; null drops them
          • fill (number or null, required): Value for empty cells; null leaves them empty
        • filters (array of object, required): All must hold
          • When kind is compare
            • kind (compare, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of eq, neq, gt, gte, lt, lte.
            • value (object, required)
          • When kind is in
            • kind (in, required)
            • column (string, required): A column name, exact and case-sensitive
            • values (array of object, required)
            • negate (boolean, required)
          • When kind is between
            • kind (between, required)
            • column (string, required): A column name, exact and case-sensitive
            • from (object, required)
            • to (object, required)
          • When kind is text
            • kind (text, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of equals, contains, starts_with, ends_with.
            • value (object, required)
            • caseSensitive (boolean, required)
            • negate (boolean, required)
          • When kind is is_blank
            • kind (is_blank, required)
            • column (string, required): A column name, exact and case-sensitive
            • negate (boolean, required)
          • When kind is relative_date
            • kind (relative_date, required)
            • column (string, required): A column name, exact and case-sensitive
            • range (string, required): One of current, last, next.
            • count (integer or null, required)
            • unit (string, required): One of day, week, month, quarter, year.
            • complete (boolean): last/next only: whole units, leaving out the current one, e.g. the last 3 complete months on Oct 21 are Jul, Aug and Sep. Omit for the window through today
            • includeCurrent (boolean): With complete only: the current unit too, e.g. the last 1 complete year with the current one is last year and this year. Omit to leave it out
            • toDate (boolean): current only: the unit so far, through today, e.g. this year to date. Omit for the whole unit
            • earlier (object): current/last only: the same window, this many units earlier: this year to date 1 year earlier is the same dates last year, and the last 3 complete months 3 months earlier are the 3 months before them. Omit for the window itself
              • count (integer, required)
              • unit (string, required): One of day, week, month, quarter, year.
        • renames (array of object): Output columns under another name
          • from (string, required): A column name, exact and case-sensitive
          • to (string, required): The column's new name
        • sorts (array of object, required): Columns to sort by, the first first, each next one breaking ties; empty for none
          • column (string, required): A column, by its name before renames; a split's cell by its values
          • direction (string, required): One of asc, desc.
          • nulls (string): One of first, last.
        • limit (integer or object or null, required): Rows to keep: a number, an integer parameter, or null for all
          • type (parameter, required)
          • key (string, required)
        • limitFrom (string): One of start, end.
        • totals (object): A table's total row, its subtotal rows and, with a split, its Total column, each measure over the rows shown (under a limit, only those). Omit for none
          • row (boolean, required): A last row with the total of each column; charts leave it out
          • column (boolean, required): With a pivot after the aggregate: a Total column with each row across the pivot
          • subtotals (boolean): Grouped by two or more columns: a subtotal row above each group of every group-by column but the last, as a pivot table's subtotals, with each measure over the group's rows; charts leave them out
        • formats (array of object): numfmt patterns by output column
          • column (string, required): An output column, by the name it is shown under, after any rename
          • format (string, required): numfmt pattern, e.g. #,##0.00, $#,##0, 0.0%, yyyy-mm-dd
        • removedColumns (array of string): Columns, by their name before renames, to leave out of the rows while keeping the grouping, e.g. group by region and month but show no region column; a split's column is named by its values
        • keepGroupsWhere (array of object): Conditions on the grouped rows' dimensions and measures (by their name before renames), all of which must hold, right after the grouping and before the calculations, the sort and the limit, as SQL's HAVING does, so the calculations and the limit only see the rows kept: each region's share among the regions with more than 20 deals. To keep rows by a measure or a calculation while the calculations still cover every group, as for the top 10 of the customers over 1,000,000, use keepRowsBeforeLimit. Needs a dimension or measure and no split
          • When kind is compare
            • kind (compare, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of eq, neq, gt, gte, lt, lte.
            • value (object, required)
          • When kind is in
            • kind (in, required)
            • column (string, required): A column name, exact and case-sensitive
            • values (array of object, required)
            • negate (boolean, required)
          • When kind is between
            • kind (between, required)
            • column (string, required): A column name, exact and case-sensitive
            • from (object, required)
            • to (object, required)
          • When kind is text
            • kind (text, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of equals, contains, starts_with, ends_with.
            • value (object, required)
            • caseSensitive (boolean, required)
            • negate (boolean, required)
          • When kind is is_blank
            • kind (is_blank, required)
            • column (string, required): A column name, exact and case-sensitive
            • negate (boolean, required)
          • When kind is relative_date
            • kind (relative_date, required)
            • column (string, required): A column name, exact and case-sensitive
            • range (string, required): One of current, last, next.
            • count (integer or null, required)
            • unit (string, required): One of day, week, month, quarter, year.
            • complete (boolean): last/next only: whole units, leaving out the current one, e.g. the last 3 complete months on Oct 21 are Jul, Aug and Sep. Omit for the window through today
            • includeCurrent (boolean): With complete only: the current unit too, e.g. the last 1 complete year with the current one is last year and this year. Omit to leave it out
            • toDate (boolean): current only: the unit so far, through today, e.g. this year to date. Omit for the whole unit
            • earlier (object): current/last only: the same window, this many units earlier: this year to date 1 year earlier is the same dates last year, and the last 3 complete months 3 months earlier are the 3 months before them. Omit for the window itself
              • count (integer, required)
              • unit (string, required): One of day, week, month, quarter, year.
        • keepRowsBeforeLimit (array of object): Conditions on the grouped rows' dimensions, measures and before-limit calculations (by their name before renames), all of which must hold, after the calculations and before the column order, the sort and the limit, so the limit counts only the rows kept while the calculations still cover every group: the top 10 customers of those over 1,000,000, the regions with over 5% of the total. A condition on a calculation that reads the rows the limit keeps (sum(), offset()) goes in keepRowsWhere. Needs a dimension or measure and no split
          • When kind is compare
            • kind (compare, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of eq, neq, gt, gte, lt, lte.
            • value (object, required)
          • When kind is in
            • kind (in, required)
            • column (string, required): A column name, exact and case-sensitive
            • values (array of object, required)
            • negate (boolean, required)
          • When kind is between
            • kind (between, required)
            • column (string, required): A column name, exact and case-sensitive
            • from (object, required)
            • to (object, required)
          • When kind is text
            • kind (text, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of equals, contains, starts_with, ends_with.
            • value (object, required)
            • caseSensitive (boolean, required)
            • negate (boolean, required)
          • When kind is is_blank
            • kind (is_blank, required)
            • column (string, required): A column name, exact and case-sensitive
            • negate (boolean, required)
          • When kind is relative_date
            • kind (relative_date, required)
            • column (string, required): A column name, exact and case-sensitive
            • range (string, required): One of current, last, next.
            • count (integer or null, required)
            • unit (string, required): One of day, week, month, quarter, year.
            • complete (boolean): last/next only: whole units, leaving out the current one, e.g. the last 3 complete months on Oct 21 are Jul, Aug and Sep. Omit for the window through today
            • includeCurrent (boolean): With complete only: the current unit too, e.g. the last 1 complete year with the current one is last year and this year. Omit to leave it out
            • toDate (boolean): current only: the unit so far, through today, e.g. this year to date. Omit for the whole unit
            • earlier (object): current/last only: the same window, this many units earlier: this year to date 1 year earlier is the same dates last year, and the last 3 complete months 3 months earlier are the 3 months before them. Omit for the window itself
              • count (integer, required)
              • unit (string, required): One of day, week, month, quarter, year.
        • keepRowsWhere (array of object): Conditions on the rows' own columns (dimensions, measures and calculations by their name before renames), all of which must hold, after the sort, the limit and every calculation: keep the rank 1 row of the top 10, with its share of the 10. To keep rows before the limit, use keepRowsBeforeLimit. Needs a dimension or measure and no split
          • When kind is compare
            • kind (compare, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of eq, neq, gt, gte, lt, lte.
            • value (object, required)
          • When kind is in
            • kind (in, required)
            • column (string, required): A column name, exact and case-sensitive
            • values (array of object, required)
            • negate (boolean, required)
          • When kind is between
            • kind (between, required)
            • column (string, required): A column name, exact and case-sensitive
            • from (object, required)
            • to (object, required)
          • When kind is text
            • kind (text, required)
            • column (string, required): A column name, exact and case-sensitive
            • op (string, required): One of equals, contains, starts_with, ends_with.
            • value (object, required)
            • caseSensitive (boolean, required)
            • negate (boolean, required)
          • When kind is is_blank
            • kind (is_blank, required)
            • column (string, required): A column name, exact and case-sensitive
            • negate (boolean, required)
          • When kind is relative_date
            • kind (relative_date, required)
            • column (string, required): A column name, exact and case-sensitive
            • range (string, required): One of current, last, next.
            • count (integer or null, required)
            • unit (string, required): One of day, week, month, quarter, year.
            • complete (boolean): last/next only: whole units, leaving out the current one, e.g. the last 3 complete months on Oct 21 are Jul, Aug and Sep. Omit for the window through today
            • includeCurrent (boolean): With complete only: the current unit too, e.g. the last 1 complete year with the current one is last year and this year. Omit to leave it out
            • toDate (boolean): current only: the unit so far, through today, e.g. this year to date. Omit for the whole unit
            • earlier (object): current/last only: the same window, this many units earlier: this year to date 1 year earlier is the same dates last year, and the last 3 complete months 3 months earlier are the 3 months before them. Omit for the window itself
              • count (integer, required)
              • unit (string, required): One of day, week, month, quarter, year.
    • When type is set-ops
      • type (set-ops, required)
      • datasheetRef (string, required): An existing datasheet id, or the temporaryId of a datasheet created earlier in this patch
      • parameters (array of object or null): Replaces the datasheet's complete parameter set; omit to keep it
        • key (string, required)
        • parameter (object, required)
          • When type is string
            • label (string, required)
            • type (string, required)
            • value (string or null, required)
          • When type is integer
            • label (string, required)
            • type (integer, required)
            • value (integer or null, required)
          • When type is number
            • label (string, required)
            • type (number, required)
            • value (number or null, required)
          • When type is boolean
            • label (string, required)
            • type (boolean, required)
            • value (boolean or null, required)
          • When type is date
            • label (string, required)
            • type (date, required)
            • value (string (date) or null, required)
          • When type is timestamp
            • label (string, required)
            • type (timestamp, required)
            • value (string (date-time) or null, required)
      • ops (array of object, required): The complete op list after the reads, in run order: an op whose ref is an existing op id keeps that op, and existing ops left out are removed. Only on a datasheet with a join step: keep the join first with steps after it; on any other, use set-query
        • ref (string, required): An existing op id to keep that op, or a new short name
        • title (string or null): Omit to keep a kept op's title; a step op without one shows its step summary
        • inputs (array of object or null): Omit to keep a kept op wired as it is (one that read the op above reads its new op above). A new op reads the op above, which SQL reads as input; a new first op reads the datasheet's one read, as source or the read's alias
          • alias (string or null): SQL ops: the name the statement reads this input by
          • from (string, required): previous: the op above (above the first op, the datasheet's one read); op: the one ref names One of previous, op.
          • ref (string or null): op: the ref of an earlier op in this list, or a read's operation id or alias
        • step (object or null): A step op's call; on a kept op, send it only to change it
          • fn (string, required): One of select, rename, filter, sort, limit, aggregate, pivot, window, join.
          • params (object, required): The params of its fn, whose exact JSON Schema getReportDataGuide answers when you name the fn in stepFunctions
      • formats (array of object or null): Replaces the datasheet's formats; omit to keep them
        • column (string, required): An output column, by the name it is shown under, after any rename
        • format (string, required): numfmt pattern, e.g. #,##0.00, $#,##0, 0.0%, yyyy-mm-dd
    • When type is set-read-type
      • type (set-read-type, required)
      • datasheetRef (string, required): An existing datasheet id, or the temporaryId of a datasheet created earlier in this patch
      • readType (string, required): aggregated: its data, as the tool displays it; raw: its tidy read, to transform; image: its picture One of aggregated, raw, image.
    • When type is set-unpivot
      • type (set-unpivot, required)
      • datasheetRef (string, required): An existing datasheet id, or the temporaryId of a datasheet created earlier in this patch
      • unpivot (object or null): The columns of the range this datasheet reads to turn into rows, which every datasheet reading the range raw gets, and this one then reads it raw. Null takes it out; omit to keep the range's current one
        • rows (array of object, required): One output row per input row and entry, in this order; the input columns no entry names repeat on each
          • label (string, required): What the name column says on this row, such as the column's name or "2022"
          • columns (array of string or null, required): The input column for each of values, in order; null leaves that value empty on this row
        • name (string, required): The column that holds each row's label, such as "Year"
        • values (array of string, required): The columns the values go in: one, such as "Value", or one per measure
      • fillDown (object or null): Run first, as Power Query fills down: each heading row, a label with every other cell empty, becomes the value of a new column on the rows under it, and the heading row is left out. Null takes it out; omit to keep the range's current one
        • column (string, required): The column holding the row labels, headings included
        • into (string, required): The new column the headings fill, such as "Section"
      • removeRows (array of object or null): Run after fillDown: rows matching any of these are left out, such as the sheet's own totals that add up the rows above them. Null takes them out; omit to keep the range's current ones
        • When kind is compare
          • kind (compare, required)
          • column (string, required): A column name, exact and case-sensitive
          • op (string, required): One of eq, neq, gt, gte, lt, lte.
          • value (object, required)
        • When kind is in
          • kind (in, required)
          • column (string, required): A column name, exact and case-sensitive
          • values (array of object, required)
          • negate (boolean, required)
        • When kind is between
          • kind (between, required)
          • column (string, required): A column name, exact and case-sensitive
          • from (object, required)
          • to (object, required)
        • When kind is text
          • kind (text, required)
          • column (string, required): A column name, exact and case-sensitive
          • op (string, required): One of equals, contains, starts_with, ends_with.
          • value (object, required)
          • caseSensitive (boolean, required)
          • negate (boolean, required)
        • When kind is is_blank
          • kind (is_blank, required)
          • column (string, required): A column name, exact and case-sensitive
          • negate (boolean, required)
        • When kind is relative_date
          • kind (relative_date, required)
          • column (string, required): A column name, exact and case-sensitive
          • range (string, required): One of current, last, next.
          • count (integer or null, required)
          • unit (string, required): One of day, week, month, quarter, year.
          • complete (boolean): last/next only: whole units, leaving out the current one, e.g. the last 3 complete months on Oct 21 are Jul, Aug and Sep. Omit for the window through today
          • includeCurrent (boolean): With complete only: the current unit too, e.g. the last 1 complete year with the current one is last year and this year. Omit to leave it out
          • toDate (boolean): current only: the unit so far, through today, e.g. this year to date. Omit for the whole unit
          • earlier (object): current/last only: the same window, this many units earlier: this year to date 1 year earlier is the same dates last year, and the last 3 complete months 3 months earlier are the 3 months before them. Omit for the window itself
            • count (integer, required)
            • unit (string, required): One of day, week, month, quarter, year.

Response 200

Success

application/json

  • conversionError (string): Why the drafts could not be turned into slides, when one could not. slides is empty then: fix it and render again.
  • datasheetChangesError (string): Why the datasheetChanges failed, when they did, naming the datasheet and step. slides is empty then: fix them with previewReportDatasheetChanges and render again.
  • slides (array of object, required): The rendered drafts, in the order they were sent.
    • id (string, required): The slide, by the id it was sent with.
    • issues (array of string, required): What to fix before the draft can become a slide: text that overflows, elements outside the slide, styles the converter drops, colours outside the theme.
    • notes (array of string, required): What to check by eye. These block nothing.
    • image (string (base64) or null, required): The draft as it rendered, as a PNG image encoded in base64. Null when it could not be drawn.