Skip to main content

Get a datasheet

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

What a datasheet's data is written as: its query, in the shape set-query takes, its one SQL statement, or its join and the steps after it, and its formats. Read it before you change a datasheet with previewReportDatasheetChanges: set-query replaces the whole query, so start from this one. For the picture of a Tableau view or Power BI page added with addReportDatasheets, it also lists the charts on it, which addReportDashboardElements adds as data. Only the report's editors may.

Requires the slide_decks:read scope.

Operation ID: getReportDatasheet.

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): One of this report's datasheets, by its id in listReportDatasheets.

Response 200

Success

application/json

  • id (string, required): The datasheet's id.
  • name (string, required): The datasheet's name, as the report's editor shows it.
  • kind (string, required): data for a table, picture for an image, which has no query. One of data, picture.
  • elements (array of object or null, required): For the picture of a whole Tableau view or Power BI page, the charts on it, which addReportDashboardElements adds as data or pictures. null for any other datasheet. Listing them takes the dashboard's picture when it never had one, which can take a minute: past the wait the call answers that the source is still being read, so call it again.
    • ref (string, required): What to pass as ref to addReportDashboardElements to add this chart.
    • name (string, required): The chart's name on the dashboard.
    • type (string, required): Its kind in the dashboard's tool, such as a Tableau worksheet or legend.
    • reads (array of string, required): What it can be added as: data for its table, picture for its image.
    • datasheetIds (array of string, required): The report's datasheets that already read it with the dashboard's filters, to use instead of adding it again.
  • elementsNote (string or null, required): Why elements is empty or partial, such as charts not listed yet, or null.
  • query (object or null, required): Its data as a query, the Edit data editor's model, in the shape set-query takes: change what you need and send it whole. null when its data is SQL or a join.
  • sql (string or null, required): Its data as one SQL statement over its reads, or null.
  • ops (array of object or null, required): For a datasheet that joins its reads: the join and the steps after it, each by the ref set-ops keeps it by. null for any other.
  • formats (array of object, required): How its columns' numbers are shown: a numfmt pattern for each output column.
    • column (string, required)
    • format (string, required)