Level 3 REST


                   Matt Bishop
               Sr. Product Architect
          Elastic Path Software, Inc.
Richardson Maturity Model

Level 0 : RPC

   POST /apptService <xml get doctors appt list>

   ?? How do I book an appointment? Check the docs

Level 1: Resources, but verbs in the body

   POST /doctors/mjones <xml get appt list>

   ?? How do I book an appointment? Check the docs

Level 2: Resources and HTTP Verbs, but actions are unknown

   GET /doctors/mjones/slots?date=…&status=open

   ?? How do I book an appointment? Check the docs

                                © Copyright 2012, Elastic Path Software Inc. All rights reserved.
Level 3 REST

Everything is expressed as links in the body
GET /doctors/mjones/slots?date=…&status=open
<openSlotList>

 <slot id = "1234" doctor = "mjones" start = "1400" end = "1450">

  <link rel = "/linkrels/slot/book” uri = "/slots/1234"/>

 </slot>

</openSlotList>


?? How do I book an appointment? Follow the link


                                        © Copyright 2012, Elastic Path Software Inc. All rights reserved.
Email before HTML




                    © Copyright 2012, Elastic Path Software Inc. All rights reserved.
Groups before HTML




                     © Copyright 2012, Elastic Path Software Inc. All rights reserved.
Level 2 REST is PINE and USENET

•   Like the Internet before HTML
•   Must read manpages (documentation) to
    understand
•   Fancy manpages, mind you:
    •   Swagger
    •   Apiary.io


•   But still requires training and special knowledge


                           © Copyright 2012, Elastic Path Software Inc. All rights reserved.
Links make APIs Browsable

•   Level 3 REST is not Level 2++
•   Paradigm shift, a Kierkegaardian leap
•   Difficult to build – no frameworks, specs, tools
BUT
•   Browsable APIs are easy to discover and consume
•   Docs become the ‘site map’



                           © Copyright 2012, Elastic Path Software Inc. All rights reserved.

Level 3 REST Makes Your API Browsable

  • 1.
    Level 3 REST Matt Bishop Sr. Product Architect Elastic Path Software, Inc.
  • 2.
    Richardson Maturity Model Level0 : RPC POST /apptService <xml get doctors appt list> ?? How do I book an appointment? Check the docs Level 1: Resources, but verbs in the body POST /doctors/mjones <xml get appt list> ?? How do I book an appointment? Check the docs Level 2: Resources and HTTP Verbs, but actions are unknown GET /doctors/mjones/slots?date=…&status=open ?? How do I book an appointment? Check the docs © Copyright 2012, Elastic Path Software Inc. All rights reserved.
  • 3.
    Level 3 REST Everythingis expressed as links in the body GET /doctors/mjones/slots?date=…&status=open <openSlotList> <slot id = "1234" doctor = "mjones" start = "1400" end = "1450"> <link rel = "/linkrels/slot/book” uri = "/slots/1234"/> </slot> </openSlotList> ?? How do I book an appointment? Follow the link © Copyright 2012, Elastic Path Software Inc. All rights reserved.
  • 4.
    Email before HTML © Copyright 2012, Elastic Path Software Inc. All rights reserved.
  • 5.
    Groups before HTML © Copyright 2012, Elastic Path Software Inc. All rights reserved.
  • 6.
    Level 2 RESTis PINE and USENET • Like the Internet before HTML • Must read manpages (documentation) to understand • Fancy manpages, mind you: • Swagger • Apiary.io • But still requires training and special knowledge © Copyright 2012, Elastic Path Software Inc. All rights reserved.
  • 7.
    Links make APIsBrowsable • Level 3 REST is not Level 2++ • Paradigm shift, a Kierkegaardian leap • Difficult to build – no frameworks, specs, tools BUT • Browsable APIs are easy to discover and consume • Docs become the ‘site map’ © Copyright 2012, Elastic Path Software Inc. All rights reserved.