Skip to content

APIs with SOAP, REST and gRPC

APIs with SOAP, REST and gRPC

APIs

Motivation

Types of API Protocols

SOAP API Protocol (Simple Object Access Protocol)

REST API Protocol (Representational State Transfer)

OpenAPI Specification (originally known as the Swagger Specification)

RPC API Protocol (Remote Procedure Call)

gRPC

Comparisons

SOAP vs REST

  • geeksforgeeks.org: Difference between REST API and SOAP API
  • dzone: A Comprehensive Guide to REST vs. SOAP Learn the primary differences between REST and SOAP APIs, each one’s benefits, and when it’s appropriate to use the two.
  • dzone: Web Services Architecture – When to Use SOAP vs REST Learn why SOAP (Simple Object Access Protocol) and REST (Representation State Transfer) are popular with developers working on system integration projects.
  • dzone: Comparing RESTful APIs and SOAP APIs Using MuleSoft as an Example
  • reply.com: Web Services: SOAP and REST - A Simple Introduction
    • SOAP is a communications protocol while REST is a set of architectural principles for data transmission.
    • REST was designed to be a more straightforward and easy to implement alternative to heavyweight SOAP for web service access. SOAP functions well in distributed environments where REST assumes a direct point to point communication. Also, SOAP allows for services to describe themselves to clients and in some languages allows for automation. On the other hand, REST is fast as less processing is required, uses less bandwidth and is closer to technologies used in web design.
    • The choice on which to use is totally dependent on what the requirement. For example, SOAP is a better choice for applications that have complex API so as to describe the services and methods, where formal contracts are agreed for the exchange format, where a guaranteed level of security is required etc. REST will be preferred when limiting bandwidth and resources, when operations are can be stateless and the information can be cached.

REST vs OpenAPI vs gRPC

Tools

API Testing

GraphQL

  • GraphQL A query language for your API
  • How is the OpenAPI Specification different from GraphQL? How are screws better than nails? Both are useful tools that solve similar problems in slightly different ways. OpenAPI Specification offers a declarative contract that defines the structure of API requests and responses as discrete operations. GraphQL prefers an interface style that is more like querying a database and is best suited to graph databases.

Free Web Services (Public APIs)