Skip to main content

Designing Your APIs

  • Chapter
  • First Online:
Microservices From Day One

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    “API—application program interface”, Webopedia (August 24, 2016). http://www.webopedia.com/TERM/A/API.html

  2. 2.

    “Application programming interface”, Wikipedia, referenced on May 5, 2016. https://en.wikipedia.org/wiki/Application_programming_interface

  3. 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. 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. 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. 6.

    “Hypermedia Types”, Mike Amundsen (2010). http://amundsen.com/hypermedia/

  7. 7.

    Chapter 7, which focuses on optimizing APIs, will show the use and virtues of a few hypermedia types in more detail.

  8. 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. 9.

    “Leaky abstraction,” Wikipedia, referenced on May 2, 2016. https://en.wikipedia.org/wiki/Leaky_abstraction

  10. 10.

    “Principles behind the Agile Manifesto,”. http://agilemanifesto.org/principles.html

  11. 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. 12.

    We will discuss aspects of monitoring your services in more detail in Chapter 13.

  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. 14.

    We discuss this and other topics of operational support in a microservices environment at length in Chapter 14.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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

Publish with us

Policies and ethics