If you look at the Yasurf website, you will see that in addition to web apps and databases, Yasurf can also create APIs. If you’ve ever talked to programmers, you’ve probably heard of these and how they can be used to perform specific activities or retrieve data. But what exactly is an API, and why are they created?
I’ll describe the idea with a non-IT example.
When going to a restaurant, you communicate with the waiter to order. You can order food and drinks, inquire about the menu, ask for the bill, or do a number of other things. In this case, the waiter stands between you and all the sophisticated stuff that happens behind the scenes. You won’t have to deal with stoves, ovens, dishes, stock management, or pouring drinks. It serves as a link between you and all the services a restaurant provides.
The waiter offers you a method of connecting with the restaurant while isolating yourself from all the complexities that go behind the scenes. In some ways, the waiter can be considered the restaurant’s API, and by this example, you can see why they are useful.
So… what is an API?
API stands for Application Programming Interface, and it is a method for different programs to communicate in various ways. APIs come in a variety of shapes and sizes and are used for a variety of purposes.
First, APIs can be used to get data from external sources. In the restaurant, the waiter can inform you about the status of your order. Thanks to the waiter, you don’t have to walk to the kitchen yourself to get that information.
Another example is the weather app on your phone. Both Google nor Apple don’t really have temperature sensors installed all over the world. No, instead, their apps use a third-party API to fetch weather forecasts. For example, Apple uses The Weather Channel’s API.
APIs make it possible to communicate data between different apps and services.
APIs are everywhere
Today, it is difficult to find a service that does not use an API. APIs can be accessed to search for recipes, lyrics, barcodes, zip codes, available parking spaces, holidays, and so on.
APIs can be used to mask the complexity and perform actions in addition to accessing data. In the restaurant example, you don’t need to know how to make a flawless sushi roll; you can just order one.
Another example is the operating systems on our computers and smartphones. App developers don’t have to worry about configuring a Wi-Fi connection, drawing shapes on the screen to create a beautiful user experience, or figuring out how to interact with different sensors like the accelerometer or GPS. Instead, developers can take advantage of APIs and make everything easier. The program is not concerned with the device it runs on, the hardware, screen quality, or anything else. It makes developers more efficient because they can focus on what matters to them.
In addition to getting data and abstracting complexity, APIs can be used to increase functionality. For example, on iOS, applications can display a widget in the Notification Center. To make this possible, the app notifies the system via an API that a widget is ready. If the user adds it to their message center, the system will call the app to determine how the widget should be displayed.
Even the big companies use API
Siri, Google Assistant, and Alexa are more examples. These personal assistants are quite advanced, but third-party developers can extend the functionality even further by using the assistant’s API. Google Home, for example, had no idea how to turn smart outlets on and off. However, this changed when the company connected the smart sockets to Google Assistant via an API. Google was suddenly made aware of the new hardware, its capabilities, and how to interact with it.
APIs are all around us, even if you don’t recognize them. You have probably experienced that your phone asks for permission to use your location or microphone. This brings us to the final application: APIs can be used as gatekeepers. For example, on mobile platforms, the system only provides a few APIs that can be used to get your location. Since it is centralized in the system, iOS or Android can easily inform you when an app uses your location.
Asking for permission
So it’s not the app’s fault if it asks for permission first. No, it’s the system that does it. There is no way around it. In addition, the system allows you to revoke this authorization at any time if you change your mind.
So when your phone asks you for permission, you know that an app is using a system API. While this is admirable, there is a catch: permission is usually only asked once. You may be logged into another website or app with your Google or Facebook account. It’s simple, fast, and convenient. However, by doing so, we also give the website or app access to some of our data. For example, our name or email address. This is great because it gives us control over our personal information. If you don’t want to share it, just decline it.
However, the problem here is that sometimes these permissions are persistent, and we forget which apps or websites we have allowed viewing our data. Cambridge Analytica, for example, managed to obtain enormous amounts of data with the Facebook API. They came up with a personality quiz in which they asked permission to get some of your personal information. However, if you’ve given it permission, the app can secretly access your data for months, even if you don’t use it anymore. Instead, you had to remove the authorization through the Facebook website.
In summary, APIs can act as gatekeepers, keeping our personal data secure and accessible only to the apps we choose. However, we need to consider how long those permissions are valid and remove them when we stop using an app.
Summarized
APIs are all around us. They are used to access data so that many apps or services can work together. They can also mask the complexity for developers, saving them time figuring out how GPS works, for example. APIs can also be used to extend the functionality of existing systems, and they can serve as gatekeepers to protect our personal information.
Do you want to have an API developed? Let us know, Yasurf is happy to help!