Download - APIs: The good, the bad, the ugly
![Page 1: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/1.jpg)
APIs:The good, the bad, the ugly
@MicheleTitolo
![Page 2: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/2.jpg)
![Page 3: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/3.jpg)
![Page 4: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/4.jpg)
What we’ll cover
![Page 5: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/5.jpg)
Documentation
![Page 6: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/6.jpg)
The Good
![Page 7: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/7.jpg)
It exists
![Page 8: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/8.jpg)
Bonus: it’s interactive
![Page 9: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/9.jpg)
I/O Docs
![Page 10: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/10.jpg)
The Bad
![Page 11: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/11.jpg)
Docs aren’t updated
![Page 12: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/12.jpg)
The Ugly
![Page 13: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/13.jpg)
Documentation?
![Page 14: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/14.jpg)
![Page 15: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/15.jpg)
URLs
![Page 16: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/16.jpg)
The Good
![Page 17: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/17.jpg)
Consistency
![Page 18: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/18.jpg)
/users/22445/products/3156/movies/127/times
![Page 19: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/19.jpg)
The Bad
![Page 20: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/20.jpg)
Inconsistency
![Page 21: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/21.jpg)
/users/22445/reviews/3156/times/127
Not review or time id’s
![Page 22: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/22.jpg)
The Ugly
![Page 23: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/23.jpg)
“Send GET to /remove to delete”
![Page 24: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/24.jpg)
![Page 25: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/25.jpg)
Payloads
![Page 26: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/26.jpg)
The Good
![Page 27: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/27.jpg)
![Page 28: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/28.jpg)
You have all the data you need
![Page 29: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/29.jpg)
The Bad
![Page 30: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/30.jpg)
Endpoint “id” field
/products id
/products/:id productID
/cart product_id
![Page 31: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/31.jpg)
Yes, this actually happened
![Page 32: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/32.jpg)
Change
![Page 33: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/33.jpg)
We expect certain things
![Page 34: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/34.jpg)
...like image urls having http://
![Page 35: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/35.jpg)
...like dates sent in the same format
![Page 36: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/36.jpg)
We expect certain thingsto not change
![Page 37: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/37.jpg)
The Ugly
![Page 38: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/38.jpg)
JSON containing HTML
![Page 39: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/39.jpg)
![Page 40: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/40.jpg)
![Page 41: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/41.jpg)
Unstable
![Page 42: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/42.jpg)
![Page 43: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/43.jpg)
Authentication
![Page 44: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/44.jpg)
The Good
![Page 45: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/45.jpg)
HTTP Basc Auth over SSL
![Page 46: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/46.jpg)
...when SSL is secure
![Page 47: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/47.jpg)
OAuth
![Page 48: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/48.jpg)
The Bad
![Page 49: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/49.jpg)
OAuth
![Page 50: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/50.jpg)
![Page 51: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/51.jpg)
The Ugly
![Page 52: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/52.jpg)
![Page 53: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/53.jpg)
![Page 54: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/54.jpg)
Authorization
![Page 55: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/55.jpg)
The Good
![Page 56: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/56.jpg)
App requests permissions
![Page 57: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/57.jpg)
The Bad
![Page 58: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/58.jpg)
A single API key
![Page 59: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/59.jpg)
The Ugly
![Page 60: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/60.jpg)
Authorization?
![Page 61: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/61.jpg)
goto fail;
![Page 62: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/62.jpg)
![Page 63: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/63.jpg)
![Page 64: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/64.jpg)
Errors
![Page 65: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/65.jpg)
The Good
![Page 66: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/66.jpg)
Error codes
![Page 67: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/67.jpg)
Error message in response
![Page 68: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/68.jpg)
Human readable error message
![Page 69: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/69.jpg)
The Bad
![Page 70: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/70.jpg)
“There was an error”
![Page 71: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/71.jpg)
![Page 72: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/72.jpg)
The Ugly
![Page 73: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/73.jpg)
![Page 74: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/74.jpg)
![Page 75: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/75.jpg)
![Page 76: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/76.jpg)
Caching
![Page 77: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/77.jpg)
The Good
![Page 78: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/78.jpg)
Using one of the standards
![Page 79: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/79.jpg)
Cache-Control
![Page 80: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/80.jpg)
If-Modified-Since
![Page 81: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/81.jpg)
etags
![Page 82: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/82.jpg)
The Bad
![Page 83: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/83.jpg)
Manually processing data
![Page 84: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/84.jpg)
The Ugly
![Page 85: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/85.jpg)
Caching
![Page 86: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/86.jpg)
![Page 87: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/87.jpg)
![Page 88: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/88.jpg)
In Summary
![Page 89: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/89.jpg)
Consistency
![Page 90: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/90.jpg)
Conventions
![Page 91: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/91.jpg)
Simple
![Page 92: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/92.jpg)
Questions?@MicheleTitolo
![Page 93: APIs: The good, the bad, the ugly](https://reader033.vdocuments.site/reader033/viewer/2022052410/554d2b34b4c905c5208b5124/html5/thumbnails/93.jpg)
• JSONSchema, RAML, API Blueprint,
• HTTP 1.1 Spec: http://www.w3.org/Protocols/rfc2616/rfc2616.html
• Charles, Postman
• http://runscope.com, also http://newrelic.com for backend analytics
• Versioning: http://apiux.com/2013/05/14/api-versioning/
Q&A Resources