Azure APIM - how to invoke rest API with OData filters?

Henrique Carvalho 1 Reputation point

I created a manual API in APIM
Need the API to have an operation which invokes a rest API with OData filering
e.g:$filter=mail eq ''


Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,882 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,256 Reputation points

    @Henrique Carvalho Thank you for reaching out to Microsoft Q&A. Based on the above statement, you are looking to call backend API (Graph) with query parameters (OData filters). This depends on how you want to set up APIM call.

    Use parameterized operation to add a query parameter with or without default value as shown below and this way you can call APIM call with needed filters. Refer Add and test a parameterized operation for more info.


    Note, parameters are url-encoded and hence you need to use set-query-parameter policy (docs) to decode before sending to backend like below.

    <set-query-parameter name="$filter" exists-action="override">  

    Also, set-query-parameter can be used to transform the request and here is the sample blog on the same. I hope this answers your question and feel free to add a comment if you have any other questions. We would be happy to assist you. Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community.

    0 comments No comments