Forum Discussion
smpa01
2 years agoCommunity Champion
Custom REST calls
gbrueckl came across this fantastic piece . I have tested it out and it is simply awesome.
I was wondering if there is a way to utilize any of the RESTApi calls here. For example, what if I w...
- 2 years ago
something like this should technically work
WITH cte_workspaces AS ( SELECT explode(pbi_api_udf('https://api.powerbi.com/v1.0/myorg/groups', '${token}')) AS workspace ), cte_datasets AS ( SELECT workspace.name AS ws_name, workspace.id AS ws_id, explode(pbi_api_udf(concat(workspace.apiPath, '/datasets'), '${token}')) AS dataset FROM cte_workspaces ) SELECT ws_name, ws_id, dataset.name AS ds_name, dataset.id AS ds_id, explode(pbi_api_udf(concat(dataset.apiPath, '/refreshes'), '${token}')) AS refreshes FROM cte_datasetsbut I just tried it on my quite small environment and it errors out with too many requests
v-cboorla-msft
2 years agoMicrosoft Employee
Hi smpa01
Glad that your query got resolved. Please continue using Fabric Community for any help regarding your queries.