Software, your way.
How To Get Good Custom Software
(Download)
(PDF)
burger menu icon
WillMaster

WillMaster > LibraryTutorials and Answers

FREE! Coding tips, tricks, and treasures.

Possibilities weekly ezine

Get the weekly email website developers read:

 

Your email address

name@example.com
YES! Send Possibilities every week!

What an API Is

An API helps software programs talk to each other. "API" is an acronym for "Application Program Interface."

Some programs are unable to interact with some other programs. Examples of reasons why include incompatible operating systems, unreachable locations (on different domains or devices), incompatible protocol, and an impenetrable security firewall.

An API facilitates the interaction of various separate programs.

To ensure the programs play nice with each other, the API can act as an gatekeeper, data filter, or protocol enforcer.

Here's a definition of API: An API is an Application Program Interface, a software intermediary for programs to interact with each other.

As an analogy, imagine a person who can speak only French and another who can speak only Spanish. A meaningful conversation is impossible until someone who is fluent with both French and Spanish acts as an intermediary.

An API can facilitate interaction between programs that speak different languages, have different protocols, or run on incompatible operating systems.

Let's do another analogy.

While driving an automobile, rate of travel is regulated by one or both of two ways:

  1. Using the foot pedal to manually control the speed of the engine for the desired rate of travel.

  2. Setting the cruise control to automatically control the speed of the engine for maintaining a constant rate of travel.

The foot pedal and the cruise control can be likened to elements of an API. The API is the intermediary between you and the engine.

Your position in relation to the position of the engine makes it impossible for you to control the engine directly. But you can and do control it through the API in the form of the foot pedal and the cruise control.

The resulting rate of travel is because of the speed of the engine as regulated by the driver through the intermediary.

An API can be an intermediary for programs physically separated from each other or available only via different methods of approach.

Software in a child's tablet and software in a desktop computer are an example where an API can facilitate things. The API translates the tablet program's requests so the desktop program can accept and act on them. And vice versa.

The child may be playing a game or interacting with an educational program. The software notices the child's skill warrants the next higher level of interaction.

Therefore, the tablet software sends a request for the next level to the API associated with the software on the desktop.

The desktop software responds with the data for the next level and the API relays the data to the tablet software.

Another example is a quiz to determine what plants may grow best in the quiz taker's garden.

When the responses are ready, the quiz software sends them to remote cloud software with a huge database for the results — through an API. The API:

  1. Receives the responses from the quiz software.
  2. Relays the responses to the cloud software.
  3. Receives the quiz results from the cloud software.
  4. Relays the results to the quiz software.

The quiz software then presents the results to the quiz taker.

Here's a third analogy.

The leader of a country is surrounded by security.

Certain trusted advisors and security personnel get unhampered access to the leader.

Others need to go through an established procedure or protocol, which includes proving their identity and perhaps also their intent. Further, they're searched to ensure they bring nothing that could be dangerous to the leader.

The leader can be seen as analogous to cloud software that provides support and direction to lots of other software at other domains and on other devices.

Those who get unhampered access to the leader can be seen as analogous to support software installed in the same area as the cloud software.

The security personnel and others who monitor access to the leader are analogous to an API regulating access and sanitizing data before it's relayed to the cloud software.

An API can be a gatekeeper between programs on each side of a layer of security. The programs interact through the API. The API sanitizes information before it's relayed and keeps security risks from hacking at a minimum.

An example is ReliableReservations.com with a restaurant managers dashboard on one domain that interacts with reservation databases on another domain — through an API intermediary.

Dashboard users are required to log in to prove they are eligible to be there.

The software on the ReliableReservations.com domain interacts with the cloud software on the other domain by providing a security key and the login credentials, along with the sanitized data. Every interaction requires the key and credentials.

An API is almost always in place for cloud software that accepts interaction from many websites, desktop computers, and mobile devices.

The API accepts data formatted a certain way or delivered with a certain protocol. It then reformats and sanitizes the data as needed before relaying it to the cloud software

The response from the cloud software may be reformatted again so the device software can use it.

Which format and what protocol are acceptable depends on the API; some accept more than one and some can reply with more than one. (Format examples are XML, name=value pairs, and JSON. Protocol examples are GET and POST.)

Not always, but generally, an API requires a token to identify the requesting software as being authorized to interact with the cloud software. (The token may be referred to as a key or a password.) The ones that don't require a token are known as public APIs.

An example of an interaction using a public API is a chat box on a web site where you can type something and engage without first logging in. Some chat programs don't use an API, but many do.

As you've learned, "API" is an acronym for "Application Program Interface." It acts as an intermediary so software programs can play nice together — can have a meaningful interaction.

(This article first appeared in Possibilities ezine.)

Need API work done? Contact us for assistance.

Will Bontrager

Was this article helpful to you?
(anonymous form)

Support This Website

Some of our support is from people like you who see the value of all that's offered for FREE at this website.

"Yes, let me contribute."

Amount (USD):

Tap to Choose
Contribution
Method

All information in WillMaster Library articles is presented AS-IS.

We only suggest and recommend what we believe is of value. As remuneration for the time and research involved to provide quality links, we generally use affiliate links when we can. Whenever we link to something not our own, you should assume they are affiliate links or that we benefit in some way.

How Can We Help You? balloons
How Can We Help You?
bullet Custom Programming
bullet Ready-Made Software
bullet Technical Support
bullet Possibilities Newsletter
bullet Website "How-To" Info
bullet Useful Information List
software index page

© 1998-2001 William and Mari Bontrager
© 2001-2011 Bontrager Connection, LLC
© 2011-2024 Will Bontrager Software LLC