Forum Discussion

Delex_User1's avatar
Delex_User1
New Member
7 months ago
Solved

Scheduled refresh is not enabled

Hi Team,

I have connected API for loading data in pbi . after published in sevice cant see option for scheduled refresh

Looking for guidance!

Thanks,
Amey Vinchurkar 

*snaps for ref - 

 

 

  • Hii Delex_User1 

     

    If your model is built using API-based loading (push/streaming datasets) or DirectQuery, Scheduled Refresh is automatically disabled in the Service because Power BI does not own the data refresh cycle. In these cases, data is either pushed via API or queried live at report runtime, so there is nothing for Power BI to refresh on a schedule. If you need Scheduled Refresh, the data must be loaded using Import mode with a supported connector and credentials configured in the Service.

  • When you connect to an API using Power Query and:

    • build the URL dynamically (string concatenation, parameters, variables, etc.), or

    • use functions like Web.Contents() with a dynamically constructed URL,

    Power BI Service treats it as a dynamic data source, and blocks scheduled refresh for security reasons.

     

    Keep the base URL static and move dynamic parts into RelativePath and Query.

    Dynamic (breaks refresh):

    Web.Contents("https://api.example.com/" & Endpoint)

     

    Supported pattern:

    Web.Contents(
        "https://api.example.com",
        [
            RelativePath = "v1/data",
            Query = [ startDate = "2024-01-01", endDate = "2024-12-31" ],
            Headers = [ Authorization = "Bearer xxx" ]
        ]
    )

     

    If you’re using:

    • DateTime.LocalNow()

    • user-defined parameters that change per refresh

    • logic that alters the URL

    Replace them with:

    • fixed parameters, or

    • logic inside Query instead of URL concatenation

5 Replies

  • Hii Delex_User1 

     

    If your model is built using API-based loading (push/streaming datasets) or DirectQuery, Scheduled Refresh is automatically disabled in the Service because Power BI does not own the data refresh cycle. In these cases, data is either pushed via API or queried live at report runtime, so there is nothing for Power BI to refresh on a schedule. If you need Scheduled Refresh, the data must be loaded using Import mode with a supported connector and credentials configured in the Service.

  • When you connect to an API using Power Query and:

    • build the URL dynamically (string concatenation, parameters, variables, etc.), or

    • use functions like Web.Contents() with a dynamically constructed URL,

    Power BI Service treats it as a dynamic data source, and blocks scheduled refresh for security reasons.

     

    Keep the base URL static and move dynamic parts into RelativePath and Query.

    Dynamic (breaks refresh):

    Web.Contents("https://api.example.com/" & Endpoint)

     

    Supported pattern:

    Web.Contents(
        "https://api.example.com",
        [
            RelativePath = "v1/data",
            Query = [ startDate = "2024-01-01", endDate = "2024-12-31" ],
            Headers = [ Authorization = "Bearer xxx" ]
        ]
    )

     

    If you’re using:

    • DateTime.LocalNow()

    • user-defined parameters that change per refresh

    • logic that alters the URL

    Replace them with:

    • fixed parameters, or

    • logic inside Query instead of URL concatenation

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

    Hi Delex_User1 ,


    Thank you rohit1991  for the response provided!

    Has your issue been resolved? If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.

    Best Regards,
    Tejaswi.
    Community Support

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

      Hi Delex_User1 ,

       

      I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.

      Thank you.

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

      Hi Delex_User1 ,

       

      I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.

      Thank you.