cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mgodby
Post Patron
Post Patron

How do you filter an http request in Power Automate?

I have this http request: 

https://prices.azure.com/api/retail/prices?$filter=serviceName eq 'Virtual Machines' and priceType eq 'Reservation' and Location eq 'EU West'

 

and I'm wondering how to call this in Power Automate. 

 

I tried doing this but I don't think it worked since it's returning values from other locations:

Screenshot 2021-03-08 173438.png

 

But I don't it's working since the data returned includes all serviceNames, not just Virtual Machines. It also returns records that are not in the Location of EU West. 

I'm just unsure how to create those filters in Flow. Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
TAMF_Dev
New Member

Hi,

You need use a Parse JSON (Data operation)

 

 

View solution in original post

5 REPLIES 5
mahoneypat
Solution Sage
Solution Sage

Please try putting this whole string in the URI field, with the Queries field empty

 

https://prices.azure.com/api/retail/prices?$filter=(serviceName eq 'Virtual Machines') and (priceType eq 'Reservation') and (Location eq 'EU West')

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about the Power Platform, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


It says to enter a valid urIScreenshot 2021-03-08 182659.png

I'm wondering if we can just parse the json and the use filter array on what is returned.

Sorry.  Thought that would do it.  Filtering the array later will work, but have you tried this?

mahoneypat_0-1615257381444.png

 

Once entered, when you "peek code" within the ellipsis, it shows similar JSON queries parameter to your initial pic.

mahoneypat_1-1615257587145.png

 

However, the serviceName and Location properties don't have the extra space shown in your initial pic.

 

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about the Power Platform, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Yeah that's the same thing I did, I just did peek code. It doesn't seem to filter on anything for some reason, it returns records for Storage serviceNames and Locations other than EU West.

TAMF_Dev
New Member

Hi,

You need use a Parse JSON (Data operation)

 

 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (4,713)