what is an api and how does it work code example

Example 1: what is an api

An application program interface (API) is a set of routines, protocols, and
tools for building software applications.

Basically, an API specifies how software components should interact.
Additionally, APIs are used when programming graphical user interface (GUI)
components.

A good API makes it easier to develop a program by providing all the
building blocks. A programmer then puts the blocks together.

Example 2: what is an api

An application programming interface (API) is a computing interface which
defines interactions between multiple software intermediaries.

It defines the kinds of calls or requests that can be made, how to make them,
the data formats that should be used, the conventions to follow, etc.

Example 3: what is api

API (Application Programming Interface) helps in communication 
and data exchange between two software systems. It is the channel which 
connects two software systems communicate with one another.


An API forms the middle layer of a three-layered application pyramid, 
consisting of a data layer, a server layer and a presentation layer. 
While the data layer is concerned with data storage and the presentation 
layers are concerned with the user interface, the server layer is composed 
of business logic that defines the way for users to interact with various 
functions, features, and information. 

RESTful API ==> plain text, html, xml, json
SOAP ==> more secure, works with only xml

Example 4: what is api

API : Application Programming Interface
An api is a particular set of rules and specifications that programs can 
follow to communicate with each other .
The end user sends request , API executes instructions then get the data 
from the server and responds to the user.

Example 5: advantages of api

1-We can start testing process 
EARLY and the more bugs we
catch in API level testing,
the less bugs we will see on UI.
API level of application is
developed before the UI part.

2- API tests enable highly 
integrable tests, which is 
particularly useful if you
want to perform functional
GUI tests after API testing. 

3-In API testing,
data is exchanged
using XML or JSON.

4- Time Effective:
API testing usually is less time consuming
than functional GUI testing.

Tags:

Misc Example