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
avatar user

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)