A columbine-ledge public path is /pets/{id}, but the origin lives at /api/v3/animals/{id} on another host. Which APIM approach transforms the request toward that backend?
Select an answer to reveal the explanation.
Short Explanation
Keep the public contract tidy and fix the path (and host) at the gateway. rewrite-uri and set-backend-service are the APIM tools for pointing pets calls at animals on the real host.
Full Explanation
When the public contract is /pets/{id} but the origin lives at /api/v3/animals/{id} on another host, API Management should rewrite the request on the way in. The rewrite-uri policy adjusts the path (and query shape) sent to the origin; set-backend-service can retarget the backend host. Applied in inbound or backend policy sections, they keep the columbine-ledge public URL stable while the gateway maps pets calls onto animals on the real host.
Changing only public DNS so the pets hostname “maps” to animals paths fails because DNS resolves hosts, not path segments. Pointing a name at another IP does not rewrite /pets/{id} into /api/v3/animals/{id}.
Asking clients to hard-code the origin path and remove the gateway fails the facade pattern: callers would couple to the origin’s versioned shape, lose APIM policies, and break when the origin path changes again.
Storing a full Bicep template in the Function that rewrites URLs after the call returns fails because Bicep is infrastructure-as-code for deploying resources, not a runtime request transformer, and post-return logic cannot fix the path the gateway already sent.
Exam caveat: rewrite-uri and set-backend-service are complementary—path rewrite alone will not change the backend hostname if the API still points at the wrong service. Operational check: call the public /pets/{id} URL through APIM, inspect the backend request (Application Insights, APIM trace, or origin logs), and confirm the origin receives /api/v3/animals/{id} on the intended host.