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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
chaitanyasharma
Regular Visitor

PBIRS issue updating shared datasource of a report

Hello,
I am trying to automate rdl file deployments to our power bi report server via the APIs https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0 
If the report already existed on the report server i am able to update it and update its data source as well.
If the report is new, that is, it did not exist previously on the report server I am able to post it to the report server using https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0#/Reports/AddReport 
But I am facing an issue trying to update its shared data source using the API https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0#/Reports/SetReportDataSource 
after much looking around i realized that i needed to send the entire body of the expected json, i had assumed it will only require the fields that needed to be updated
but to no avail it still throws a bad request.
I have also tried using the reporting service tools but 

Set-RsDataSourceReference

throws $item does not contain a dataSource reference

so i tried to get the data source of the report via the api https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0#/Reports/GetReportDataSources and saw that the is reference property is set to false, assuming that is casuing the reporting service tools to fail i tried to update that property via the api https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0#/Reports/SetReportDataSource 
but it still throws 400 bad request. I am stuck, here is a visual representation of what i am trying to do

when we upload a new report this is what we see 

chaitanyasharma_2-1702024455886.png

 

but we dont want a custom data source i want to via APIs or the reporting service tools select the shared data source button

chaitanyasharma_3-1702024471136.png


click on browse and and select a data source from the report server.
any help is appreciated.
Thankyou

 

0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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