Mitchell McKenna - tagged with rest http://mitchmckenna.com/feed en-us http://blogs.law.harvard.edu/tech/rss LifePress mitchellmckenna@gmail.com JSON API — A specification for building APIs in JSON http://mitchmckenna.com/post/15792/json-api-a-specification-for-building-apis-in-json

Building a JSON API, you should be trying to follow the JSON API spec. Save your team the effort of arguing the best response format. It reached version 1.0 earlier this year, so it's safe to say there won't be too many big changes now.

It defines a standard for what the offsets in the json response should include: a resource is returned in "data", pagination in "links", errors in "errors", additional data in "meta", and a standard for including other objects aka "compound documents" in "relationships"/"included", so that instead of embedding other resource objects inside the main resource it flattens the graph of objects to eliminate duplicate data in the response (eg. the same user can be both the post author and a comment author).

If you're curious about some of the design decisions or how it compares to HAL, check out the FAQ.

]]>
Sun, 27 Sep 2015 16:34:00 -0400 http://mitchmckenna.com/post/15792/json-api-a-specification-for-building-apis-in-json/json-api-a-specification-for-building-apis-in-json
RAML - Model a RESTful API http://mitchmckenna.com/post/13522/raml-model-a-restful-api

Before you start coding your API, you should model it out; see what kind of endpoints you're going to need and what kind of parameters they're going to accept. RAML is very colorful visual way of modeling an API.

]]>
Mon, 14 Oct 2013 14:19:00 -0400 http://mitchmckenna.com/post/13522/raml-model-a-restful-api/raml-model-a-restful-api
I/O Docs - API Documentation Generator http://mitchmckenna.com/post/13302/io-docs-api-documentation-generator

I/O Docs is a live interactive documentation system for RESTful web APIs. Open sourced by the talented API guys at Mashery. I/O Docs is a lot like Swagger except I/O Docs isn't just a spec, it's the interpreter as well and it's written in NodeJS.

]]>
Sat, 24 Aug 2013 15:14:00 -0400 http://mitchmckenna.com/post/13302/io-docs-api-documentation-generator/io-docs-api-documentation-generator
Swagger: REST API Documentation Generator http://mitchmckenna.com/post/13301/swagger-rest-api-documentation-generator

Swagger is a popular open source spec to auto-generate very nice looking API documentation with the ability to easily try any API request. You can use the Swagger's own swagger-core framework for node.js, Java or scala, but there's is also support in many other languages because of the strong open source community behind it for other languages like PHP, Ruby, Python, etc. Swagger's biggest open source competitor is Mashery's I/O Docs.

]]>
Sat, 24 Aug 2013 15:04:00 -0400 http://mitchmckenna.com/post/13301/swagger-rest-api-documentation-generator/swagger-rest-api-documentation-generator
REST Console - a Google Chrome REST/HTTP Client http://mitchmckenna.com/post/10085/rest-console-a-google-chrome-resthttp-client

Makes it easy to visualise and construct custom HTTP requests to test with any RESTful web service. Syntax highlighting, custom headers and construct POST or Put body via raw input.

]]>
Sat, 10 Sep 2011 19:03:00 -0400 http://mitchmckenna.com/post/10085/rest-console-a-google-chrome-resthttp-client/rest-console-a-google-chrome-resthttp-client
Build an API with CodeIgniter http://mitchmckenna.com/post/9544/build-an-api-with-codeigniter

Great video and nettuts article from Phil Sturgeon on how we can use CodeIgniter to create a RESTful API for your existing web applications, and demonstrate how to interact with your own API or other RESTful web-services, such as Facebook and Twitter.

]]>
Wed, 11 May 2011 04:12:00 -0400 http://mitchmckenna.com/post/9544/build-an-api-with-codeigniter/build-an-api-with-codeigniter