What’s the point, Grandma? (API’s and endpoints)


The best way to KNOW that you know something is to be able to explain it to your grandma.  Today, I will teach you about endpoints, Grandma!

Firstly, let’s talk about what an API is.   API stands for Application Programming Interface, it allows one piece of software to talk to another piece of software.  Let’s start with the farm analogy, since you grew up on a farm Grandma

Let’s say that your farm’s name is Back End Farms (this represents the back-end/server side).  At Back End Farms you sell eggs…  In our analogy, the people that enjoy your eggs represent the users or client.  You sell eggs to local restaurants because someone let it slip that you make the best omelets in the state and once the word got out, your requests for eggs sky-rocketed.   In order to fulfill the egg supply requirements, you had to buy more hens, keep track of orders, balance your check book ( <– Grandma knows what this means 😉 ) etc.   All of these processes are actually handled at BACK END Farms.   In order for your eggs (data) to get to the customers (users), you had to create a path that points customers down the right road to get to the eggs.  A.k.a. the end point.

To add one more piece to the analogy, picture distributers putting in orders for eggs and delivering them to the restaurants or markets.  Distributers that follow this path back and forth between the restaurants and the farm delivering eggs, are like other developers using your API.   An API is a way for customers of any kind to use what you have at BACK-END Farms.  You can have multiple API’s for accessing different things on the back end, just like if Grandma decides to sell corn as well, she will have an API that gives access to a corn endpoint.  Additionally, multiple users can access the same API just like multiple delivery trucks can come to the farm to get eggs or corn.

To recap, backend = what happens on the server side (behind the scene at the farm), endpoint = where data (eggs) is obtained for users (customers/client) , API = what connects the user to the endpoint.

Right now, I am using an API call to connect to a database so that I can get data to use in a web app.  API’s and endpoints are used to access many different “backend” things.  They are extremely useful and I hope this has helped you understand more about how they work!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s