API Fundamentals
/Beginner
URL Versioning
Definition
The most common and explicit strategy for API versioning, where the version number is embedded directly into the URL path.
Explain Like I'm New
You put `/v1/` in the URL. When you need to make breaking changes, you create a new set of endpoints starting with `/v2/`. Both URLs run on the server at the same time.
Real World Example
Twitter's API. `api.twitter.com/1.1/tweets` uses their old format. `api.twitter.com/2/tweets` uses their completely redesigned modern format.
Common Use Cases
- •Public APIs
- •Simplicity and routing ease
Interactive Example
Loading...
Console output will appear here...
Interview Questions
basic
- Give an example of a URL-versioned endpoint.
intermediate
- What is the main architectural criticism of URL Versioning among REST purists?