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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Filter parameter for Dashboards and reports Power BI Admin API not working

Hi,

 

I'm trying to retrieve all Dashboards and reports in our company for a set of workspaces by using the filter parameter like

* https://api.powerbi.com/v1.0/myorg/admin/dashboards?$filter=workspaceId eq 'xxx' or workspaceId eq '...

* https://api.powerbi.com/v1.0/myorg/admin/reports?$filter=workspaceId eq xxx

 

I also tried the following filter

 

https://api.powerbi.com/v1.0/myorg/admin/dashboards?$filter=contains(workspaceId, 'xxx')

 

It seems to me that the filter option is not working for the api. Can somebody confirm or show me how it's done?
Thanks!

Status: Investigating
Comments
Anonymous
Not applicable

Hi @Anonymous 

Usually, we can add query string parameters to the URL to pre-filter the report . But there is no case of applying it to APIs.

Filter a report using query string parameters in the URL - Power BI | Microsoft Learn

 

Best Regards,
Community Support Team _ Ailsa Tao

Anonymous
Not applicable

Hi @Anonymous,

Thank you for your reply. I'm a bit confused though, because in case of the API to retrieve groups, e.g.:

https://api.powerbi.com/v1.0/myorg/admin/Groups?$top=5000&$filter=type eq 'Workspace' and state eq 'Active'

 the filter option works, as well as for datasets where e.g. this works:

https://api.powerbi.com/v1.0/myorg/admin/datasets?$filter=workspaceId eq xxx

 

In both cases, get groups and get datasets, the documentation states that we can use the filter parameter when calling the api, just as for the get reports and get dashboards as admin. 
The reason I'm lifting this issue is because I would like to collect report and dashboard users for a subset of workspaces. As the api is limited to max 200 calls per hour and we have more than 200 workspaces and more than 1500 reports/dashboards, it would be nice to make a selection and only retrieve users for reports/dashboards linked to active workspaces instead of all workspaces.

Anonymous
Not applicable

Hi @Anonymous,

 

thank you for your reply! I see, but then I'm wondering why the documentation (reports-get-reports-as-admin ) gives the following example:

GET https://api.powerbi.com/v1.0/myorg/admin/reports?$filter={$filter}&$top={$top}&$skip={$skip}

 as a way to get a group of reports based on a filter. Am I missing something or should the documentation be corrected?