Hi,
I'm developing a RESTful API and one of the requirements is that it has to be versioned.
The usual solution is to add the version in the URI, http://example.com/api/v1/resource
But it doesn't feel completely right. The resource probably will be the same in another version just its representation or the parameters will change.
Then, I thought about using the Accept header with vendor specific MIME types to specify what API version to use. This way the resource will never change and it will be unique.
A simplified example of usage would be: GET http://example.com/resource Accept: application/vnd.example-api-v1.text+json
Update: formatting.