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

API Management from the Trenches

API Management from the Trenches

APIs are at the heart of a vast number of applications, and they are not always written by the development team implementing them.

Consuming an external API can be fun but also fraught with potential issues, bottlenecks and nightmares. When documentation can only help you to a certain degree, what can you do?

This session will cover dealing with API resources for your application and some really useful tools and techniques to assist you as you implement them.

Matt Gifford

October 23, 2015
Tweet

More Decks by Matt Gifford

Other Decks in Technology

Transcript

  1. @coldfumonkeh Matt Gifford API Management from the Trenches

  2. CONSUMER DEBUGGING AUTHOR DEBUGGING CONSIDERATIONS

  3. CONSUMER DEBUGGING

  4. SELECTION

  5. DISCOVERY

  6. MICRO SERVICES

  7. “Great things are done by a series of small things

    brought together.” - Vincent Van Gogh
  8. ABSTRACTION

  9. VERSION MONITORING

  10. None
  11. None
  12. None
  13. NETWORK

  14. CONNECTION

  15. http://bit.ly/1uIZrYV

  16. AUTHENTICATION

  17. USE A LIBRARY

  18. TEST IN ISOLATION

  19. http://bit.ly/1byFK1R

  20. DIRECT API CALLS

  21. SPEED

  22. SCOPE

  23. FIREFOX REST CLIENT PLUGIN work on these

  24. cURL curl -i -X PUT httpbin.org/put -H Content-Type:application/json -d ‘{“hello”:

    “world”}’
  25. github.com/jakubroztocil/httpie http PUT httpbin.org/put hello=world HTTPie

  26. POSTMAN (v1)

  27. POSTMAN (v2)

  28. PAYLOAD

  29. MOCK API

  30. SCHEMA

  31. CHANGE

  32. RATE LIMITS

  33. EFFICIENCY

  34. mockable.io

  35. apiary.io

  36. mocky.io

  37. None
  38. Fake API FAKE API

  39. OFFLINE

  40. SECURITY

  41. DYNAMIC

  42. https://github.com/webpro/dyson

  43. https://github.com/typicode/json-server

  44. https://github.com/basicallydan/interfake

  45. npm install interfake --save var Interfake = require('interfake'); var interfake

    = new Interfake(); interfake.get('/whats-next').body({ next : 'more stuff '}); interfake.listen(3000); // The server will listen on port 3000 { "next":"more stuff" } http://localhost:3000/whats-next
  46. PROXY

  47. SNOOPING

  48. REPLAY

  49. TUNNEL

  50. charlesproxy.com/

  51. httpkit.com/wiretap

  52. runscope.com/docs/inspector

  53. ngrok.com

  54. CACHE MANAGEMENT

  55. AUTHOR DEBUGGING

  56. LOGGING

  57. AUDIT TRAIL

  58. FIND ISSUES

  59. ANALYSIS

  60. CLOUD LOGGING

  61. www.sumologic.com

  62. logstash.net

  63. www.loggly.com

  64. ERROR REPORTING

  65. EXCEPTIONS

  66. bugsnag.com

  67. airbrake.io

  68. getsentry.com

  69. MONITORING

  70. zapier.com/status

  71. apimetrics.io

  72. runscope.com/radar

  73. ducksboard.com

  74. LOAD TESTING

  75. github.com/JoeDog/siege

  76. loader.io

  77. github.com/wg/wrk

  78. wrk -t12 -c400 -d30s http://127.0.0.1:8080/index.html Running 30s test @ http://127.0.0.1:8080/index.html

    12 threads and 400 connections Thread Stats Avg Stdev Max +/- Stdev Latency 635.91us 0.89ms 12.92ms 93.69% Req/Sec 56.20k 8.07k 62.00k 86.54% 22464657 requests in 30.00s, 17.76GB read Requests/sec: 748868.53 Transfer/sec: 606.33MB
  79. CONSIDERATIONS

  80. DOCUMENTATION

  81. API DESIGN

  82. apiblueprint.org

  83. raml.org

  84. swagger.io

  85. bit.ly/designApi

  86. SDKs

  87. SPEAK TO A HUMAN

  88. @kinlane @johnsheehan @synedra

  89. None
  90. None
  91. http://restassuredbook.com/

  92. THANK YOU