This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I am trying to filter the admin capatities api for the nested status of the last refresh, but am having trouble with the syntax for the api call. Here is an example of a call that doesn't work. I have tried many different delimeters with no success. I have provided an example of the response below. The short question: How do I filter on just the lastRefresh status?
refreshables_url = "https://api.powerbi.com/v1.0/myorg/admin/capacities/refreshables?$filter=lastRefresh/status eq Failed
The below documentation only shows a filtering example at the top level.
https://docs.microsoft.com/en-us/rest/api/power-bi/admin/get-refreshables#code-try-0
Thanks for post! I have used the dataset API before and then looped through the output in my PowerShell. I was hoping the Capacity Refresh API allowed me to do this within a single call, using the nested json output in the $filter. My alternative using this API is to pull back a day's worth of refreshes into an object variable and drill down to the status within PowerShell. Thought I wouldn't have to do that, but maybe the code behind the API doesn't allow to filter on anything nested in the response. It would just be good to know this in their documentation so I am not wasting my time trying to figure it out.
Hi, @MHald ;
You can check if these related post can is useful to you.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Just leaving this here for others:
Status is an enum:
'Unknown' is '0'
'Completed' is '1'
'Failed' is '2'
$filter=(cast(lastRefresh/status, 'Edm.String') eq '2'
or
$filter=(lastRefresh/status eq Microsoft.PowerBI.ServiceContracts.Api.DatasetRefreshHistoryStatus'2')
https://stackoverflow.com/questions/66323597/issue-building-a-rest-api-query-using-filter-for-power-...
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 14 | |
| 10 | |
| 10 | |
| 7 | |
| 7 |
| User | Count |
|---|---|
| 31 | |
| 25 | |
| 24 | |
| 20 | |
| 18 |