What is an API (Application Programming Interface)? What does it do? And what you need to know about it to get qualified candidates as a tech recruiter! Here is a recap of the webinar.
An API is an interface between two applications that allows them to communicate with one another. We will examine a real-world example to understand how it works.
Imagine you have a friend whose birthday is coming up. You want to send a thoughtful gift, which you buy online. Whatever it may be, a book, a PlayStation, or a simple gift card, the gift represents the package.
There are several ways you can have the package delivered. You can bring it to your friend’s house in person. Perhaps this is not viable during the pandemic or due to distance, so you opt for post or a delivery service. Your chosen method of delivery is the protocol, a set of instructions for how to get your package to the endpoint. For example, your package is sent by plane, and then delivered to your friend by bus.
The endpoint is your friend’s address that you specified when ordering the gift.
So, the three basic elements of an API are (1) the package; (2) the address; and (3) the protocol, which specifies how to get the package to the address.
Several other concepts are at play here as well. Depending on the delivery service and the properties of the gift itself, the gift will be packaged differently.
Format describes how it is packaged. Will your friend’s gift be delivered in a big box or a small envelope? If you are sending a TV, a different package will be used than if you are sending a bottle of wine. This is important to understand in the API ecosystem, as the size of the package will influence the price and speed of delivery.
The next concept is public versus private. If you use UPS as a delivery service, a delivery person will come to your friend’s door to deliver the package. They only see the public part of the house because that is all they have access to. To access the private (inside) part of the house, they would need a specific security mechanism, such as keys and permission to deliver the package to a certain part of the house.
This ties in with the concept of security. A UPS delivery person usually wears a uniform, so they are easy to identify. Additionally, the house has some security protocols to keep the people and valuable things inside safe.
Now we will see how this process is mirrored in frontend development.
Let’s say that you want to access information on a website: for example, an educational platform that handles users’ basic information, courses, payments, and grades.
The border between the frontend and backend of the website is like the door between the inside and outside of the house. If you search for information either about users, courses, payments, or grades, the servers handling these different types of information are the endpoints. There are separate “doors” to access each endpoint. When you request a certain type of information, the relevant endpoint is called to retrieve that data for you.
Now you want to access your own user information.
What is the payload you need to ask for that user information?
The package is the data you send to that endpoint. For example, to access your user information, you need to log in to your account using an email address and password. That email and password combo is the package of information that allows you to talk to the API. It proves that you exist so that you can qualify to receive specific information.
The protocol refers to how the requested data is delivered. On a website this is done via HTTP, or hypertext transfer protocol. HTTP passes all of the information from one point to another, delivering it to you on the frontend.
What does the format look like in the tech world? Data is just text in its raw form; it needs a format to deliver it. JSON is one such format that can be used to pass data from one point to another.
A user might have the following user information: name, birthday, password, location, credit card information, and data about the last login. This information is stored in databases, which serve as endpoints to the relevant servers.
When you ask for the above types of information, what will the server return? Most likely, it would spit out several pieces of non-confidential information: in this example, name, birthday, and location. This becomes a public API. All other information, like credit card details, is private: not accessible via an API.
Even if you use an API to make some information publicly available, you still ask people to identify themselves. For example, delivery people from UPS and DHL wear an obvious uniform to identify themselves. You can still give access to a public API, but you need to be able to identify who users are so you can know where they come from.
API is a multilayered system. Each system needs an API to be able to communicate with the rest of the world. The URL gives the protocol and specifies which database to look in. Protocol allows the backend to identify the user. A database itself has an endpoint from which it retrieves data. The database also has a way to determine what information is private. You will need a different level of authorization to access each type of information.
At the end of the day, API is just a collection of systems that connect to one another in an efficient and dynamic way.
Jamstack is a way to easily build multiple applications using APIs. You can build multiple apps to each handle a different aspect of your business.
Jamstack involves several ingredients: a JavaScript app (which is mostly frontend); an API that can connect that app with almost everything; and Markup, a technology that displays your content.
With Jamstack, you do not need to build your apps manually. The database can be replaced by simple UI that lets you change the data, and then the API automatically picks up and uses that data. All you need is a developer to connect the APIs.
Jamstack thus gives anyone the opportunity to build a complex system just by connecting APIs.
Zapier enables you to glue apps together via APis in a code-free way. Flows of actions across apps can be triggered and executed automatically.
Imagine that you’re running a startup. Your website needs to be able to perform a set of different functions.
For example, when potential customers arrive on your homepage, you want them to subscribe to your newsletter. For that, you need a place to administer surveys. You install a survey app with the click of a button.
Now you want to put the data generated by the survey on an installed marketing campaign tool. Based on that campaign tool, you want to send marketing material to people. For this, you install an email sender.
Then you want to be alerted whenever an email is sent out to the user. You also want to store data about the user’s response to your marketing email, so you install an app for that.
Together, this system encompasses a lot of apps that work together in an automatic chain. Ten years ago, a developer would manually install ALL the apps and APIs. This should not be your approach today. Instead, use a tool like Zapier or Jamstack.
Zapier will communicate automatically between apps to say, “when this trigger occurs, do this”. You only need each tool to automatically have an API. This means that your entire app is one big API reader!
In this webinar we discussed what APIs do, and how you can use them to automate systems of apps.
APIs are a way to show your front door (address), implement security protocols, and use the right packages and communication protocols to supply people with the data they need. Components in the frontend and backend of an app, as well as different apps in a system, all communicate using APIs.
In our next webinar on Friday April 23rd, we offer you five techniques to identify a good technical candidate. These steps don’t require a tech background but will boost the quality and efficiency of your hires. Sign up here.
In the meantime, you can request a free demo test of our newest tool, RAAW, to assess a technical candidate, considering metrics such as code quality and how developers perform against the latest trend metrics in software engineering. In a matter of hours, you'll know how good your candidates are.
See you soon!
You may have recruited Java developers before, This array of positions already gives you an idea of why it goes beyond the mere programming language.
Read MoreDec 02, 2020
5 min read
These strategies were mined from Davy's own experience hiring developers, combing through their past experiences with smart questions and technology.
Read MoreDec 02, 2020
5 min read