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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
smpa01
Super User
Super User

Refresh dataset api

I have a power bi datset with incremental refresh factored in (without polling expression).

 

When I manually refresh the dataset, the refresh works well. I want to be able to refresh the datastset either using Datasets - Refresh Dataset In Group API or Enhanced refresh API 

 

But I am not able to replicate the behavior of manual refresh in this API.

 

If I use the following as payload

{
  "applyRefreshPolicy": "full" 
}

 

It refrehes all partitions and refresh is longer.

 

The default is automatic which does not refresh the data at all.

 

Does anyone know what do I need to use in the payload to replicate the exact same behavior of manual refresh through this api

Resources

Refresh command (TMSL) 

Datasets - Refresh Dataset In Group 

Enhanced refresh with the Power BI REST API 

 

I am not able to determine a payload that would do what I desire

smpa01_0-1754050078738.pngsmpa01_1-1754050100857.png

 

 

My current payload is 

{
    "type": "Full"
    "objects": [
        {
            "table": "DimCustomer"            
        },
        {
            "table": "DimDate"
        }
    ]
}
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
1 ACCEPTED SOLUTION
jaineshp
Continued Contributor
Continued Contributor

Hey @smpa01,

I've dealt with this exact issue before. The problem is that the API doesn't automatically respect your incremental refresh settings like the manual refresh does. Here's what worked for me:

Quick Fix - Try This First

Replace your current payload with:

{
"type": "automatic",
"commitMode": "transactional"
}

Don't specify individual tables initially - let Power BI handle the incremental logic automatically.

If That Doesn't Work

Use this approach (worked for most of my datasets):

{
"type": "dataOnly",
"applyRefreshPolicy": true,
"objects": [
{
"table": "DimCustomer"
},
{
"table": "DimDate"
}
]
}

What I Learned

  • Avoid "type": "full" - this bypasses incremental refresh completely
  • "automatic" mode should respect your incremental settings
  • applyRefreshPolicy: true is crucial when specifying objects
  • Sometimes the API needs explicit table specification, sometimes it doesn't

Debugging Steps

  1. First try without specifying any objects at all
  2. If that fails, add your tables but keep applyRefreshPolicy: true
  3. Check the refresh history to see which partitions actually got processed
  4. Compare timing with manual refresh

Personal Experience

I had the same frustration where manual worked perfectly but API either took forever (full refresh) or did nothing (automatic with wrong settings). The key breakthrough was realizing that "automatic" mode needs the right parameters to actually trigger the refresh logic.



Give the automatic approach a shot first - that's usually the cleanest solution.

Fixed? Mark it • Share it • Help others!

Best Regards,

Jainesh Poojara | Power BI Developer

View solution in original post

2 REPLIES 2
jaineshp
Continued Contributor
Continued Contributor

Hey @smpa01,

I've dealt with this exact issue before. The problem is that the API doesn't automatically respect your incremental refresh settings like the manual refresh does. Here's what worked for me:

Quick Fix - Try This First

Replace your current payload with:

{
"type": "automatic",
"commitMode": "transactional"
}

Don't specify individual tables initially - let Power BI handle the incremental logic automatically.

If That Doesn't Work

Use this approach (worked for most of my datasets):

{
"type": "dataOnly",
"applyRefreshPolicy": true,
"objects": [
{
"table": "DimCustomer"
},
{
"table": "DimDate"
}
]
}

What I Learned

  • Avoid "type": "full" - this bypasses incremental refresh completely
  • "automatic" mode should respect your incremental settings
  • applyRefreshPolicy: true is crucial when specifying objects
  • Sometimes the API needs explicit table specification, sometimes it doesn't

Debugging Steps

  1. First try without specifying any objects at all
  2. If that fails, add your tables but keep applyRefreshPolicy: true
  3. Check the refresh history to see which partitions actually got processed
  4. Compare timing with manual refresh

Personal Experience

I had the same frustration where manual worked perfectly but API either took forever (full refresh) or did nothing (automatic with wrong settings). The key breakthrough was realizing that "automatic" mode needs the right parameters to actually trigger the refresh logic.



Give the automatic approach a shot first - that's usually the cleanest solution.

Fixed? Mark it • Share it • Help others!

Best Regards,

Jainesh Poojara | Power BI Developer

@jaineshp 

 

Thank you.
I tested all the suggested payloads to determine which one would work for my use case, and I was able to get it working.

Thanks again for your help.

I found the official MS documentation on this topic to be terrible, especially given the complexity and importance of the subject.

 

it does not explain what type of refresh has what implications downstream. It is left to the user to try different combinations to see if you get what you are hoping for.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.