Charlie Talk - REST

13
Don Brown REST

description

Learn how Atlassian is standardizing on RESTful web services and how your plugins can take advantage of them.

Transcript of Charlie Talk - REST

Page 1: Charlie Talk - REST

Don Brown

REST

Page 2: Charlie Talk - REST

State of Atlassian APIs

Hard

Easy

Page 3: Charlie Talk - REST

From SOAP. . .

http://www.flickr.com/photos/psd/2217422218/

Page 4: Charlie Talk - REST

. . . To REST

Page 5: Charlie Talk - REST

REST - The Way of the Web

1.  Nouns, not verbs

2.  Standard methods

3.  Multiple

representations

4.  Links everywhere

Page 6: Charlie Talk - REST

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

Page 7: Charlie Talk - REST

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

Page 8: Charlie Talk - REST

One API for All

Page 9: Charlie Talk - REST

REST in Action

Page 10: Charlie Talk - REST

Not everything is a resource

Account: o GET . . . Yep o POST . . . Yep o PUT . . . Yep o DELETE . . .

Yep o Renew?

Page 11: Charlie Talk - REST

Resource or Operation? Renew as a Resource POST

http://app/accounts/3/renewal

Renew as an Operation POST

http://app/accounts/3/renew

Page 12: Charlie Talk - REST

REST: the silver bullet?

Page 13: Charlie Talk - REST

Thirsty for More?

  Atlassian REST Guidelines http://confluence.atlassian.com/x/coDvCg

  Build your own http://confluence.atlassian.com/x/FwENCw