API Design · Junior · Question 42 of 75
What is a common way to version a REST API?
- 1Changing the HTTP method names
- ✓Correct answer: A version in the URL like
/v1/orders(or in a header) - 3A new domain for every release
Explanation
URL versions are simple and visible; header or media type versions keep URLs stable. Avoid frequent major versions: evolve compatibly instead.