DEV Community

Discussion on: How APIs work — An Analogy For Dummies

Collapse
 
kanhalelor profile image
robSyntax

API - Application Programming Interface. It is a way of allowing you to access the data from another application or a way of applications to communicate with each other.

Take the example of a restaurant, since it belongs to someone else and you are not allowed to go to the Kitchen therefore the menu is the API. Allows you to make an order for food. Food is like data which you request for. The order you make is called an API call. When you make an order, the waiter will give you a response eg the food is available or not. Same happens with APIs, when you make an api call, you will either get a successful response and get your data or get an error and no data.