How can I get/update the DataSource linked to a SSRS Subscripton via API 2.0?
I have a subscription that has its data source connection severed every time I update the source report (the subscription is on a linked report).
I want to get the DataSource so that I can verify it exists and then reassociate it to the subscription.
If I run the following command:
$targetSubscriptionID='xxx'
$checkSubscriptionURI = "http://localhost/reports/api/v2.0/subscriptions($targetSubscriptionID)
$checkSubscriptionResponse = Invoke-RestMethod -Uri $checkSubscriptionURI -Method GET -Credential $creds -ContentType 'application/json'
I get everything EXCEPT the DataSource linked to the subscription....
$checkSubscriptionResponse
@odata.context :
`http://localhost/reports/api/v2.0/$metadata#Subscriptions/$entity`
Id : xxx
Owner : xx
IsDataDriven : True
Description : DailyGeneration
Report : /Reports/ReportLetterDaily
IsActive : True
EventType : TimedSubscription
Schedule : @{ScheduleID=; Definition=}
ScheduleDescription :
LastRunTime : xxx
LastStatus : Done: 0 processed of 0 total; 0 errors.
DataQuery : @{CommandText=XXX; Timeout=300}
ExtensionSettings : @{Extension=Report Server FileShare; ParameterValues=System.Object[]}
DeliveryExtension : Report Server FileShare
LocalizedDeliveryExtensionName :
ModifiedBy : xxx
ModifiedDate : 2024-07-24T21:34:56.223-04:00
ParameterValues :
{@...}
How do I get the DataSource? How can I update to reassociate?