APIGEE-API-ENGINEER practice question 8 of 25
While testing your Apigee API proxy, you discover that the TargetEndpomt that is called is not what you expect. You have verified that there is a RouteRule that matches conditions, and should be called. What should you do?
Full set: 126 questionsApigee evaluates RouteRules within a ProxyEndpoint sequentially from top to bottom. The first RouteRule whose condition evaluates to true is executed, and all subsequent RouteRules are ignored for that transaction. The issue described occurs when a more general RouteRule is placed before a more specific one. If an incoming request matches the conditions of both, the general rule will be executed first, preventing the proxy from ever evaluating the intended specific rule. Reordering the rules to place the most specific conditions first ensures they are evaluated and executed correctly.
A. Modify the RouteRules to be more specific. This is incorrect because the problem is not the specificity of the rule itself, but its position in the evaluation order. A matching rule already exists.
B. Create a new proxy for this special condition. This is an inefficient solution and an anti-pattern. RouteRules are designed specifically to handle conditional routing within a single API proxy.
D. Add a new TargetServer to handle your specific condition. This is incorrect because a TargetServer defines a backend instance. The problem lies in the routing logic (RouteRule) that selects a TargetEndpoint, not the backend server configuration itself.
1. Google Cloud Apigee Documentation
"Conditional routing":
Under the section "Conditional routing
" the documentation states: "Apigee evaluates the conditions in the order they are defined in the ProxyEndpoint configuration. The first route whose condition evaluates to true is executed." This directly supports the explanation that order matters and the first match wins.
2. Google Cloud Apigee Documentation
"API proxy configuration reference":
In the section describing the ProxyEndpoint configuration
the RouteRule element is detailed. The documentation on processing multiple rules implicitly confirms their sequential evaluation. The examples show a default (no-condition) rule placed last
which is best practice
reinforcing the concept of ordered evaluation where specific rules must come before general or default rules.
Keep practicing
Take the free APIGEE-API-ENGINEER practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other APIGEE-API-ENGINEER practice questions
- Question 1In your last release, there were unexpected errors uncovered by users within the first 24…
- Question 2Your company runs their internal services across two datacenters in a hot-warm configurat…
- Question 3Which features are supported in the OAulhV2 policy'? Select all that are correct. Choose …
- Question 4Which is a benefit of three-legged OAuth (authonzation_code grant)'?
- Question 5Which Apigee product feature can be used to host and version your API documentation'?
- Question 6As an API Engineer your team would like to make sure you are simulating a user experience…
