Dynamic Endpoint functionality of API Cloud allows you to dynamically pick the backend to which each call is routed based on the call’s properties.
For example, suppose you have an API that has two resources /countries and /regions:
And suppose the actual implementation of the functionality is at two different backends. /countries is implemented by first.backend.url and /regions by something.different.url.
In our sample scenario, the In Flow sequence might look similar to this:
<sequence name=”dynamic_ep” trace=”disable” xmlns=”http://ws.apache.org/
<property name=”service_ep” value=”https//first.backend.url“/>
<property name=”service_ep” value=”https://something.different.url“/>
<!– add endpoints as needed –>
<property name=”service_ep” value=”http://some.default.url”/>
<!–default endpoint if required. However there should be a matching resource–>
<header name=”To” expression=”get-property(‘
<!–Please note that “ENDPOINT_ADDRESS” (additional) property is defined here in order to populate
destination address for statistics (API Usage by Destination). –>
You can obviously define more complex rules if needed.
Do you have multiple backend services that need to become a single API? Dynamic Endpoints can get you going!