Forum Discussion
Usage of Power BI Rest API in Power Automate
- 3 years ago
To make the groupId dynamic, you can use the Power Automate flow "GetGroupsAsAdmin" API to retrieve the groupIds of all the workspaces in your organization. You can use a loop in Power Automate to iterate through each groupId and make a call to the "GetUnusedArtifactsAsAdmin" API with the specific groupId. You can store the response of each API call in a collection or data structure and use it as per your requirement.
This way, you can retrieve the unused artifacts of all the workspaces in your organization dynamically using Power Automate.
To make the groupId dynamic, you can use the Power Automate flow "GetGroupsAsAdmin" API to retrieve the groupIds of all the workspaces in your organization. You can use a loop in Power Automate to iterate through each groupId and make a call to the "GetUnusedArtifactsAsAdmin" API with the specific groupId. You can store the response of each API call in a collection or data structure and use it as per your requirement.
This way, you can retrieve the unused artifacts of all the workspaces in your organization dynamically using Power Automate.
Hi Jaweher,
Thanks for your help. I made the like you said with a bit of my own flavour.
- HTTP is just to get Workspaces via Groups GetGroupsAsAdmin API
- In the next step "Parse JSON", all the data is just being parsed
- In the last "Apply to each" Loop, I'm getting the value from the parsed JSON step. In this case I only need ID (Group ID)
- Now the ID will be pasted in HTTP Connector, where I have used the dynamic ID as (which can be seen).
- Now I want to parse all the data and store it on Excel and that's how I am doing it. In the loop I also added "Parse JSON" Step and "Add to excel step". By keeping in mind, by every loop the data will parsed and stored in Excel sheet.
It's showing me the correct result which I watned but shows me an error also that Action Failed. No dependent actions succeceded.
P:S I tried to put the last two steps out of loop but then it doesn't work at all. This working and showing correct results with an error msg.