Asp.Net Web API and REST API

API (Application Programming Interface) is an interface which takes the requests from various clients (eg: mobile app, web, windows,…etc) and provides the required functionality. For example, you have a web site where users can register. But you also have the mobile application with registration facility. Instead of developing the registration functionality separately, develop this functionality in Rest API and both (web & mobile app) clients will call this API for new user registration.

REST is not a protocol, it is Representational State Transfer. REST is an architectural style of network systems works through http/https protocol. Rest API exposes the functionality in the form of representations. Each request in Rest API will get identified based on URI (Uniform Resource Identifier). For example is the example for Rest API method. Many websites provides the new user registration facility through Facebook, Gmail, ….etc logins by calling the Facebook, Gmail, ….etc registration Rest API’s.

Using Asp.Net Web API, we can develop HTTP services for broad range of clients including web and mobile. Asp.Net Web API and Rest API both are not same. Asp.Net Web API is a framework where we can easily build the Rest API’s.

Rest API exposes CRUD's (Create, Read, Update, Delete) operations through POST, GET, PUT, and DELETE http verbs.

Add comment