RailsCasts Pro episodes are now free!

Learn more or hide this

REST API Versioning

#350 REST API Versioning

May 16, 2012 | 10 minutes | Routing, APIs
APIs should be consistent, but it is difficult to do this when returning a JSON response along side the HTML interface. Here I show how to add a versioned, RESTful API. The version can be determined from either the URL or HTTP headers.
  • Download:
  • source codeProject Files in Zip (95 KB)
  • mp4Full Size H.264 Video (32.3 MB)
  • m4vSmaller H.264 Video (14.5 MB)
  • webmFull Size VP8 Video (12.1 MB)
  • ogvFull Size Theora Video (36.8 MB)