Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
GwendolineMeta
New Member

[API rest on premise] power BI report pbix data model

hi, 

I am developing a data governance software,

I don't have the problem with Power BI cloud but my problem below is with Power BI on premise

I would like to retrieve the data model of the powerBI report (the pbix report).

I tried "GET /PowerBIReports({Id})/DataModelParameters" but the reponse is empty.

I downloaded the pbix file with REST API but I did not find the REST API to have the data model linked to the report. I tried to uncompress the dataModel included in the pbix file but I did not find the right compression algorithm.

My temporary solution is : Open the report with desktop application and export the model/template (pbit file), with this file I access to uncompressed data model.

But I can automatise this solution.

Do you have a better solution to have the data model of the power BI report with API REST ?

 

Thank

Gwendoline

1 ACCEPTED SOLUTION

Hi,

 

Finally I found a solution. I recovered a part of the pbi-tool.1.1.1 program. I run MSMDSRV.EXE with the right config file, I recover the port of this service. With this port I create a connection string to connect to a TOM server (Microsoft.AnalysisServices.Tabular). This server allows me to recover datamodel from a pbix file.

View solution in original post

5 REPLIES 5
v-jtian-msft
Community Support
Community Support

Hi,@GwendolineMeta .

Has your problem been solved?
If you have found suitable solutions, please share them as it will help more users with similar problems.
Or you can mark the valid suggestions provided by other users as solutions.
Thank you very much for your understanding and support of Power BI.

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian

Hi,

I will continue to work on finding a good solution when/if I find a solution I will post it here

Have a good day

Gwendoline Franchomme

Vanchy_Liao
Advocate II
Advocate II

@GwendolineMeta ,

i am afraid that you can not use this api to get the data model.

there is no documnet describing the actual/effective usages of PBIRS api. the only thing i can find is here.

pbirs | 2.0 | microsoft-rs | SwaggerHub

this swagger is 4 years ago. i can not tell if there is any updated version for PBIRS.

 

as @lbendlin suggested, you can leaverage .pbip, but PBIRS haven't implemented .pbip yet.

an alternative way is to folk the CLI tool below which can extract data model to json or txt.

pbi-tools CLI | pbi-tools

 

PBIRS is just inferior to PBI Service from both products and documents perspectives.

Hi,

 

Finally I found a solution. I recovered a part of the pbi-tool.1.1.1 program. I run MSMDSRV.EXE with the right config file, I recover the port of this service. With this port I create a connection string to connect to a TOM server (Microsoft.AnalysisServices.Tabular). This server allows me to recover datamodel from a pbix file.

lbendlin
Super User
Super User

Read about .PBIP and TMDL and git integration.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.