I am designing a REST API for a web application. I want to clearly version the API, so that the interface can be changed in the future without breaking existing services. So in my v1.0 API, I want to clearly identify it as the v1.0 API, leaving me the freedom to release a future v1.1 version with breaking changes.
My question is, would a period in the path component of a URI be bad practice?
eg. Is there any good reason not to use http://example.com/myapi/v1.0/services as a URI to my service?
Putting a period in the URI is perfectly fine. Putting a version number in an URI is definitely not a best practice.
Here are my reasons why and here is an good article on the subject by someone much smarter than me.
It is perfectly acceptable to use a period in a URI path. It is also valid as per RFC 3986 section 2.3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With