AI-103 Practice Question 71: Pinning API Version
Microsoft Azure AI Apps and Agents Developer Associate (AI-103) · Test 8 · question 1 of 10
A claims-processing service calls the Document Intelligence analyze REST endpoint from a .NET backend. Six months ago a developer wired the call to whatever api-version the sample code on the docs page showed at the time, which happened to be a dated preview release. Overnight, a batch of claims began failing because the JSON key the code reads for a bounding region had been renamed in the version now returned. Nothing in the application changed.
What should the team do to prevent this from recurring, and why?
Show answer and explanation
Answer:
Document Intelligence versions its REST API with a dated api-version parameter, and preview releases are explicitly temporary: Microsoft's own release history records that preview versions such as 2022-01-30-preview and 2021-09-30-preview were retired on a fixed date and that customers had to "update to the 2022-08-31 API version to avoid any service disruptions." Compatibility between preview versions, and between preview and GA, isn't guaranteed; response shapes can and do change, which is exactly the symptom here (a renamed JSON field). Pinning the call to a specific GA version keeps the response contract stable indefinitely; the team then upgrades deliberately, testing the new version's response shape before switching the pinned value in code.
- B is wrong because the API requires an explicit api-version on every request; there's no "unversioned, always-current" mode. Omitting or mishandling it doesn't opt out of versioning; it just risks calling an unintended version. - C is wrong because it treats the symptom, not the cause. A regex fallback is brittle and still has to be rewritten for every future field rename; it does nothing to stop the endpoint's shape from shifting under the application again. - D is wrong because it has the risk backwards: preview versions are the ones scheduled for retirement and the ones whose schema is still subject to change. Chasing the newest preview maximizes exposure to the exact failure the claims team just had, not minimizes it.
Reference: Azure Document Intelligence release history