Forum Discussion

learninggeek_01's avatar
learninggeek_01
Regular Visitor
10 months ago
Solved

Updating Schedule refresh for Power BI Report

Hi,

As we know, Schedule refresh for Power BI report could be set manually on the UI.

If we are trying to automate the setup of schedule refresh on a report instead of manually entering it, what are the optins we have -

1) Can the meta data tables ( Catalog, Subscriptions, Schedule, ReportSchedule) be used to stage entries into these tables and the schedule refresh shows up on the UI fo the report?

2) Any REST API code that could be used in a power shell script to place/update the schedule information on the report?

 Was able to extract Schedule from a Power BI report on Test report server to a JSOn file.

   Now need this information to be read from JSON file and updated to the report on Prod report sever? - REST API can do it? 

3) If first and second options are not feasible, what other options are available? 

 

Also, why does this mesage popup under "Schedule Refresh" section ?

 

 

 

 

  • v-achippa's avatar
    v-achippa
    10 months ago

    Hi learninggeek_01,

     

    Cache refresh plans apply only to Paginated reports, not to PBIX reports.
    For power bi(.pbix) reports use Refresh plans, which are managed separately through the Power BI Report Server REST API.

    For your reference below is the official documentation:

    https://learn.microsoft.com/en-us/power-bi/report-server/rest-api

     

    Below is a simple power shell code to create a refresh plan for a PBIX report using the REST API:

    $serverUrl = "https://<your-server>/reports/api/v2.0"
    $reportPath = "/Sales Reports/SalesPerformance"
    $report = Invoke-RestMethod -Uri "$serverUrl/CatalogItems?path=$([uri]::EscapeDataString($reportPath))" -UseDefaultCredentials
    $reportId = $report.value[0].Id

    $body = @{
    "@odata.type" = "#Model.RefreshPlan"
    "Name" = "Daily Refresh"
    "Enabled" = $true
    "StartDate" = (Get-Date "2025-10-14T02:00:00Z")
    "Recurrence" = @{
    "@odata.type" = "#Model.DailyRecurrence"
    "DaysInterval" = 1
    }
    } | ConvertTo-Json -Depth 10

    Invoke-RestMethod -Uri "$serverUrl/CatalogItems($reportId)/RefreshPlans" `
    -Method POST -ContentType "application/json" `
    -UseDefaultCredentials -Body $body

     

    Thanks and regards,

    Anjan Kumar Chippa

7 Replies

  • v-achippa's avatar
    v-achippa
    Community Support

    Hi learninggeek_01,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    Here the failure message appears becuase currently the report has no refreshable external data connections, so there is nothing for the server to refresh. Looks like the report uses a data source type that power bi report server does not support for scheduled refresh. Power BI Report Server supports scheduled refresh for supported PBIX data sources but only when credentials are stored or configured.

     

    Power BI Report Server does not support directly editing its internal database tables to add or update schedules. Those tables are internal and manual edits are unsupported and can corrupt encrypted credential data and internal relationships.

    To automate creation or updates of refresh schedules, the supported method is to use the Power BI Report Server REST API. For reference, please see below official documents on the Power BI Report Server REST API:

    https://learn.microsoft.com/en-us/power-bi/report-server/rest-api

    https://learn.microsoft.com/en-us/rest/api/power-bi-report/

     

    Thanks and regards,

    Anjan Kumar Chippa

  • Thank you for the response! 

    Does REST API for writing schedules only work on Power BI cloud? 

    Ex: This shows that subscriptions are only supported for paginated reportshttps://learn.microsoft.com/en-us/power-bi/report-server/compare-report-server-service

    Compare Power BI Report Server and the Power BI service - Power BI | Microsoft Learn

    This article compares the features of Power BI Report Server and the Power BI service.

     the cloud version can do both, not on prem.

     

    If it works with On Prem, Can you point me to sample code where the REST API can write schedule informtion to a Power BI report on report server. 

     

    • v-achippa's avatar
      v-achippa
      Community Support

      Hi learninggeek_01,

       

      Yes, the Power BI Report Server REST API works on-premises and can create, update and delete refresh schedules for PBIX reports hosted on an on-prem Report Server. It does not depend on Power BI Service or the cloud.

      Here the confusion in the comparison article is because the subscriptions are indeed only for paginated reports, but PBIX refresh plans are managed separately through the REST API, not through subscriptions.

      Please refer to the below official documentation here:

      https://learn.microsoft.com/en-us/power-bi/report-server/rest-api

       

      Thanks and regards,

      Anjan Kumar Chippa

      • learninggeek_01's avatar
        learninggeek_01
        Regular Visitor

        Thank you!

        Will you over the reference link.

        How about Cache refresh plans. Are they for Paginated reports or Power B Ireports?

        Any sample power shell code that access RESP API for craeting schedules that I can access?