Api 1
Api 1
An application programming interface (API) is a way for two or more computer programs or
components to communicate with each other. It is a type of software interface, offering a service to
other pieces of software. A document or standard that describes how to build or use such a
connection or interface is called an API specification. A computer system that meets this standard is
said to implement or expose an API. The term API may refer either to the specification or to the
implementation. Whereas a system’s user interface dictates how its end-users interact with the
system in question, its API dictates how to write code that takes advantage of that system’s
capabilities.
One purpose of APIs is to hide the internal details of how a system works, exposing only those parts
that a programmer will find useful, and keeping them consistent even if the internal details change
later. An API may be custom-built for a particular pair of systems, or it may be a shared standard
allowing interoperability among many systems.
There are APIs for programming languages, software libraries, computer operating systems, and
computer hardware. APIs originated in the 1940s, though the term did not emerge until the 1960s and
1970s. Contemporary usage of the term API often refers to web APIs, which allow communication
between computers that are joined by the internet. Recent developments in APIs have led to the rise
in popularity of micro services, which are loosely coupled services accessed through public APIs.
➢ Additive change strategy: new features are added without modifying existing ones. Any
update must be backward compatible. This strategy is suitable for small projects with low rate
of change.
➢ Explicit version strategy: this strategy allows making any changes including breaking changes.
This strategy is suitable for complex applications and complex changes.
Purpose
In building applications, an API simplifies programming by abstracting the underlying implementation
and only exposing objects or actions the developer needs. While a graphical interface for an email
client might provide a user with a button that performs all the steps for fetching and highlighting new
emails, an API for file input/output might give the developer a function that copies a file from one
location to another without requiring that the developer understand the file system operations
occurring behind the scenes.