2. CONTENTS
● What is an API
● Types of APIs
● HTTP Request Methods
● HTTP Response Codes
3. What is an API?
An application programming interface 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.
4. Restaurant Model Interpretation of API
Restaurant - Our Application
Menu - Services Provided by an application(Client Side)
Waiter - API
Kitchen - Application Server (Server Side)
Order - Request
Food - Response
5. Types of APIs
● REST API
REpresentational State Transfer is a commonly used API category that is not dependent on a
specific protocol.
REST is considered a relatively user-friendly API to work with, and many developers are
experienced in this technology.
● SOAP API
Simple Object Access Protocol is an API that connects different platforms together through HTTP
and XML.
Relatively older method of API implementation.
But provides more security as it follows strict protocols.
● ASP.NET API
Specific form of REST API developed around .NET technology.
6. REST VS SOAP
● Facebook , LinkedIn , Github ,Twitter ,etc uses REST based API Architecture.
7. HTTP Request Methods
A Typical Rest based Architecture uses mainly 4 HTTP Methods.
HTTP METHOD CRUD METHOD DESCRIPTION
POST CREATE/INSERT Add new resource
GET READ/SELECT Read resources
PUT UPDATE Edit an existing resource
DELETE DELETE Delete a resource
8. HTTP Status Codes
1. 1XX - Informational
2. 2XX - Success
3. 3XX - Redirection
4. 4XX - Client-Error
5. 5XX - Server Error
Some common status codes
404 - Not Found
200 - OK
400 - Bad Request
500 - Internal Server Error
403 - Forbidden