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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rafaelBrasil
Regular Visitor

Refresh Tables of Dataset Using Rest API

Hi guys, i need a help.

It's possible updated only two tables of a dateset using Power BI API?

Exemple:
I have a dataset with 4 tables: fSales, fClient, fOrder and fCalls. I wanna updated fCalls and fOrder, the another tables i not wanna updated.

I'm reading the documentation but during my test's i don't have sucessed.

For this exemple the body object used in requested is:
dataset_objects =
{
"refresh": {
"type": "Automatic",
"commitMode": "PartialBatchl",
"objects": [
{
"database": "test_refresh",
"table": "fCalls"
}
, {
"database": "test_refresh",
"table": "fOrder"
}
]
}
}

The complete link of requested is:
base_url = '{API_PBI}/groups/{workspace_id}/datasets/{dataset_id}/refreshes'
headers = {'Authorization': f'Bearer {pbi_token}', 'Content-
body = {"notifyOption" : "NoNotification", "objects" : dataset_objects}

r = requests.post(url=base_url, headers=headers, data=json.dumps(body))

Thank's

1 ACCEPTED SOLUTION
Martin_D
Super User
Super User

Hi @rafaelBrasil ,

Your body looks more like a XMLA payload. When using the Power BI REST API, Power BI knows already from the URL which dataset to use and that it's all about a refresh. So you only need this part of your request body:

 

{
    "type": "automatic",
    "commitMode": "partialBatch",
    "objects": [
        {
            "table": "fCalls"
        },
        {
            "table": "fOrder"
        }
    ]
}

 

You can create partitions and only refresh the latest partition if you need to speed up the refresh.

For more details refer to the documentation: https://learn.microsoft.com/en-us/power-bi/connect-data/asynchronous-refresh

BR

Martin

github.pnglinkedin.png

View solution in original post

2 REPLIES 2
Martin_D
Super User
Super User

Hi @rafaelBrasil ,

Your body looks more like a XMLA payload. When using the Power BI REST API, Power BI knows already from the URL which dataset to use and that it's all about a refresh. So you only need this part of your request body:

 

{
    "type": "automatic",
    "commitMode": "partialBatch",
    "objects": [
        {
            "table": "fCalls"
        },
        {
            "table": "fOrder"
        }
    ]
}

 

You can create partitions and only refresh the latest partition if you need to speed up the refresh.

For more details refer to the documentation: https://learn.microsoft.com/en-us/power-bi/connect-data/asynchronous-refresh

BR

Martin

github.pnglinkedin.png

please tell me can i change the table name of dataset through api, and if i change the table name the reflected that will be show in published report or not ...?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.