What is an API?

image.png


The image below illustrates the fundamental idea behind an API (Application Programming Interface) by showing how a system defines a contract that specifies how a user interacts with it.

image.png

Key Points:

image.png

<aside> 💡

There are recommended practices for implementing APIs. While not following these practices won't break your code unless there are algorithmic issues, it may make your APIs harder for others to read and understand if they don't follow standard conventions.

</aside>

How Network APIs Work:

  1. Client Sends a Request:
  2. Server Receives the Request:
  3. Client Receives the Response:

What is a REST API?