Thursday, June 15, 2017

API

Application Program Interface (API)

Application program interface (API) is a set of Routines, Protocols, and tools for Building Software Applications.

Simply said, that an application program interface (API) is code that allows two software programs to communicate with each other.

An API specifies how software components should interact and defines the correct way for a developer to write a program that requests services from an operating system (OS) or other application.

API Key
Many APIs require an API key.
An API key grants you access to a particular API.
An API key identifies you to the API, which helps the API provider keep track of how their service is used and prevent unauthorized or malicious activity.
API keys are often long alphanumeric strings.




How APIs work

APIs are made up of two related elements.
  1. A specification that describes how information is exchanged between programs, done in the form of a request for processing and a return of the necessary data.
  2. A Software interface that specification and published in some way for use.

Three basic types of APIs
  1. Local APIs
    • Local APIs are the original form, from which the name came. They offer OS or middleware services to application programs.
  2. Web APIs
    • Web APIs are often called RESTful or REST (representational state transfer) because the publisher of REST interfaces doesn't save any data internally between requests. As such, requests from many users can be intermingled as they would be on the internet.  
  3. Program APIs
    • Program APIs are based on technology that makes a remote procedure call (RPC) remote program component appear to be local to the rest of the software.
Endpoints
Endpoints are API-defined locations where particular data are stored.


An API or web service to be RESTful, it must do the following:
  • Separate the client from the server
  • Not hold state between requests
  • Use HTTP and HTTP methods

HTTP Methods
  1. GET
    • Retrieves information from the specified source
  2. PUT
    • Updates existing information of the specified source
  3. POST
    • Sends new information to the specified source
  4. DELETE
    • Removes existing information from the specified source


No comments:

Post a Comment

My First Day with Uki DN Cohort 1

 "Hello WORLD!"