This describes what are the best practices of writing RESTful APIs. What are the different tools to create and test these APIs? What are the common pitfalls and how to avoid them? What are some of the industries best public APIs, etc. This also includes a quick and easy hands-on session to fire and launch some APIs in the cloud using Play! Framework.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Photo by Tojosan - Creative Commons Attribution-NonCommercial-ShareAlike License https://www.flickr.com/photos/28069288@N00 Created with Haiku Deck
Models
Proprietary Solution Basic Authentication
OAuth 1.0 OAuth 2.0
Make Docs Obvious
Supported Options
Examples
Required & Optional Attributes
Default Values
Error Codes
Automate
Build something
meaningful
with your
APIs
RATE LIMIT
Photo by GirlieMac - Creative Commons Attribution License https://www.flickr.com/photos/70561195@N00 Created with Haiku Deck
CHATTY API
Let’s
Play!
Download Play 2.3.4
Compile, Run & Test
activator new
select template & name
activator run
Controllers GET / controllers.Application.index() GET /users ...getUsers() GET /users/:id ...getUserById(id: String) …
Models
Ebeans for Java
JPA Annotations
Versioned Evolution Scripts
Test
Based on JUnit
Mockito
Integration & UI Test
Pros
Easy Url routing
Class Reloading
Java&Scala support
Java/Ebean support
NIO Server
TEST & PERFORMANCE
RUNSCOPE
Thanks
Attributions • Cat by Marco Petrucci from The Noun Project • Chat by Alberto Guerra Quintanilla from The Noun Project • Coffee by Monika Ciapala from The Noun Project • Key by Simple Icons from The Noun Project • Lock by Jardson A. from The Noun Project • Magnifying Glass by Naomi Atkinson from The Noun Project • Gauge by Olivier Guin from The Noun Project • Lock by Andrew Forrester from The Noun Project • Fork by Dmitry Baranovskiy from The Noun Project • Click icon is open source • Document icon by Joe Richardson from The Noun Project • Robot icon by Jon Trillana • Tasks list by Arthur Shlain from The Noun Project • Graph by David Waschbüsch from The Noun Project • HTTP cats photo from girliemac • Photo by Tojosan