Abstract
In this chapter we will start explaining in detail how APIs should be designed. We will define what APIs are and will describe a set of characteristics that we think make up a good API, using what you now recognize as our opinionated approach.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
“API—application program interface”, Webopedia (August 24, 2016). http://www.webopedia.com/TERM/A/API.html
- 2.
“Application programming interface”, Wikipedia, referenced on May 5, 2016. https://en.wikipedia.org/wiki/Application_programming_interface
- 3.
“API Design is easy … Good API Design is HARD”, David Carver (October 20, 2009). https://intellectualcramps.wordpress.com/2009/10/20/api-design-is-easy-good-api-design-is-hard/
- 4.
Werner Vogels, “10 Lessons from 10 Years of Amazon Web Services,” March 11, 2016. http://www.allthingsdistributed.com/2016/03/10-lessons-from-10-years-of-aws.html
- 5.
Joshua Bloch, “How to Design a Good API and Why it Matters”, JavaPolis 2005, Antwerp, Belgium. https://www.infoq.com/presentations/effective-api-design
- 6.
“Hypermedia Types”, Mike Amundsen (2010). http://amundsen.com/hypermedia/
- 7.
Chapter 7, which focuses on optimizing APIs, will show the use and virtues of a few hypermedia types in more detail.
- 8.
The p90 value is the number of milliseconds latency in which 90% of the requests reaching the API are serviced. In other words, no more than 10% of all requests take longer for the service to process and respond to.
- 9.
“Leaky abstraction,” Wikipedia, referenced on May 2, 2016. https://en.wikipedia.org/wiki/Leaky_abstraction
- 10.
“Principles behind the Agile Manifesto,”. http://agilemanifesto.org/principles.html
- 11.
For internal APIs, the security and authentication features surrounding the authenticity of this API key can be quite relaxed; that is, clients can usually be trusted to reliably self-identify. More stringent rules for authentication, authorization, expiry, and encryption need to apply for externally accessible API keys.
- 12.
We will discuss aspects of monitoring your services in more detail in Chapter 13.
- 13.
Some companies, like Netflix, on the other hand opt to keep old versions of internal APIs around until no client can be identified as using them. See Chapter 1 for more details on the Netflix approach.
- 14.
We discuss this and other topics of operational support in a microservices environment at length in Chapter 14.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2016 Cloves Carneiro Jr. and Tim Schmelmer
About this chapter
Cite this chapter
Carneiro, C., Schmelmer, T. (2016). Designing Your APIs. In: Microservices From Day One. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1937-9_4
Download citation
DOI: https://doi.org/10.1007/978-1-4842-1937-9_4
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-1936-2
Online ISBN: 978-1-4842-1937-9
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books