Forum Discussion

MuriloMielke's avatar
MuriloMielke
New Member
1 year ago

Using the API, how to find out which fabric capacity is a workspace part of? so I can resume it

Basically title.

 

When I fetch https://api.powerbi.com/v1.0/myorg/groups (using an app token with the https://analysis.windows.net/powerbi/api/.default scope) I can see all the workspaces the app has access to. Each workspace has its capacityId on the result.

 

To resume a fabric capacity, I need to patch to https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}?api-version=2023-11-01 (using an app token with the https://management.azure.com//.default scope).

 

 

So, how can I link those two results? I mean, how to get the subscriptionId/resourceGroupName/capacityName from the capacityId on the first result?

 

PS: when I fetch https://api.powerbi.com/v1.0/myorg/capacities (using the same token as the /groups request), the ids of the result does NOT match the ids on the workspaces, so I would guess those are different things?