charlie talk - rest
DESCRIPTION
Learn how Atlassian is standardizing on RESTful web services and how your plugins can take advantage of them.TRANSCRIPT
Don Brown
REST
State of Atlassian APIs
Hard
Easy
From SOAP. . .
http://www.flickr.com/photos/psd/2217422218/
. . . To REST
REST - The Way of the Web
1. Nouns, not verbs
2. Standard methods
3. Multiple
representations
4. Links everywhere
Resources with Uniform Interface GET
http://srv/spaces/addspacenotification.action?key=AJOBS
POST
http://srv/spaces/AJOBS/notifications GET, PUT, DELETE
http://srv/spaces/AJOBS/notifications/3
Follow HTTP Traffic Laws
GET - No side-effects, can repeat
POST - Changes state, cannot repeat
PUT - Changes state, can repeat
DELETE - Changes state, can repeat
One API for All
REST in Action
Not everything is a resource
Account: o GET . . . Yep o POST . . . Yep o PUT . . . Yep o DELETE . . .
Yep o Renew?
Resource or Operation? Renew as a Resource POST
http://app/accounts/3/renewal
Renew as an Operation POST
http://app/accounts/3/renew
REST: the silver bullet?
Thirsty for More?
Atlassian REST Guidelines http://confluence.atlassian.com/x/coDvCg
Build your own http://confluence.atlassian.com/x/FwENCw