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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Don-Bot
Helper V
Helper V

Refresh using REST API on Incremental Dataset isn't updating entire model

I am trying to use the REST API Dataset Refresh to programmatically update my datasets that are setup with incremental refresh. The rest api successfully kicks off the refresh of the models but for whatever reason it's not completely updating my models.

I have data for 5 years. The initial refresh should update all 5 years, and then theoretically update whatever changes in the future.

However, in my test model it updated 4 years completely but the missed July and AUgust of this year. I was able to manually update July and August using Tabular Editor. But I was under the impression that this should update the entire model up to yesterday.

 

  RestClient client = new RestClient($"https://api.powerbi.com/v1.0/myorg/{workspaceGUID}/datasets/{datasetGUID}/refreshes");
  RestRequest request = new RestRequest(RestSharp.Method.POST);

  request.AddHeader("Content-Type", "application/json");
  request.AddHeader("Authorization", "Bearer " + bearer);

  request.AddJsonBody(new
  {
      type = "full",
      commitMode = "transactional",
      applyRefreshPolicy = false
  });

  IRestResponse response = client.Execute(request);

Code used to update model is above. 

2 REPLIES 2
Anonymous
Not applicable

Thank you Sahir_Maharaj 

Hi, @Don-Bot 

You can follow the following API documentation to pass in the corresponding partition to the request body to refresh the partition in the specified range:

Datasets - Refresh Dataset - REST API (Power BI Power BI REST APIs) | Microsoft Learn

vjianpengmsft_0-1724651851335.png

If you do not refresh in July or August, you can specify this partition in the API and then refresh your data.

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Sahir_Maharaj
Super User
Super User

Hello @Don-Bot,

 

The REST API for dataset refresh should trigger the incremental refresh based on the defined policy. Can you please try the following approach:

RestClient client = new RestClient($"https://api.powerbi.com/v1.0/myorg/{workspaceGUID}/datasets/{datasetGUID}/refreshes");
RestRequest request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer " + bearer);

// The 'applyRefreshPolicy' should be set to true for incremental refresh
request.AddJsonBody(new
{
    applyRefreshPolicy = true
});

IRestResponse response = client.Execute(request);

if (response.StatusCode == System.Net.HttpStatusCode.OK)
{
    Console.WriteLine("Refresh triggered successfully.");
}
else
{
    Console.WriteLine($"Failed to trigger refresh: {response.Content}");
}

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ About: https://sahirmaharaj.com/about.html
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.