A web API is the application programming interface (API) for both the web server and web browser. It gathers definitions, procedures and protocols to help the communication between different computer softwares. HTTP services for example, is built by ASP.NET Web API in order to reach a variety of clients such as smartphones, tablets. In addition it is an ideal platform for building RESTful applications on the .NET Framework.
- 1 Server-side
- 2 Client-side
- 3 ASP.NET Web API Character
- 4 Differences between Web API and Web Services
- 5 Web API Features
- 6 API Types
- 7 Sample of Web APIs in different Services
- 8 API Modeling Languages
- 9 See also
- 10 References
- 11 Further reading
A server-side web API is a programmatic interface to a defined request-response message system, typically expressed in JSON or XML, which is exposed via the web—most commonly by means of an HTTP-based web server. Mashups are web applications which combine the use of multiple such web APIs. Webhooks are server-side web APIs that take as input a URI that is designed to be used like a remote named pipe or a type of callback such that the server acts as a client to dereference the provided URI and trigger an event on another server which handles this event thus providing a type of peer-to-peer IPC.
While web API in this context is sometimes considered a synonym for web service, Web 2.0 web applications have moved away from SOAP-based web services towards more cohesive collections of RESTful web resources. These RESTful web APIs are accessible via standard HTTP methods by a variety of HTTP clients including browsers and mobile devices.
Google created their Native Client architecture which is designed to help replace insecure native plug-ins with secure native sandboxed extensions and applications. They have also made this portable by employing a modified LLVM AOT compiler.
ASP.NET Web API Character
•Advanced HTTP programming model: using the new HTTP object model also the HTTP client uses the same programming model and HTTP pipelining.
•Support routing: Web API fully supports ASP.NET routing, including routing parameters and constraints.
•Content negotiation: The client and server can work together to determine the format of the data returned by the API. Default support XML, JSON and Form URL-Encoded format, can be extended to add custom formats.
•Model binding and validation: model binder can easily extract data from the HTTP request and converted into Net objects.
•Based on the configuration code: Web API code complete the configuration,ensuring the cleanliness of the configuration file.
•Self-hosted (Self-Host): Web API is hosted in IIS, you can also hosted in the process, you can still use the route as well as other features.
•Improved Http details testability: Web API is not the HTTP details set to a static Context object, but the use HttpRequestMessage and HttpResponseMessage.
Differences between Web API and Web Services
Web service is basically a standard interaction between different electronic devices.
Web API is one of the Web services based on HTTP and it is a set of data structures to help different applications. However it is undefined, which means everyone can provide their description just by PDF and it is not standard.
Web API Features
The main features of Web API.
•Express different meanings by different http action.
•Responses have different meanings through Http Status Code and the client can Accept header to negotiate with the server format.
•Responses format supports JSON, XML, and can be extended to add other formats.
•It has automatic support for OData.
•Support Self-host or IIS host.
API is divided into Web service APIs, Library-based APIs, Object remoting APIs and Hardware APIs.
Web service APIs
Web Service is a system that can be accessed by URL. HTTP is used to exchange information, which can be understood by other applications in a format.
Examples of Web Service
SOAP (Simple Object Access Protocol)
By definition Soap is the communication process and the structure of the messages.
XML-RPC is an Internet protocol, using a specific XML format to transfer data.
JSON-RPC is an RPC protocol, using JSON data format. It can be used in various systems and environment based on the structure of Internet, also it can be used over sockets, over http, or in many different message passing environments. The advantage of JSON-RPC would be small volume and relative simple formats.
REST (Representational state transfer)
REST (Representational state transfer) is not a protocol while it is an architecture. It is a network application for the design and development of methods that can reduce development complexity, improve system scalability.
REST made a number of design concepts and guidelines:
•All the things on the network are abstracted into resources
•Each resource corresponds to a unique resource identifier
•Adoption of a common connector interface to operate on resources
•The various operations on resources will not change resource identification
•All operations are stateless
It is used in different aspects such as business process and mobile applications.
This type of API can only be accessed when an application is reference the code of library and then can use the library functions to exchange the information.
Class-based APIs (object oriented)
Class-based APIs (object oriented) is a special type of library-based API organised by classes to provide data. Different information and associated behaviors should be given of a specific concept.
Object remoting APIs
Object remoting APIs use a remoting protocol, which works by implementing local proxy objects to represent the remote objects, and interacting with the local object. 
Hardware APIs deal with the hardware on a device.
Sample of Web APIs in different Services
There are 5 basic services on Web Platform. Different forms of APIs are provided in each one.
Information Services provide massive specific information, including geographical data like Google Maps API, which is designed for developers to provide a common interface using Simple Object Access Protocol (SOAP) like the Amazon E-Commerce, Product Data Amazon historcal Pricing Services  and the latest release of Yahoo. These services have in common is that they provide simple API to access massive amounts of data, which could lead to unpredictable cross-application information.
Storage services concern abstraction and virtualization storage. Leader in this area is amazon s3. For developers, S3 provides an extremely streamlined abstract API, allowing easy access to information.
Because of the complexity of the technical and commercial, message service has not been in a large-scale development. Short term visible web-based communications services is Amazon Simple Queue Service. This service enables any application between security and scalable queue-based communication more convenient.
Because searching is the base and dominance in the field of web, search services are a key part of the new web infrastructure. An example is Alexa search platform, which led to a series of challenges designed vertical position google search engine.
API Modeling Languages
A number of Modeling languages have been proposed for describing practical Web APIs including:
- Wasson, Mike. "Microsoft ASP.NET". Microsoft ASP.NET. Retrieved 20 January 2014.
- "Mashup Dashboard". ProgrammableWeb.com. 2009.
- Benslimane, D.; Dustdar, S.; Sheth, A. (2008). "Services Mashups: The New Generation of Web Applications". IEEE Internet Computing 10 (5): 13–15. doi:10.1109/MIC.2008.110.
- WebMonkey News
- Mozilla WebAPI Wiki
- zhang, zhimin. "ASP.NET Web API".
- McIver, Aaron. "web service". programmers. Retrieved 21 January 2011.
- D., Ranjan. "web API". code project. Retrieved 11 March 2013.
- Chauhan, Shailendra. "Web Api Feaures". dotnet-tickets.
- Maddox, Sarah. "API types". FFEATHERS. Retrieved 16 February 2014.
- Rouse, Margaret. "SOAP (Simple Object Access Protocol)".
- Winer, Dave. "XML-RPC Specification". Retrieved 15 June 1999.
- "JSON-RPC 2.0 Specification".
- Rouse, Margaret. "REST (representational state transfer)".
- IEEE. Parallel and Distributed Simulation. IEEE. pp. 154–161. ISBN 0-8186-8457-7.
- Surapaneni, Narayana. Java & .NET: A Developer's Guide to Interoperability and Migration.
- Weiss, Ray. "Ray Weiss". Retrieved 22 January 2001.
- "web Api".
- Gibilisco, Stan. "google maps". whatls.com. Retrieved February 2013.
- "Introduction of SOAP".
- .O, admin. "Amazon E-Commerce". awsbook. Retrieved 25 October 2014.
- Shanahan, Francis (3 January 2007). Product Data Amazon historcal Pricing Services (1 ed.). wrox. ISBN 978-0470097779. Retrieved 25 October 2014.
- Rouse, Margaret. "Amazon S3". whatls. Retrieved 25 October 2014.
- Singh, Niraj. "Amazon Simple Queue Service using java". jave code greeks. Retrieved 25 June 2013.
- Nguyen, Michael. "Alexa Web Search Platform". SEJ. Retrieved 13 December 2005.
- Jacobson, Daniel; Woods, Dan; Brail, Greg (November 2011). APIs a strategy guide. Sebastopol, Calif: O'Reilly Media. ISBN 978-1-4493-0892-6.
|This World Wide Web–related article is a stub. You can help Wikipedia by expanding it.|