Skip to main content

Get datasheet data

GET https://api.rollstack.com/public/v1/reports/{id}/datasheets/{datasheetId}/data

The table a report's chart is drawn from: the datasheet's steps run over the copies stored at its sources' last reads; the source is never queried. Only the report's editors may read it, the people who already see this table in the report's Edit data view in Rollstack: it can hold columns and rows the slides don't show, so viewers of the report are refused. Fails for a picture datasheet (its kind in listReportDatasheets), which has no table. Also fails until every source it reads has been read, after a source's latest read failed, and once a stored copy expires, 30 days after its read. At most 30 reads a minute per user.

Requires the slide_decks:read scope.

Operation ID: getReportDatasheetData.

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/.
  • datasheetId (string, required): The datasheet whose table to read: an id from listReportDatasheets, or one of the datasheetIds returned by addReportDatasheets. It must be one of this report's datasheets. A datasheet that reads a picture, such as a dashboard tab added with addReportDatasheets, has no table, so the request fails: add the tab's charts as data with addReportDashboardElements.

Query parameters

  • limit (integer): The maximum number of rows to return, starting from the first row of the table. If the table has more, truncated is true. Can range from 1 to 1000. Defaults to 200.

Response 200

Success

application/json

  • columns (array of object, required): The columns of the table, in the same order as the cells of each row in rows.
    • name (string, required): The column's name in the datasheet's table, which the report's charts and tables use to refer to it. Unless the datasheet renames it, a column read from an uploaded file or a spreadsheet range is named after its header; a blank header becomes Column N, after the column's position, and a repeated one gets a _2, _3 suffix.
    • label (string): The column's display name, when its source gives one, such as a field's label in Looker or Metabase. Charts and tables drawn from the datasheet show it instead of name, unless a table renames the column. Omitted when the column has none.
    • type (string, required): What the column's cells contain: number for numbers, date for dates and times, string for text, and boolean for true or false. Any cell can also be null when it is empty. One of number, date, string, boolean.
  • rows (array of array of string or number or boolean or null, required): The rows of the table, starting from the first, at most limit of them. Each row is an array of cells in the order of columns. An empty cell is null, and a date cell is an ISO 8601 string in UTC, at midnight when the source gives a day without a time.
  • stacking (string): How the chart in the datasheet's source stacks its series, such as a Looker, Metabase or Power BI chart, or a chart imported from PowerPoint. Area, bar and column charts drawn from the datasheet stack the same way, unless their own Stacking setting overrides it. none doesn't stack the series, stacked piles them on top of one another, and percent piles them up to 100% so each shows its share of the total. Omitted when the source sets no stacking, as with an uploaded file or a spreadsheet range; charts then don't stack unless set to. One of none, stacked, percent.
  • totalRow (true)
  • subtotals (object): When the datasheet's query adds subtotals: rowFields are the columns its rows are grouped by, outermost first, and levels has one number per row in rows, how many of those columns the row is grouped by. A row grouped by fewer than all of them is a subtotal above its group's rows, and 0 is the total row. Charts leave those rows out. Omitted without subtotals.
    • rowFields (array of string, required)
    • levels (array of integer, required)
  • rowFields (array of string)
  • truncated (boolean, required): Whether the table has more rows than limit, so rows doesn't contain all of them. Raise limit to get more, up to the first 1000 rows.
  • readAt (string (date-time), required): When Rollstack read the source data the table is built from. For a datasheet that reads several sources, the oldest of those reads.