17. HTTP error codes
If you get 200 then all is ok.
If you get 3xx 4xx 5xx then something went wrong.
3xx = it's moved
4xx = client error
5xx = server error
404 = not found
418 = i'm a teapot
500 = internal server error
503 = service unavailable
18. REST example - Amazon S3
Amazon S3 based on two concepts:
Bucket
name
Object
parent bucket
value (the data)
key (name)
metadata (key/value pairs)
19. REST example - Amazon S3
Resources:
List of your buckets
http://s3.amazonaws.com/
A bucket
http://s3.amazonaws.com/{bucketname}/
An object
http://s3.amazonaws.com/{bucketname}/{objectname}
27. Views Atom
Style plugin
Alternative Feed style that generates Atom not RSS
RDFNode Row style plugin
Serializes arbitrary node to XML, including CCK fields
Useful with Feeds Atom to move content between Drupal sites.
30. Services v3 - the future
Fully RESTful web services now possible in Drupal
31. REST on a node
CRUD
create: POST /node
read: GET /node/1
index: GET /node
update: PUT /node/1
delete: DELETE /node/1
32. Services 3 extensions to CRUD
Actions, eg:
POST /node/publish_my_drafts
Targeted actions, eg:
POST /node/1/publish
Relationships, eg:
GET /node/1/comments
33. Response formats
XMLRPC returns XML
JSONRPC returns JSON
REST format agnostic:
http://example.com/node/1.xml
returns XML
http://example.com/node/1.json
returns JSON
http://example.com/node/1.php
returns serialized-PHP
34. Links
Services
http://drupal.org/project/services
Views Datasource
http://drupal.org/project/views_datasource
Views Atom
http://drupal.org/project/views_atom
Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
http://tools.ietf.org/html/rfc2324