Get datasheet data
- OpenAPI 3.1.0 document: https://api.rollstack.com/public/v1/openapi.json
- The whole reference in Markdown: https://docs.rollstack.com/llms-full.txt
- An index of the reference: https://docs.rollstack.com/llms.txt
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 itsidfromlistReportsorcreateReport. Only reports whosetypeisSlideDeckwork here: another type, such as a Google Slides presentation, returns400. 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: anidfromlistReportDatasheets, or one of thedatasheetIdsreturned byaddReportDatasheets. It must be one of this report's datasheets. A datasheet that reads a picture, such as a dashboard tab added withaddReportDatasheets, has no table, so the request fails: add the tab's charts as data withaddReportDashboardElements.
Query parameters
limit(integer): The maximum number of rows to return, starting from the first row of the table. If the table has more,truncatedistrue. Can range from1to1000. Defaults to200.
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 inrows.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 becomesColumn N, after the column's position, and a repeated one gets a_2,_3suffix.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 ofname, unless a table renames the column. Omitted when the column has none.type(string, required): What the column's cells contain:numberfor numbers,datefor dates and times,stringfor text, andbooleanfortrueorfalse. Any cell can also benullwhen it is empty. One ofnumber,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 mostlimitof them. Each row is an array of cells in the order ofcolumns. An empty cell isnull, and adatecell 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.nonedoesn't stack the series,stackedpiles them on top of one another, andpercentpiles 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 ofnone,stacked,percent.totalRow(true)subtotals(object): When the datasheet's query adds subtotals:rowFieldsare the columns its rows are grouped by, outermost first, andlevelshas one number per row inrows, 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, and0is 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 thanlimit, sorowsdoesn't contain all of them. Raiselimitto get more, up to the first1000rows.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.