API Manager Routing policy sample
Provided sample uses Stock Quote and Exchange Rates REST APIs for backend and the routing is done based on value specified in a custom header Backend-Service. Related policies and API Manager export are also provided.
This artefact was successfully tested for the following versions:
- V7.5.3
- Create a Routing Policy (Could simply have one filter to route to a backend or have a branch to route to backend services based on incoming content)
- Add the routing policy in Policy Studio under Server Settings > API Manager > Routing Policies and deploy so it is available within API Manager UI
- Create a dummy Backend API (the URI could be valid or dummy) and a Front-end API based on this. Then in the Outbound tab, select the policy in the Default Method Routing dropdown
-
Save/Publish the Front-end API and test (use HTTP header Backend-Service to pass the required backend service to be routed to)
- Traffic Monitor:
- Custom routing policy execution path:
As you can see, there can be Request and Response policies configured for each Front-end API (and individual method) for any validation/enrichment/transformation.
To be completed
To be completed
Please read Contributing.md for details on our code of conduct, and the process for submitting pull requests to us.