Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am able to get all the reports from the power bi report server using the https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0#/Reports/GetReports endpoint, i am able to download the report i want via the https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0#/CatalogItems/GetCatalogItem endpoint. But when i try to put the report back via https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0#/CatalogItems/UpdateCatalogItem endpoint i am getting the following error "An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database."
the powershell script i am using with the update endpoint looks like so:-
$bytes = [System.IO.File]::ReadAllBytes($uploadItemPath);
$payload = @{
"@odata.type" = "#Model.Report";
"Content" = [System.Convert]::ToBase64String($bytes);
"ContentType"="";
"Name" = 'report name';
"Description" = "";
"Hidden"="False";
"Path" = '/path/on/the/server/report name';
} | ConvertTo-Json;
$response=Invoke-WebRequest -Uri $catalogItemsUri -Method Put -Body $payload -ContentType "application/json" -UseDefaultCredentials -UseBasicParsing | Out-Null;
$response=$response.Content | ConvertFrom-Json;
where $uploadItemPath is the path on my local machine where the rdl file is located
how should i go about resolving this issue