You should have a versioning strategy because that is key to independent evolvability, but it should be tied to Content-Type, not URLs or anything else.
Even in a closed-house setting, you should still strive to make all components of a system independently evolvable (isolated, modularised) — especially a distributed system like a client/server-based one. This both allows different teams to work on each at their own pace, and allows for different release cadences.
Why not in URLs?
URIs identify abstract things which cannot be versioned, like a user "Andy", or an invoice. A representation of that thing will have a particular serialisation, which can be versioned, application/andys-api-v1+json
.
Your API (as with any website) is defined by three things. These are the only things that you need to document if your API is RESTful:
- The root URL
- The content type(s) of representations
- the link relations between URIs
If a v1 client obtains a link to /users/andy
from a previous request, it can forward that to a v2 client, which can then make a request to the same URL to get data about the same Thing, but in a language (content-type) it can speak, application/andys-api-v2+json
.
The v1 and v2 clients might be different parts of the same program, in the midst of a development cycle. The key is that the clients both continue working throughout.