Forum Discussion
Can we increase the PBI REST API request limit beyond 200/hour?
Hi, we have approx 600+ workpaces and 3600 reports. I'd like to run some powershell commands to export lists of all workspaces, apps, reports, dashboards etc to CSV, buts it's timing out after 200 results. Is there any way to get round this? Or is there anything way to get an overview of all our content? Thanks
Hi vickyw ,
There are two ways I've been using for this kind of thing, either PowerShell commandlet directly (Get-PowerBIWorkspace) or via a (I think) more direct REST API calll (Invoke-PowerBIRestMethod) and building the URL manually from the base of "https://api.powerbi.com/v1.0/myorg/admin/groups".
The important thing is they both allow you to get Workspaces and related items with parameters, including reports, dashboards, datasets, dataflows and workbooks. Both ways return everything you would need in a single call. The only time you need more than 1 call is if you go over the 5000 Workspace limit which will then require paging your results.
For Invoke-PowerBIRestMethod make the call with "$expand=reports,dashboards,datasets,dataflows,workbooks". Here's a link to the doco.
For Get-PowerBIWorkspace make the call with "-Include All". Here's a link to the doco.
Getting a list of Apps is a seperate calls, it is not yet included in the expand list. See this link for the API call.
Note: If you want to get a list of users, that will need to be done one workspace / report / etc. at a time. See this link for a short discussion.
Hope this helps.
Edit: fixed links and order of examples.