Get updates to your emailSubscribe
Generally speaking, the term “Web API” describes any software interface that is exposed over the Web using the HTTP protocol in order to facilitate application development (but not limited to any particular message format, pattern or implementation). In this lesson, we provide a detailed overview of the main Web API design styles: Tunneling (aka Web Service); URI; Hypermedia; Event-Driven.
From a design perspective, it is helpful to categorize the different types of Web API that exist based on the properties they exhibit. Understanding how APIs can be categorized will help you identify a style that will fit the goals of your API program and the requirements of your developers as well as the specific strengths and constraints of your organization.
In some cases, it may make sense to use a mixture of different API styles as part of a larger set of business processes or to support multiple user bases. However, taking such a heterogeneous approach to API design will make your API seem more complex to application developers and will make the interface more challenging to maintain.
Tunneling Style The most well-known implementation of the Tunneling API style (also known as the Web Service style) is the SOAP messaging standard. SOAP defines an RPC-like interface for application integration and utilizes a standard called WSDL to describe the interface. Client applications can generate proxy code based on a WSDL document and make calls as if the remote component is local. A Tunneling/Web Service API normally:
- Exposes an RPC-like interface and provides an interface descriptor for binding
- Uses an XML-centric message format
- Uses HTTP as a transport protocol for a higher application-level protocol
- An object- or resource-centric API is exposed
- URIs and query parameters are used to identify and filter objects
- CRUD (create, read, update, delete) operations are mapped to HTTP methods
- Exposes a task-based interface, often incorporating a workflow or state machine
- Uses media to describe link semantics, template-based input and message structures
- Provides its own URIs
- The client and/or the server listen for new events
- Events are transmitted via asynchronous messages, as they occur
Explore the role APIs play in empowering teams and enabling organizations to innovate.
Mike Amundsen on May 24, 2018