Introduction to Application Programming Interface (API)

Learn how REST APIs are used to communicate between applications and databases.

Application Programming Interface (API)

An Application programming interface (API) is simply an intermediary. Assume someone goes to a store to buy a bag. The bag is available in red, blue, and pink, but not black, which they prefer. So they approach the store clerk and inquire whether or not they have a black version in stock. The assistant then approaches the inventory manager to find its current availability.

The same is true for an API, which serves as an intermediary, allowing two software components to communicate.

Let’s take the analogy above and apply it to APIs:

  • The inventory manager is the data source. They hold the information needed, and the shopper must request to access this information. Rejection and granting of access in an API are primarily determined by whether or not a user is authorized to access the required data.

  • The store assistant is the API. They take the request and send it to the inventory manager, then receive a response from the manager and send it back to the shopper.

  • The shopper is the client or receiving component who initiates the whole process and needs something done for them. They need the store assistant (the API) to inquire about the black bag.

Get hands-on with 1200+ tech skills courses.