5
(120)

An application programming interface (API) is a set of definitions, protocols, and tools for building application software and connect it with related interfaces. There exist many types of integration that we are calling standards.

API protocol and architecture

APIs exchange commands and data, and this requires clear protocols and architectures — the rules, structures, and constraints that govern an API’s operation. Today, there are three categories of API protocols or architectures: REST, RPC, and SOAP. These may be dubbed “formats,” each with unique characteristics and tradeoffs and employed for different purposes.

REST. The representational state transfer (REST) architecture is perhaps the most popular approach to build APIs. REST relies on a client/server approach that separates the front and back ends of the API and provides considerable flexibility in development and implementation. REST is “stateless,” which means the API stores no data or status between requests. REST supports caching, which stores responses for slow or non-time-sensitive APIs. REST APIs, usually termed “RESTful APIs,” also can communicate directly, or operate through intermediate systems such as API gateways and load balancers.

Ad - Clicking these help us to continue

RPC. The remote procedural call (RPC) protocol is a simple means to send multiple parameters and receive results. RPC APIs invoke executable actions or processes, while REST APIs mainly exchange data or resources such as documents. RPC can employ two different languages, JSON and XML, for coding; these APIs are dubbed JSON-RPC and XML-RPC, respectively.

SOAP. The simple object access protocol (SOAP) is a messaging standard defined by the World Wide Web Consortium and broadly used to create web APIs, usually with XML. SOAP supports a wide range of communication protocols found across the internet such as HTTP, SMTP, and TCP. SOAP is also extensible and style-independent, which allows developers to write SOAP APIs in varied ways and easily add features and functionality. The SOAP approach defines how the SOAP message is processed, the features and modules included the communication protocol(s) supported and the construction of SOAP messages.

Compared with the flexibility of REST, SOAP is a highly structured, tightly controlled, and clearly defined standard. For example, SOAP messages may contain up to four components including an envelope, header, body, and fault (error handling).

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 120

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

.

Subscribe to Updates


Latest Posts

Smart Cities
About Smart Cities - Smart City Tokyo
Tokyo