Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
chaitanyasharma
Regular Visitor

PBIRS This may be due to a connection failure, timeout or low disk condition within the database

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

0 REPLIES 0

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.