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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors