What are API's?

What are API's?

Imagine you're sitting at a table in a restaurant with a menu of choices to order from. The kitchen is the part of the "System" that will prepare your order. What is missing is the critical link to communicate your order to the kitchen and deliver your food back to your table. That's where the waiter or API comes in. The waiter is the messenger or API that takes your request or order and tells the kitchen -the system- what to do. Then the waiter delivers the response back to you; in this case, It's food.

API stands for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other.

APIs allow developers to save time by taking advantage of a platform’s implementation to do the nitty-gritty work. This helps reduce the amount of code developers need to create, and also helps create more consistency across apps for the same platform. APIs can control access to hardware and software resources.

Each time you use an app like Facebook, or you send an Instant message, or check the weather on your phone, you're using an API.

APIs are also used to control access to hardware devices and software functions that an application may not necessarily have permission to use. That’s why APIs often play a big role in security.

For instance, If you've visited a website before and you see a message in your browser that asking to see your precise location, that website is attempting to use the geolocation API in your web browser. Web browsers expose APIs like this to make it easy for web developers to access your location—they can just ask “where are you?” and the browser does the hard work of accessing GPS or nearby Wi-Fi networks to find your physical location.

When you use an application on your mobile phone, the application connects to the internet and sends a data to your server. The server then retrieves that data, interprets it, performs the necessary actions and sends it to your phone. The application then interprets that data and presents you with the information you wanted in a readable way. This is what an API is - all of this happens via API

Is API secure?

Your phone's data is never fully exposed to the server, and likewise the server is never fully exposed to your phone. Instead, each communicates with small packets of data, sharing only that which is necessary.

Some examples of Web Services API's

- SOAP: Simple Object Access Protocol (SOAP) is a message specification for exchanging information between systems and applications.

- XML -RPC: The Cloud Storage XML API is a RESTful interface that lets you manage Cloud Storage data in a programmatic way.

- JSON -RPC: is a stateless, light-weight remote procedure call (RPC) protocol. Primarily this specification defines several data structures and the rules around their processing.

- REST: REST APIs are the most common APIs used across the web today because the REST pattern provides simple, uniform interfaces.

A web service is a system or software that uses an address, i.e URL on the world wide web, to provide access to its services.

If you’ve gotten through this, you’ll have a better idea of what an API is. Happy learning.

Did you find this article valuable?

Support Bode's blog by becoming a sponsor. Any amount is appreciated!