API / APIGEE Gateway Interview Questions
What are Flows in Apigee and what is the request/response processing pipeline?
A Flow is an ordered sequence of policy steps that Apigee executes as a request travels from client to backend and back. Understanding the flow pipeline is fundamental to knowing where to attach each policy.
| Phase | Direction | Description |
|---|---|---|
| ProxyEndpoint PreFlow | Request | First to execute; runs for every request regardless of path; ideal for security policies (key verification, OAuth) |
| ConditionalFlows (ProxyEndpoint) | Request | Named flows with conditions (e.g. path suffix or verb); only the first matching flow executes |
| ProxyEndpoint PostFlow | Request | Runs after conditional flows; rarely used on request side |
| TargetEndpoint PreFlow | Request | Runs just before Apigee forwards to backend; last chance to transform the outgoing request |
| Backend | Both | The actual backend service |
| TargetEndpoint PostFlow | Response | First to run on response; transform backend response before client sees it |
| ProxyEndpoint PostFlow | Response | Last policy stage before client receives the response |
| Error Flow (FaultRules) | Either | Executes when a policy raises an error; used for custom error responses |
<!-- Example: PreFlow with security policy --> <ProxyEndpoint name="default"> <PreFlow name="PreFlow"> <Request> <Step><Name>VerifyAPIKey</Name></Step> <!-- Step 1: check key --> <Step><Name>Quota</Name></Step> <!-- Step 2: enforce quota --> </Request> <Response/> </PreFlow> <Flows> <Flow name="GetOrders"> <Condition>request.verb == "GET" and proxy.pathsuffix MatchesPath "/orders"</Condition> <Request> <Step><Name>AssignMessage.SetHeaders</Name></Step> </Request> </Flow> </Flows> <PostFlow name="PostFlow"> <Response> <Step><Name>ResponseCache</Name></Step> <!-- cache the response --> </Response> </PostFlow> </ProxyEndpoint>
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
