Get Some Rest: Best RESTful API Practices

Location: E144 Level: Intermediate
Average rating: ***..
(3.94, 16 ratings)

Now we’re over the hype of RESTful services, and the majority of providers have realised that JSON-RPC and REST are two different things, there is still great inequality between RESTful services. Some are a pleasure to use; predictable and robust. Others seem to have a mind of their own and integrating against them can put a project over budget with the delays they cause. With that in mind, this session looks at the situation from both sides.

There are pointers, with PHP examples, for how to build a solid framework for a RESTful service using the current tools available such as microframeworks. We’ll talk about publishing a service and paying attention to error handling, consistency, and how to use hypermedia to make your service its own documentation. For those of us consuming these services, we will cover some tactics for dealing with external services in project planning terms, how to minimise the coupling of an unpredictable service against our own application, and how to debug when things go wrong. If you’re creating or consuming services, this session will give you some new ideas and hopefully lead to fewer support requests on both sides of the fence!

Photo of Lorna Mitchell

Lorna Mitchell


Lorna is an independent PHP consultant based in Leeds, UK. She leads the open source project, which provides a platform for real-time, public feedback at community events. She is an experienced event organiser and speaker herself, having hosted the Dutch PHP Conference and co-founded the PHP North West conference and user group. She has spoken at technical events across Europe and beyond, predominantly on technical topics around PHP and APIs, but also on topics around business, projects and open source. She regularly delivers technical training sessions and is also active as a mentor with Author of the book PHP Master from Sitepoint, Lorna loves to write and is regularly published at a number of outlets including netmagazine and of course her own blog

Comments on this page are now closed.


Picture of Michael Shadle
Michael Shadle
07/19/2012 7:05am PDT

Thanks! Enjoyed the session. Forgot to talk about versioning though, do you recommend versioning in the URL, in headers, in Media Types, or query string/parameters?

I believe Foursquare published notes on their findings with their API a while ago and strongly suggested versioning in the URL.

Picture of Lorna Mitchell
Lorna Mitchell
07/18/2012 10:12am PDT

Slides uploaded to OSCON’s site but you can find them also here:

Picture of Michael Shadle
Michael Shadle
07/18/2012 9:31am PDT

hopefully the slides will be posted!


For information on exhibition and sponsorship opportunities at the conference, contact Sharon Cordesse at (707) 827-7065 or

View a complete list of OSCON contacts