Using the SSRS REST API , I can deploy a report from PowerShell in an automation pipeline.
But how do I use the API to wire it up to our predefined Shared DataSources?
The PUT Reports({Id})/DataSources endpoint doesn't seem to be for Shared DataSources.
Gemini suggested PATCH /Reports({id})/Properties
, which understandably gave 405 Method Not Allowed
, and with PUT /Reports({id})/Properties
I got 400 Bad Request
Thank you, David Browne; the suggestion of using Fiddler to watch queries to the report server put me on the right track.
I found it makes calls to PUT .../CatalogItems({id})/Model.Report/DataSources
.
I don't see that endpoint documented in the Swagger Documentation, but it seems to work.
The body is a list of data source references like this:
[
{
"Name":"MyDataSource",
"Path":"/Path/to/MyDataSource",
"IsReference":true
}
]