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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
KetanB
Frequent Visitor

Programatically upload PBIX file to On-Prem Power BI Report Server

Guys,
I am a c# developer and new to Power BI. I have a requirement, I want to upload PBIX file existing on local client machine to the on-Prem Power BI report server. Meaning, end user should be given a Browse option and my ASP.Net Web application should be able to upload that PBIX to report server (URLs and creds are configured in config file).
I came across 2 ways to programatically upload PBIX file to report server..
1. Use Power Shell script
2. Use REST APIs of Power BI report Server

 

I just want to know if there is any third way.. Like using any Web Service of Power BI Report Server. In this approach, I tried using 'ReportingService2010' Proxy class I created using wsdl.exe from asmx exposed. And I was using CreateCatalogItem method, but it was not working for PBIX file; it worked for paginated RDL reports..
So, am I missing anything about using ReportingService2010 proxy class?.. Or Power Shell and APIs are the only two ways to upload PBIX to on prem report server?

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User


@KetanB wrote:

 

I just want to know if there is any third way.. Like using any Web Service of Power BI Report Server. In this approach, I tried using 'ReportingService2010' Proxy class I created using wsdl.exe from asmx exposed. And I was using CreateCatalogItem method, but it was not working for PBIX file; it worked for paginated RDL reports..
So, am I missing anything about using ReportingService2010 proxy class?.. Or Power Shell and APIs are the only two ways to upload PBIX to on prem report server?


So you are not missing anything about the web service proxy. The web services were developed back in 2010 before pbix reports existed. The old webservices are maintained for backward compatilibilty and any new functionality (like uploading/downloading pbix files) is being added to the REST API. The Powershell cmdlets for example are just a Powershell wrapper over the REST calls.

 

The REST calls should not be too hard to work with from C#, but one other option you could look at to make this easier might be to export the C# client SDK from swagger hub https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0

2019-07 rest api proxy.png

View solution in original post

2 REPLIES 2
d_gosbell
Super User
Super User


@KetanB wrote:

 

I just want to know if there is any third way.. Like using any Web Service of Power BI Report Server. In this approach, I tried using 'ReportingService2010' Proxy class I created using wsdl.exe from asmx exposed. And I was using CreateCatalogItem method, but it was not working for PBIX file; it worked for paginated RDL reports..
So, am I missing anything about using ReportingService2010 proxy class?.. Or Power Shell and APIs are the only two ways to upload PBIX to on prem report server?


So you are not missing anything about the web service proxy. The web services were developed back in 2010 before pbix reports existed. The old webservices are maintained for backward compatilibilty and any new functionality (like uploading/downloading pbix files) is being added to the REST API. The Powershell cmdlets for example are just a Powershell wrapper over the REST calls.

 

The REST calls should not be too hard to work with from C#, but one other option you could look at to make this easier might be to export the C# client SDK from swagger hub https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0

2019-07 rest api proxy.png

Thanks buddy. This cleared my doubts.

I am now trying with REST API to upload PBIX and I will also look at the SDK you suggested.

Thanks again.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors