Forum Discussion

ronant's avatar
ronant
Frequent Visitor
4 years ago

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    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

    Best Regards

    • ronant's avatar
      ronant
      Frequent Visitor

      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.

      • gabrielfonseca's avatar
        gabrielfonseca
        New Member

        Hi,

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


        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.

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.