route to target endpoint based on queryparam name in the condtion of routing

Not applicable

Based on the queryparam name i need to route to targetEndPoint,

I have 2 routes one is MarketValue and another is default ,

if any queryparam name is productType then i need to route to MarketValue target endpoint..

0 2 289
2 REPLIES 2


Hi @MahaLakshmi Kalyani, You can easily accomplish your use case using a conditional RouteRule. This technique allows you to route an API request to a specific target based on a condition, such as the value of a query parameter. Please see this documentation topic for clear details. There's also a nice video that explains this technique.

Will

Hi @MahaLakshmi Kalyani, If all you want/need to test only if parameter is present, you can actually set a condition as follows:

<Condition> request.queryparam.productType != null </Condition>

Hope it helps