Replace an uploaded file
- 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
PUT https://api.rollstack.com/public/v1/datasets/{id}
Replaces an uploaded CSV file's rows, or a workbook's content with a new .xlsx sent as multipart/form-data in the file field. It keeps its id, and a CSV is never replaced by a workbook or the other way round. Reports built on it show the new content after their next run or message to the slides agent. An invalid file leaves the current one in place, and a sheet or range the new workbook no longer has fails its datasheets' reads. Only the user who created it may. From an MCP client, send a workbook with createDatasetUpload and this file's id.
Requires the slide_decks:write scope.
Operation ID: replaceDataset.
Path parameters
id(string, required): The uploaded file to replace or delete: theidreturned bycreateDataset. Only the user who uploaded the file can replace or delete it; for anyone else, the request fails with a404, as if the file did not exist.
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
csv(string, required): The file's data, as CSV text: a header row naming the columns, then at least one row of data. WithreplaceDataset, it replaces the file's whole content, header included, and the uploaded file must be a CSV file. The header's names become the column names of the datasheets made from the file: a blank one becomesColumn N, after the column's position, and a repeated one gets a_2,_3suffix. Values can be separated by commas, semicolons or tabs, detected from the header row. At most 10 MB. Example:region,revenue EMEA,1200000 Americas,2400000.
multipart/form-data
file(string (binary), required): The Excel workbook to upload. WithcreateDataset, it becomes a new uploaded file named after the file, such asQ3 pipeline.xlsx; withreplaceDataset, it replaces the content of an uploaded workbook, which keeps its id and name. An uploaded workbook can't be added to a report withaddReportDatasheets, which takes uploaded CSV files only. The file's name must end in.xlsx, and it can be at most 10 MB; legacy.xls, macro-enabled and password-protected workbooks are rejected.
Response 200
Success
application/json
id(string, required): Unique identifier for the uploaded file. Pass it asidtoreplaceDatasetanddeleteDatasetand, for a CSV file, asdatasetIdtoaddReportDatasheetsto add it to a report.name(string, required): The uploaded file's name: thenameit was created with for a CSV file, or the workbook's file name for an Excel workbook, such asQ3 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 withreplaceDataset, or when it was uploaded if it has never been replaced.