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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lbeaudoin
Frequent Visitor

API - Get refreshables with capacities and groups expanded

Hi dear PBI community,

 

I'm trying to query from my premium capacity all refresh with groups expanded from this documentation : 
https://docs.microsoft.com/en-us/rest/api/power-bi/admin/getrefreshablesforcapacity#get-refreshables...

 

I get some results, but no information about groups like on the sample :
"group": { "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "name": "SalesMarketing" }

 

I'm using both the "Try It" button and a powershell version, with Power BI Admin capacity account and owner of severals workspaces (not all).

 

Any ideas ? thanks for your help

Laurent

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @lbeaudoin ,

 

Are you able to get the Capacity and Groups expanded?

 

you have confirmed on the PBI Tenant setting of API as enabled. Using "Try it" option in the browser you dont neet to pass application id.

API call should be as below

GET https://api.powerbi.com/v1.0/myorg/admin/capacities/{capacityId}/refreshables/{refreshableId}?$expan...

 

 In the Try it now window, please check

 

Parameters

capacityid* <capid>

refreshableid* <refid>

$expand capacity,group (add $expand in name text box, capacity,group in value & click "+" button)

 

Now click the Run button to get the 200 response.

 

Please share error code in case you get any error.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @lbeaudoin ,

 

This API needs your app to be registred. see below the pre-requisites,

 

you have mentioned that you have tried with PBI Admin account so please register app(link attached on how to register) and check for Tenant API permissions. Then  use "Try-it" button and this shoud work. Please let me know if you are getting any issue/ error codes in the response. please accept the solution if it works.

Admin - Get Refreshables For Capacity

Returns a list of refreshables for the specified capacity the user has access to
Note: The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API.

Required scope: Tenant.Read.All or Tenant.ReadWrite.All
To set the permissions scope, see Register an app.

 

Regards,

@Anonymous 

Hi nloiadn

thank you for your answer. Unfortunatly it's still unclear for me.

 

I do have an app with the right permissions, and Power BI tenant is configured to Allow service principals to use Power BI APIs (AD Group with Service Principal added).

 

When I click on the try it button, where can I specified the ApplicationID ?

As I said, today the API returns data, but without Group or Capacity expanded.

 

Thank you for your help

Anonymous
Not applicable

Hi @lbeaudoin ,

 

Are you able to get the Capacity and Groups expanded?

 

you have confirmed on the PBI Tenant setting of API as enabled. Using "Try it" option in the browser you dont neet to pass application id.

API call should be as below

GET https://api.powerbi.com/v1.0/myorg/admin/capacities/{capacityId}/refreshables/{refreshableId}?$expan...

 

 In the Try it now window, please check

 

Parameters

capacityid* <capid>

refreshableid* <refid>

$expand capacity,group (add $expand in name text box, capacity,group in value & click "+" button)

 

Now click the Run button to get the 200 response.

 

Please share error code in case you get any error.

Hi nloiadn, 

it does work ! I had to use the generated url from the Try it panel in powershell and I have all the info needed !

 

https://api.powerbi.com/v1.0/myorg/admin/capacities/'mycapacity-id'/refreshables?%24top=100&%24expand=capacity%2Cgroup

 

thks for your help

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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