HTTP Methods (5)

HTTP Headers (1)

Miscellaneous (3)

Resources (4)

Basics (5)

Mediatypes (1)

This question still needs answering. If you like to help, make a pull request for this question.

What is the correct way to version my API?

The "URL" way

A commonly used way to version your API is to add a version number in the URL. For instance:
/api/v1/article/1234
To "move" to another API, one could increase the version number:
/api/v2/article/1234

The hypermedia way

GET /api/article/1234 HTTP/1.1
Accept: application/vnd.api.article+xml; version=1.0

另请参见

注意

Copyright 2012 Joshua Thijssen and others. Like to contribute? Add your recipe to our github repository.
Looking for Puppet recipies? Try the Puppet CookBook.
Fork me on GitHub