This is a short talk about some of the core REST concepts. It is not a technical talk as it focuses on the concepts instead any implementation details.
E.g. User resource • Identified by one or more URIs • E.g. api.system.com/v1/users/1 • Differ from their representation • The same resource can have multiple representations • Representation • How the resources are manipulated • Typically XML or JSON
Elements: • HTTP verbs (GET, PUT, POST, DELETE, …) • URIs (resource naming) • HTTP responses (body + status code) • Stateless • Server doesn’t store any client state • Each request contains enough information to be processed • Any session state is kept in the client • Others (check this link)
in the server • GET, HEAD, OPTIONS • Idempotency • PUT and DELETE operations should be implemented as idempotents • Executing the same request multiple times leaves the system in the same state as the first call (the response may be different though) • E.g. deleting a user vs. creating a user • Hypermedia • Finite-state machine • Resources and manipulations
of REST • http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm • Good website with a lot of material about the topic • http://www.restapitutorial.com • A post blog written by me about REST semantics • http://www.lucassaldanha.com/its-all-about-semantics/ • The REST Cook Book – has some nice material • http://restcookbook.com • Good post about REST • https://jcalcote.wordpress.com/2008/10/16/put-or-post-the-rest-of-the-story/