1. Google Cloud Apigee Documentation
"Conditional routing": This document explicitly describes the use of RouteRule elements with conditions to achieve dynamic routing. It states
"You can add routing logic to your API proxy flow by adding conditional routes to your TargetEndpoint configuration... A RouteRule forwards a request to a particular TargetEndpoint if the condition in the route rule evaluates to true." (See the section on "Conditional routes").
2. Google Cloud Apigee Documentation
"Flow variables reference": The documentation for the target.url variable states
"In a JavaScript policy
you can read and set this variable." This confirms that scripts can programmatically alter the target URL at runtime.
3. Google Cloud Apigee Documentation
"Route requests to the proper backend server": This guide provides a clear example of dynamic routing. Under the section "Dynamically routing to a target with a script
" it demonstrates using a JavaScript policy to set the target.url variable. It states
"You can dynamically set a target URL with code... the script overrides the static URL... configured in the TargetEndpoint XML block."