How to Define "if then else" multiple conditions in Flow

Not applicable

Hi All,

I am new to Apigee, would like to know if this following logic can be done in API proxy,

If (URL Path contains '/staging')

goto Target URL 1;

Else if (URL Path contains '/production')

goto Target URL 2;

Else

goto Target URL 3;

Thanks in advance,

Richard

0 1 543
1 REPLY 1

Hi @Richard Xu, welcome to Apigee community!

Routing to multiple targets based on input request can be achieved through Route Rules in Apigee.

We have the concept of ProxyEndpoint(client calls are received here) & TargetEndpoint(defining target URL).

We define routes on the ProxyEndpoint. A route determines the path of a request from the ProxyEndpoint to the TargetEndpoint.

Please have a look at below link for more info & 4minute videos on the topic,

https://docs.apigee.com/api-platform/fundamentals/understanding-routes