bi-datasets
Preview a OneDrive spreadsheet (xlsx/xls/xlsm/ods/csv/tsv)
Download a OneDrive tabular file and return a CSV-preview-shaped
response so the frontend wizard can share its rendering logic.
Response body::
{
"columns": [{"name": str, "type": str}, ...],
"row_count": int,
"sample_rows": [ {col: value, ...}, ... ], # ≤ 10 rows
"sheet_name": str | None # echo of the active sheet (null for csv/tsv)
}
Error codes:
- 400 — neither ``item_path`` nor ``item_id`` was provided
- 401 — user has no OneDrive integration
- 404 — file does not exist on the drive
- 415 — file extension not supported
- 500 — any other parse failure
POST
Preview a OneDrive spreadsheet (xlsx/xls/xlsm/ods/csv/tsv)
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Body for POST /api/v1/bi/onedrive/preview.
Either item_path or item_id must be provided. When both are
set, item_path wins (no Graph round-trip needed). sheet_name
accepts either a string (sheet title) or an integer (0-based index)
— ignored for .csv / .tsv files.
Response
Successful Response
Preview a OneDrive spreadsheet (xlsx/xls/xlsm/ods/csv/tsv)