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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ronant
Frequent Visitor

Refresh dataset via API issue

Hi,

 

I'm  refreshing a dataset via API, however it would sometimes fail. I tried chaning the commitMode to PartialBatch but it's not working.

 

I'm calling: 

https://api.powerbi.com/v1.0/myorg/groups/<my group_id>/datasets/<my dataset_id>/refreshes

with the body:

{
'notifyOption': 'NoNotification',
'commitMode': 'partialBatch',
'retryCount': 1
}

I get the error 

 

{"error":{"code":"InvalidRequest","message":"Dataset ID ... belongs to a shared capacity."}}

 

 

What is wrong with the dataset belonging to a shared capacity?

When there's only notifyOption in the body, the refresh starts at least.

 

By adding more parameters, I'm doing to async refresh (https://docs.microsoft.com/en-us/power-bi/connect-data/asynchronous-refresh) but I don't remember reading anything in the docs mentionning shared capacity and async refresh limitations.

 

Any ideas why the request is invalid?

6 REPLIES 6
SeaSprite
Frequent Visitor

Hi,

 

Have you solved this issue?

 

I am encountering the same thing.

{
'notifyOption': 'MailOnFailure',
'retryCount': 1
}

 

If I leave the second parameter 'retryCount' as blank then the NotifyOption works. If not, I don't get an email.

 

v-yiruan-msft
Community Support
Community Support

Hi @ronant ,

If you are refreshing the dataset that is in a shared capacity, you can only make up to eight requests per day. These eight requests include both scheduled refreshes and API refreshes. You can find more details in the following documentations. Please check whether you hit the following limitation... Any comment or problem, please feel free to let me know.

Refresh dataset REST API Limitations

Data refresh

yingyinr_0-1646980612566.png

Best Regards

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

The dataset is indeed in a shared capacity however I am not above 8 requests when doing the refreshes.

 

When testing, this works the first time:

{
'notifyOption': 'NoNotification',
}

 

The second with the following doesn't:

{
'notifyOption': 'NoNotification',
'commitMode': 'partialBatch',
'retryCount': 1
}

 

I tried a third time, same as the first, it also works, no error from the API.

Hi!

SDM_1997_0-1660655809228.png

In the documentation, it is given that enhanced refresh is not supported for shared capacity. Hence, you are getting the error. Only notifyOption is supported for shared capacity.

mattio
Frequent Visitor

Could be the inclusion of the 'notifyOption' according to the documentation this should not be included in the web call.

 

  • For enhanced refresh, notifyOption is not required and must be excluded from the request body. However, one or more parameters other than notifyOption are required.

Limitations 

Hi,

I was dealing with this same problem. I think the explanation is in the documentation shared by @v-yiruan-msft (maybe it was updated recently, at least I don't remember when I first read the API documentation).

gabrielfonseca_0-1654021142567.png


I hope they change this and allow the retry option for shared capacity, as long as it respects the eight requests per day limit.
The retry option was exactly what took us to explore the possibility of using the API to refresh some datasets.

 

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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