28 May '12, 9pm
ASCIIcast 350 - REST API Versioning
We’ll add some routes specifically for the API so that these routes stay separate from the routes for the HTML interface. We’ll use an api namespace to do this which means that any routes defined in it will be prefixed with an /api path. We could add a subdomain constraint instead of using this api namespace but this approach will work perfectly well for us here. We also have to decide how to do the versioning. One option is to store the version as part of the URL and we can do this with another call to namespace . Any controllers or routes defined in this namespace will be expected to be under the same namespace. For now we’ll just put the products resource in here to serve up our products in a RESTful style.