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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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