A survey of various tools and techniques commonly used by API craftsman. API specification languages, testing, debugging and analytics are covered.
As presented by Jason Harmon at Booz Allen Hamilton's "Distinguished Speaker Series" 3/2/2015
4. DESIGN SCALE
Problems
• Producing consistent
designs
• Prototyping and rapid
design iteration
• Generate code from
design
• Generate docs from
design
5. API SPECIFICATIONS
• A format to describe operations
• Produced by implementation, or design-first
• Allows for codegen of client or server, as well as
documentation
• Mock APIs with sample responses from spec
• Quick feedback from clients from design-first allows for
rapid iteration
8. WADL & WSDL 2.0
• 2007: http://www.w3.org/TR/wsdl20/
• 2009: http://www.w3.org/Submission/wadl/
• Neither was ever finalized
• Considered to be largely experimental
artifacts with little adoption
11. SWAGGER
• 2011: http://swagger.io/
• OSS by Reverb (https://helloreverb.com/), maker of the Reverb app
• Meant to produce spec from implementation
• Recent additions allow for design-first
• Hyperactive OSS community engagement
• Integrated with many products
• Now in version 2.0
12. BLUEPRINT
• 2013: https://apiblueprint.org/
• Created by Apiary (http://Apiary.io) (an API
portal platform) as standard for their platform
• Markdown-based
• First spec format to switch from code-first to
design-first
13. RAML
• 2013: http://raml.org/
• Created by Mulesoft, a long-standing SOA/ESB/API vendor, as
standard for their platform
• YAML-based
• Design-first
• Resource type definition/traits
• Now in version 2.0
14. CURRENT STATE
• Swagger & RAML are in version 2.0
• Swagger is the only player not profiting directly from the spec,
powered through partnerships
• Swagger has an incredible following in the OSS community
• Swagger added design-first later, RAML was design-first up-
front
• RAML seems to be well received by the enterprise community
• Blueprint continues to gain adopters; recent additions of
hypermedia
15. TRENDS
Design-first + Mocking
• Start slow to go fast
• Get API client feedback on
mock APIs
• Real usability is only
measurable with tactile
feedback
• Weakness: multi-scenario
and errors are hard to mock
16. TRENDS
Interactive editors
• Non-JSON formats growing in popularity for readability
• Swagger 1.5 added YAML-based
• RAML is YAML
• Blueprint is Markdown
20. POSTMAN
• Loved by developers
• Easy to use locally
• Simple Chrome plugin
• Some limitations in being
from browser
• Not great for sharing within a
team
21. POSTMAN
Able to create & save requests in collections
Parameterize requests
Import/export collections
22. COMMAND-LINE
Requires no UI
Works on any machine
Save calls as text
cURL is the lingua franca
of APIs
HTTPie is gaining
popularity
http://curl.haxx.se/
HTTPie
https://github.com/jakubroztocil/httpie
25. CURL - PHP NATIVE
Also batteries included in many other languages
26. DEBUGGING
Request/response capture
• Amazing for developers + support
• Figure out why calls aren’t working
• Often a great setup for testing, from captures
• Implemented by using an HTTP proxy
45. ANALYTICS
Before you do anything:
KPIs for APIs by John Musser
• Formerly of ProgrammableWeb
• Now runs API Science
https://www.youtube.com/watch
?v=UFjgbsRrLHw
http://www.slideshare.net/jmuss
er/kpis-for-apis
55. DASHBOARDING
• Think about events
• Analyze funnels
• MongoDB/Couch/etc is
tempting
• Keen.io makes it easier
56. PERFORMANCE METRICS
• API Management Vendors
• All provide this core functionality
• DIY: Often fits into existing metrics
• Mongo/Couch solutions abound
• Often standard web metrics platforms will do the
trick