An azalea-bank APIM policy that rewrites the response body sits in the inbound section and never runs. Where should that statement live among the official policy sections?
Select an answer to reveal the explanation.
Short Explanation
Inbound runs before the backend call—there is no response yet. Stick response rewrites in outbound (or on-error when cleaning up failures) so they actually see the body.
Full Explanation
API Management policies execute in ordered sections: inbound (before the backend is called), backend (around the backend call), outbound (after a successful response returns), and on-error (when the request fails). A statement that rewrites the response body must see a response, so it belongs in outbound—or in on-error when you are normalizing failure payloads. Putting response rewriting in inbound at azalea-bank is why the policy never appears to run: inbound executes before the origin has answered.
Placing the rewrite only inside Logic Apps workflow XML fails because this question is about APIM policy sections. Logic Apps may transform payloads in its own designer, but that does not move an APIM inbound statement into the correct gateway section.
Claiming the rewrite must live only in the backend section because outbound never sees bodies fails on the documented pipeline: outbound is specifically where response transformation policies run after the backend returns. Backend section statements surround the call; they are not the primary home for response-body rewriting.
A Dockerfile HEALTHCHECK that patches JSON after the gateway returns fails because HEALTHCHECK probes container health; it is not an APIM policy section and does not rewrite API responses for callers.
Exam caveat: some policies are valid in more than one section, but response-shaped policies such as set-body for the returned payload are invalid or ineffective inbound. Operational check: open the policy XML, move the rewrite into the outbound section (or the on-error section), save, and call the operation while inspecting the returned body—confirm the transform appears only after the backend responds.