Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building good Web APIs

Building good Web APIs

Talks about the importance of good web API, show best practices, show worst practices (and argue why they're bad), and hopefully convince the audience to pay attention whenc reating APIs even if "nobody but devs can see it".

382b18eebb1386e80ff7e20fd1eb784e?s=128

Senko Rašić

October 04, 2014
Tweet

Transcript

  1. the making of ! A good Web API ! how

    and why Senko Rašić, Good Code
  2. We’re hiring!

  3. None
  4. Image credit: agileapps.co.uk

  5. RFC2616

  6. GET /service?cmd=delete&type=author&id=5 ! GET /authors/ HEAD /authors/5 ! POST /authors/

    PUT /authors/5 PATCH /authors/5 DELETE /authors/5
  7. 200 OK! 201 Created! 202 Accepted! 204 No Content! !

    400 Bad Request! 401 Not Authorized! 403 Forbidden! 404 Not Found! 405 Method Not Allowed! ! 503 Service Unavailable
  8. Cookie: sessionid=249d67c74be ! ! Authorization: token efdf537eb7

  9. HTTPS

  10. lock down your API framework

  11. /authors ↔ /books/

  12. /api/v1/foo /api/v2/foo

  13. None
  14. Consistency Backwards compatibility Use HTTP(S) ! Developer experience matters

  15. Web of Zygiella spiders after high doses of caffeine! Image

    credit: P. N. Witt, Ch. F. Reed & D. B. Peakall, “A Spider's Web” Thank you