2

I'm trying to reduce the api calls to fetch data out of powerbi rest api. when i call endpoint like /Groups, The response is straight forward in a single api call, I get all the groups. in order to get datasets,dashboards and reports i'll have to pass every group id to endpoints of reports,datasets.,etc.

eg. GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets

Is there a way to combine these requests, such a way that i send multiple group ids in a single api call to get all the datasets from their respective groups?

I have not found a way to combine it all together to make a single batch api call.

However, I tried a different endpoint found from MSDocs to avoid input of group id.

GET https://api.powerbi.com/v1.0/myorg/datasets

But the problem with this is, the response wont have information of which group the dataset belongs to. without group information,the retrieved data wont be useful for me.

https://learn.microsoft.com/en-us/rest/api/power-bi/datasets

1 Answer 1

1

You must use the admin part of the API. To get a list of all groups in your organization, call GetGroupsAsAdmin (you can filter what you want to get too). Similarly, call GetDatasetsAsAdmin to get list of datasets. Look at their webUrl property to find their group.

https://api.powerbi.com/v1.0/myorg/datasets wont return all datasets (or datasets from multiple groups) but will give you the datasets located in your own My workspace.

2
  • Hi Andrey, I was aware of that. my question is more like. how can i pass multiple ids in a single api call.. like ` api.powerbi.com/v1.0/myorg/groups{group 1}/datasets api.powerbi.com/v1.0/myorg/groups{group 2}/datasets ` is it possible to send both group1 and group2 in a single api call. something like a batch request or something. so in a single response i get results of multiple groups.
    – Arjun Raja
    Commented Jun 3, 2019 at 13:03
  • 1
    No, it's not possible. If you can provide a meaningful filter in the admin call, use it. Otherwise you need to call the API multiple times Commented Jun 3, 2019 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.