Challenge - 5 Problems
API Versioning Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Understanding URI Versioning
Which of the following best describes the main advantage of using URI versioning for APIs?
Attempts:
2 left
💡 Hint
Think about how URLs are used in web requests and caching.
✗ Incorrect
URI versioning places the version number in the URL path, which makes it explicit and easy for caching systems and routers to handle different versions separately.
❓ Architecture
intermediate2:00remaining
Choosing Header Versioning
What is a key benefit of using HTTP header versioning for APIs compared to URI versioning?
Attempts:
2 left
💡 Hint
Consider how URLs look and how headers work in HTTP.
✗ Incorrect
Header versioning keeps the URL unchanged and uses HTTP headers to specify the version, which separates versioning from resource paths and keeps URLs clean.
❓ scaling
advanced3:00remaining
Scaling API with Multiple Versions
When supporting multiple API versions simultaneously, which strategy helps minimize server resource usage while maintaining backward compatibility?
Attempts:
2 left
💡 Hint
Think about code reuse and maintenance effort.
✗ Incorrect
Sharing core logic and using adapters for version differences reduces duplication and resource use while supporting multiple versions.
❓ tradeoff
advanced3:00remaining
Tradeoffs of Semantic Versioning in APIs
What is a major tradeoff when adopting semantic versioning (major.minor.patch) for API versioning?
Attempts:
2 left
💡 Hint
Consider how clients decide which version to use.
✗ Incorrect
Semantic versioning gives detailed version info but requires clients to understand and negotiate versions carefully, adding complexity.
❓ estimation
expert3:00remaining
Estimating Storage for API Versioning Metadata
An API service stores metadata for each version of its endpoints. If each version adds 500KB of metadata and the service supports 12 versions with 100 endpoints each, approximately how much storage is needed for all metadata?
Attempts:
2 left
💡 Hint
Calculate total metadata size by multiplying versions, endpoints, and size per endpoint.
✗ Incorrect
12 versions × 100 endpoints = 1200 endpoints total. 1200 × 500KB = 600,000 KB = 600 MB.