$30 off During Our Annual Pro Sale. View Details »

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".

Senko Rašić

October 04, 2014

More Decks by Senko Rašić

Other Decks in Programming


  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