Skip to main content

Get an uploaded file

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

An uploaded CSV file or Excel workbook. A workbook comes with its sheets, the range each one uses and its named ranges: pass a sheet's id as sheetId to also read its cells as text, which shows where a table's header row is. Then add the sheet, or a range of it that starts at the header row, to a report with addReportDatasheets. Cells show what the workbook saved: nothing is recalculated.

Requires the slide_decks:read scope.

Operation ID: getDataset.

Path parameters

  • id (string, required): The uploaded file to read: the id returned by createDataset, or a datasheet's datasetId in listReportDatasheets. It can be any uploaded file of your organization, including one another member uploaded.

Query parameters

  • sheetId (string): A sheet of an uploaded workbook whose cells to read: one of the sheets[].id values of an earlier call. The answer's cells then holds them. Omit it to list the workbook's sheets only.
  • range (string): The cells to read from the sheet, in A1 notation without the sheet's name, such as A1:H40. Omit it to read from the start of the range the sheet uses. Only with sheetId. Example: A1:H40.

Response 200

Success

application/json

  • id (string, required): Unique identifier for the uploaded file. Pass it as id to replaceDataset and deleteDataset and, for a CSV file, as datasetId to addReportDatasheets to add it to a report.
  • name (string, required): The uploaded file's name: the name it was created with for a CSV file, or the workbook's file name for an Excel workbook, such as Q3 pipeline.xlsx. Replacing the file's content doesn't change it.
  • createdAt (string (date-time), required): When the file was uploaded. Replacing its content doesn't change it.
  • updatedAt (string (date-time), required): When the file's content was last replaced with replaceDataset, or when it was uploaded if it has never been replaced.
  • kind (string, required): What the uploaded file is. A csv file is added to a report whole. A workbook is added one sheet or range at a time. One of csv, workbook.
  • sheets (array of object or null, required): A workbook's sheets (tabs), in the order Excel shows them, hidden ones included. null for a CSV file.
    • id (string, required): Unique identifier for the sheet within the workbook. Pass it as sheetId to addReportDatasheets, with the file's id as datasetId.
    • title (string, required): The sheet's name, as shown on its tab in Excel.
    • hidden (boolean, required): Whether the sheet is hidden in Excel. A hidden sheet can still be read.
    • usedRange (string or null, required): The cells of the sheet that hold something, in A1 notation, such as A1:H40: what addReportDatasheets reads when you pass no range. It can start with title rows or hold several tables, so read its cells before adding it. null for an empty sheet.
  • namedRanges (array of object or null, required): A workbook's named ranges that lie on one of its sheets. null for a CSV file.
    • name (string, required): The named range's name in Excel.
    • sheetId (string, required): The sheet the named range is on: one of sheets[].id.
    • range (string, required): The cells the name stands for, in A1 notation. Pass it as range to addReportDatasheets.
  • cells (object or null, required): The cells of the sheet asked for with sheetId. null when no sheet was asked for.
    • sheetId (string, required): The sheet the cells were read from.
    • range (string, required): The cells asked for, in A1 notation.
    • rows (array of array of string, required): The cells as text, as Excel shows them, row by row from the top-left cell of range, with an empty string for an empty cell. At most 50 rows and 30 columns. Use them to find the row a table's header is on, then add the table with addReportDatasheets, starting its range at that row.
    • truncated (boolean, required): Whether range holds more rows or columns than rows shows. Read further with a range that starts lower.