API Versioning Strategies — Concept Check
Questions on API Versioning Strategies. Version APIs via URI path (/v1/), query parameter, or Accept header; semantic versioning and backward-compatible changes minimise downstream breakage.
Questions in this quiz
7 questions on API Versioning Strategies — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A company is migrating its API from version 1 to version 2 using URI path versioning. What should they ensure before deprecating version 1?
- AAll consumers have migrated to version 2
- BConsumers are notified after deprecation
- CVersion 1 endpoints are removed immediately
- DVersion 2 is backward-compatible with version 1
2.An API uses the Accept header for versioning. What is a potential challenge with this approach?
- AHarder to test in browsers
- BRequires semantic versioning
- CIncreased URI complexity
- DLimited to JSON responses
3.A developer adds a new optional field to an API response. What impact does this have on versioning?
- AConsumers must update immediately
- BBreaks existing consumers
- CRequires a major version bump
- DNo version bump needed
4.Which versioning strategy is most visible and cacheable, often used in public APIs?
- AURI path versioning
- BQuery parameter versioning
- CAccept header versioning
- DSemantic versioning
5.An API uses query parameter versioning. A developer claims it's more RESTful than URI versioning. What's the issue with this statement?
- AQuery parameters are harder to cache
- BQuery parameters are more secure
- CURI versioning is less visible
- DQuery parameters are less RESTful
6.A team uses Pact for contract testing. What is the primary benefit of this approach?
- AEliminates the need for versioning
- BDetects breaking changes before production
- CEnsures backward compatibility
- DSimplifies API documentation
7.When using header-based versioning, how can you specify the API version?
- AAppending version to URI
- BUsing semantic versioning
- CQuery parameter
- DCustom API-Version header