API: The Unsung hero behind Software Apps
Just like any complex system or product software apps are not build from scratch (for most cases). Just like you don't get a car out chiseling block of cast iron. Same is true for mobile apps in your phone.
This has mirad requirements to talk to other programs or services in order to function and provide you information. Including ways in which the two or more than two programs or functions can talk to each other. Especially when a piece of written instructions which operates hundreads or thousands of pieces of previously written instructions written by different people at different times which maybe subject to not only different computer languages but also versions i.e different standards.
Now how do these two systems talk to each other is precisely what an API is all about. API defines the parameters which two entities understand to be able to talk to each other. It'slike you have gone to a foreign land and you need to learn how to communicate with someone who doesn't speak your language without internet.
To resolve this problem a set of rules are defined which allows the subjects to communicate with each other.
The below videos explains an API with the help of restaurant as an analogy.
DATA FLOW
When any two entities communicate transfer of data takes place, it can be airline prices or latest stock prices or even transfer of funds. The biggest benefit that APi offers it is allows requesting of different types of data, which exposing the underlying software infrastructure.
For example it's like a specific customer phone line which allows to you perform specific pre-determine functions. This also helps in restricting the kind of that can be requested. Providing access via API's is also a very common and successful way protect intellectual property without compromising on the benefits but does add the overhead of maintaing the infrastructure with bandwidth to service the API calls.
RELATIONSHIP
Every complex software product or service can be broken into much simpler parts which along with other parts are required for proper fuctioning. API's are used to take care of the hard part or the parts which are beyond the scope during it's development. And sometimes this requirements can be fairly complex.
Fpr example the what's app owned by facebook but is depending on API from twilio for conducting user authentication via sms. So everytime the what's app needs to verify the number it's dependent on the application programming interface for authenticating the user. It needs to share the user's mobile number and authentication code on which the entire security and what' app is at mercy of the API.