REST API for creating Power BI datasets, tables and columns
I'm looking for a REST API that I can use to manage Power BI datasets: create dataset, add/remove tables, add/remove columns, add/remove measures, etc. In my specific use case, I intend to consume such API in Java.
@Daryl-Lynch-Bzy So to import a dataset, I should send over a pbix file? I know that pbix is a ZIPped folder structure, most of which is quite readable, with one exception: the "DataModel" file (compressed with "xpress 9"). So how should I create the PBIX? Or should I send something different?
Hi @ErikVoorbraak - It is not possible to edit the Data Model (add/remove tables, add/remove columns, add/remove measures) via the Rest API. You can only create, replace and refresh.
If you want to modify the Data Model (add/remove tables, add/remove columns, add/remove measures) you will need to use an XMLA endpoint tool. Tabular Editor is the most popular external tool. Try the paid version, Tabular Editor 3. Tabular Editor 3
Thank you for your answer. You wrote "You can only create, replace and refresh" - are you referring to the API documentation on https://learn.microsoft.com/en-us/rest/api/power-bi/? Looking in the section "Datasets", I cannot find a REST call to create or replace (non-empty) datasets. Should I look in a different place?