I have a proxy to my API which has only two methods(POST & GET).Here I would like to apply the quota policy to the the method whose type is POST not to the GET.
@Raghav ,
Welcome to Apigee Community ![]()
It’s possible & simple. Just add the condition to step element. You can find more about conditional reference in Apigee Docs here. Find more about out of the box variables that you can use in Api Proxy here in Apigee Docs.
<Step>
<Condition>request.verb = "POST"</Condition>
<Name>POLICYNAME</Name>
</Step>
2 Likes
Hi Anil , Thanks for the response..Just now handled in a flow condition as below:
IPQuota Validation
IPQuota
request.verb == “POST”
@Raghav , You have added the condition to the entire flow. In above case, Any policy attached to the flow will be executed only if request method is post. If you would like to execute a policy on condition just add it inside step xml. Find more about flows here. If above answer resolved your issue, click on accept link below the answer.