In REST, resources are the key abstraction of information so that a service can make them available to its clients. Essentially, a resource can be anything—a user, a document, an image, or even an operation. Resources must be uniquely identifiable through URIs. For example, the following URI uniquely identifies a task with ID 1:
https://api.example.com/v1/tasks/1
As you can see, in this URI, we add the version number, v1, in the URI. Some people think it is a bad practice to put version information in the resource URI. They prefer to add it in the HTTP request header. Other people think that using versioning itself is not the right thing to do when building a RESTful API. For example, Roy T. Fielding mentioned the following on Twitter (https://mobile.twitter.com/fielding/status/376835835670167552):
So, is versioning really that bad? We will discuss this in detail later.