Use multiple URL’s in Route assertion
search cancel

Use multiple URL’s in Route assertion

book

Article ID: 212311

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

We have a encapsulated assertion which has HTTPS routing and we want to define use multiple URLs option available in connection tab  Route via HTTP(S) and also set the failover strategy or define multiple routes in a routing strategy.   This encapsulated assertion is included in all policies that do routing.  Can we setup a multi-valued context variable with all the possible routes to backend. Also multiple URL count is not fixed like some backend has 2 URL and some has more than 5 or 10.

Environment

Release : 10.0

Component : APIGTW  

Resolution

1. create a policy logic which Context variable containing all the URL routings do you need to evaluate, separating the URL names by comma

2. Use Run Assertion for each item"  to create a For iterative cycle to read each URL

3. Use "Split Variable" to read each URL and evaluate/compare if the routing is HTTP 200 or invalid to iterate the next URL or finish the loop

4. The routing will be using Route HTTP to ${loop.current} variable