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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
Anonymous
Not applicable

API exploration - How to get model metadata

Hello,

 

On Report Server, i noticed using F12 Developer options that i could see something similar to report Layout (whem pbix decompressed) if i see the following link :

https://server/powerbi/api/explore/reports/{report id}/modelsAndExploration?preferReadOnlySession=true

 

My question is if there is an API GET (or POST method) where i can retrieve the metadata of model - Example : measures code, partitions, power query code, with the objective to build an automatic model documentation solution.

 

What i would look is something like :

https://server/powerbi/api/explore/reports/{report id}/measures or https://server/powerbi/api/explore/reports/{report id}/datamodel

 

Thanks

Rui

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

The full public, documented API is published here https://app.swaggerhub.com/apis/microsoft-rs/pbirs/2.0# and there are no methods in there that return the model metadata. Although you will not find the modelsAndExploration endpoint in there either as this must be an internal, undocumented endpoint. 

 

However becuase PBIRS does not offer a web editing experience I do not believe you will even find an undocumented API to get the model metadata

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

How can I obtain token for these APIs? Im unable to access these APIs because of the tokens. Could anyone tell me something regarding this?


@Anonymous wrote:

How can I obtain token for these APIs? Im unable to access these APIs because of the tokens. Could anyone tell me something regarding this?


The on-prem report server does not require or support the use of tokens for authentication. They use NTLM/Kerberos auth by default.

 

Just doing a quick google for "Power BI REST API authentication" turned up the following which may help

https://community.powerbi.com/t5/Developer/REST-API-Get-Access-Token/m-p/1895937 

d_gosbell
Super User
Super User

The full public, documented API is published here https://app.swaggerhub.com/apis/microsoft-rs/pbirs/2.0# and there are no methods in there that return the model metadata. Although you will not find the modelsAndExploration endpoint in there either as this must be an internal, undocumented endpoint. 

 

However becuase PBIRS does not offer a web editing experience I do not believe you will even find an undocumented API to get the model metadata

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.