BTP API Management Part 2: Proxies, Flows and Policies
Preview · a free account unlocks the full lesson
Build API proxies correctly: proxy and target endpoints, the flow model (PreFlow, conditional flows, PostFlow) for request and response, where policies attach, key value maps for configuration, and deploying/updating proxies safely.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 1 introduced API Management at a high level; this lesson goes into proxies, flows and policies in more depth. Every proxy has a proxy endpoint, which handles incoming requests from consumers, and a target endpoint, which calls the actual back end.
Each of those endpoints follows the same structure: a PreFlow runs first, then conditional flows that apply to specific paths or HTTP verbs, and finally a PostFlow — and this structure exists separately for the request and the response.
Policies attach to specific steps within these flows; for example, a VerifyAPIKey policy is commonly attached to the proxy's PreFlow on the request side so it runs before anything else. Key value maps store configuration values and secrets that policies can reference, keeping that data out of the flow definitions themselves.
A common mistake is attaching security policies only inside a conditional flow for one particular path, which leaves every other path on the proxy unprotected — security policies belong in the PreFlow so they apply universally. Fault rules provide a way to catch errors and return a consistent error format rather than letting failures leak through inconsistently.
A sensible practice is to standardize a policy template, with security and traffic-control policies always placed in the PreFlow, and apply that same template across all proxies. It's also worth being cautious about changing a proxy that's already deployed and in use, since an untested change can break every consumer at once.
Putting this into practice means creating a proxy with two resources, adding VerifyAPIKey to the proxy's PreFlow so it covers both, and then adding a conditional flow policy that applies extra logic to just one of the two paths — the result being that every path requires a key, while one path carries additional logic on top.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Code example
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
Interview questions on this topic
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.