5. REpresentational State Transfer
• Architectural Style
– Many ways to implement
• 5 Primary Constraints to
be considered “RESTful”
– Client / Server
– Stateless
– Cacheable
– Layered System
– Uniform Interface
7. Why do we REST?
• Client side and Mobile
Applications
– Apps load fast, data comes after
– Local caching
• API data access
– Allow others to use your data
8. RESTful Web API
• Web service implemented
using HTTP and the
principles of REST
• Clients interact with
RESTful servers over
HTTP methods
– Create (POST)
– Read (GET)
– Update (PUT)
10. Services Module (3.x)
– Creates URL callback endpoints for
integrating external applications
– Supports multiple interfaces including
REST, XMLRPC, JSON, JSON-RPC,
SOAP, AMF, etc.
11. Services Module (3.x)
– Supports Drupal core resources, third
party integration is done with modules
– Authentication and OAUTH support
– Performs a full bootstrap :(
– Caching in 7.x-dev YAY! (Issue
#1791978)
12. Services Endpoints
Create: POST
/[endpoint_path]/[resource] + body
Retrieve: GET
/[endpoint_path]/[resource]/[resource_id]
Update: PUT
/[endpoint_path]/[resource]/[resource_id] + body
Delete: DELETE
/[endpoint_path]/[resource]/[resource_id]
We’re hiring Drupal front end developers, module developers, UI/UX designers Also looking for strong devs who don’t know drupal just yet
Clients initiate requests to servers; servers process requests and return appropriate responses. Client / Server For example, clients are not concerned with data storage, and the Servers are not concerned with the user interface Stateless Each request from any client contains all of the information necessary to service the request, and any session state is held in the client Cacheable clients can cache responses and the server and responses must therefore, implicitly or explicitly, define themselves as cacheable, or not, Layered System client can’t tell what kind of server they are talking to. Is it the end point server or some middle tier caching server along the way. It makes no difference to them. Uniform Interface A set of guiding principles that should be followed. Relating to the nature of how the data is represented and manipulated.