Slide 1

Slide 1 text

the making of ! A good Web API ! how and why Senko Rašić, Good Code

Slide 2

Slide 2 text

We’re hiring!

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Image credit: agileapps.co.uk

Slide 5

Slide 5 text

RFC2616

Slide 6

Slide 6 text

GET /service?cmd=delete&type=author&id=5 ! GET /authors/ HEAD /authors/5 ! POST /authors/ PUT /authors/5 PATCH /authors/5 DELETE /authors/5

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

Cookie: sessionid=249d67c74be ! ! Authorization: token efdf537eb7

Slide 9

Slide 9 text

HTTPS

Slide 10

Slide 10 text

lock down your API framework

Slide 11

Slide 11 text

/authors ↔ /books/

Slide 12

Slide 12 text

/api/v1/foo /api/v2/foo

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Consistency Backwards compatibility Use HTTP(S) ! Developer experience matters

Slide 15

Slide 15 text

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