Click here to Skip to main content
15,902,032 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?

What I have tried:

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 PATCH /Reports({id})/Properties I got 400 Bad Request
Posted
Updated 9-May-24 18:28pm

1 solution

Ok, using Fiddler to watch queries to the report server, 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
	}
]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900