i have just started working with Apigee. I want to create one API proxy which will call two target endpoints based on \'if\' condition. i have created an API and added resou
If you are using the API Proxy Editor UI, then you can do the following:
(1) Choose New / New Resource from the API Proxy Editor toolbar.
You will then see this:
(2) For the input field, Optional Target URL, enter the target URL that corresponds to that resource.
This tool will then generate both a conditional flow for that resource to which you can optionally attach resource-specific policies.
This tool will also add the needed route rule, and your generated XML will look like this:
(proxy.pathsuffix MatchesPath "/someResource") and (request.verb = "GET")
http://myAlternateEndpoint
....