I am trying to invoke an API in Powershell with GET requests. I am familiar with filtering the response by sending a Powershell hashtable in the "Body" parameter as"
Invoke-RestMethod -Uri $uri -Body $filters -Headers $headers
But the hashtables only allow me to filter with the equals operator. As the hashtable looks sort of like
$filter = @{id="fl201"; name="john"}
I need to use comparisons other than "equals", more importantly "-ne" and "-like" and so on. I can filter them after I get the response from Invoke-RestMethod but the response will be so huge that the request itself times out. The API is only a middleware between the client and the database and does nothing other than looking for rows that match the values of the fields in the body. So, is there any way I can do complex filters along with the web request? Thanks in advance.