What is API?

API stands for Application Programming Interface. It is defined how two pieces of software talk to eachother.

Types of APIs:

1) Web ( Rest, SOAP)

2) Platform (java, C++ etc)

Web APIs : We write for Software Developer Audience

Re : Representational

S: State

T: Transfer

It is design pattern not a protocol. Format of REST are JASON and XML 

SOAP

Before REST we had SOAP

SOAP: Simple Object Access Protocol

It only supports XML

It is a protocol not a design pattern.

To Understand difference between SOAP & REST

C: Create Resource Objets – POST

R: Retrieve Resource Objets- GET

U: Update Resource Objets – PUT

D:elete Resource Objets – DELETE

There are 3 ways that a data format can be specified:

Headers

Query Parameters

Suffix

Anatomy of a REQUEST

POST https://api.example.com/user?resource=device=ipad.

METHOD RESOURCE INFORMATION QUERY PARAMETER

Accept: application/json HEADER

Content_type:application/json

{ BODY

“name : “John Snow “

“email: snow.jon@doctoolss.com

}

CRUD METHOD

CREATE – PUT

RETRIEVE – GET

UPDATE – PUT

DELETE – DELETE

STATUS CODE

200 – OK

201 – CREATED

401 – UNAUTHORIZED

404 – NOT FOUND

403 – The no of API REQUEST per Month has been EXECUTED

About DocTooLss :

We make Technology EaZy via Docs” 

Follow us @doctools8 | WordPress: www.doctoolss.wordpress.com | Website: www.doctoolss.com | Facebook: https://www.facebook.com/DTdoctoolss/

One thought on “What is API?

Add yours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Website Built with WordPress.com.

Up ↑

Create your website with WordPress.com
Get started
%d bloggers like this: