Chapter One · The Promise Written Down

What an API Actually Is

Everyone nods when the word comes up in a meeting; almost nobody could draw what it means. This chapter replaces the nod with a picture: an API is an agreed way for one program to ask another for something — a promise, written down, readable by anyone. You will see the APIs already running your mornings, meet the two roles that clarify everything, learn why companies pay to keep these doors open, and be introduced to the bike-share city this whole book runs on.

Every chapter of this book makes you more capable at a keyboard, but this one has a different first job: to take a word you have been nodding along to and replace the nod with an actual picture. API — an agreed way for one program to ask another for something. A promise, written down, that anyone can read. Five short topics build that picture from parts you already own.

The route: what an interface is and why the word is on everything. The ten APIs you used before breakfast without noticing. The two roles — client asks, server answers — that clarify everything after them. Why companies pay real money to keep these doors open. And then the introductions that matter most: Riverport, Tandem, Vera, and the Thursday report this whole book is quietly building toward.

What you see, and what happened
What you see
The Tandem app showing 9 free bikes at Old Market station.
What happened
The app asked api.tandem.example a question and displayed the answer it got back.

Topics in This Chapter