1 What is API design?


This chapter covers

  • What an API is
  • Why API design matters
  • What designing an API means

Web application programming interfaces (APIs) are an essential pillar of our connected world. Software uses these interfaces to communicate—from applications on smartphones to deeply hidden backend servers, APIs are absolutely everywhere. Whether these are seen as simple technical interfaces or products in their own right, whole systems, whatever their size and purpose, rely on them. So do entire companies and organizations from tech startups and internet giants to non-tech small and medium-sized enterprises, big corporations, and government entities.

If APIs are an essential pillar of our connected world, API design is its foundation. When building and evolving an API-based system, whether it is visible to anyone or deeply hidden, whether it creates a single or many APIs, design must always be a major concern. The success or failure of such a system depends directly on the quality of the design of all its APIs.

But what does designing APIs really mean? And what do you have to learn to design APIs? To answer these questions, we need to consider what an API is and for whom it’s designed, and we also need to realize that designing an API is more than just designing a programming interface for applications.

1.1 What is an API?

1.1.1 An API is a web interface for software

1.1.2 APIs turn software into LEGO® bricks

1.2 Why API design matters

1.2.1 A public or private API is an interface for other developers

1.2.2 An API is made to hide the implementation

1.2.3 The terrible consequences of poorly designed APIs

1.3 The elements of API design

1.3.1 Learning the principles beyond programming interface design

1.3.2 Exploring all facets of API design