APIs with SOAP, REST and gRPC
APIs with SOAP, REST and gRPC¶
APIs¶
- wikipedia: API Application Programming Interface
- apifriends.com: What is an API?
- axway.com: What is API Management?
- mulesoft.com: APIs versus web services
- Youtube Playlist: Introduction to APIs
- Devdocs.io API Documentation
Motivation¶
- APIs published, APIs consumed: mainstream enterprises increasingly behave like software vendors Mainstream enterprises increasingly reach out to customers with APIs, digital services. Unlike software providers though, many still have mostly on-premises infrastructure.
Types of API Protocols¶
- apifriends.com: What are the different types of APIs? 🌟 Types of API Protocols: SOAP, REST and RPC
SOAP API Protocol (Simple Object Access Protocol)¶
- wikipedia: SOAP
- geeksforgeeks.org: Basics of SOAP – Simple Object Access Protocol
- For information about the latest work on SOAP and a full list of SOAP specifications refer to the W3C Technical Reports
- guru99.com: SOAP Web Services Tutorial: Simple Object Access Protocol. What is SOAP?
- jitendrazaa.com: Create SOAP message using Java
- dzone: Creating a SOAP Web Service With Spring Boot Starter Web Services In this post, we cover the concepts of SOAP and REST and show you all the code you need to use SOAP web services in a Spring Boot app.
REST API Protocol (Representational State Transfer)¶
- wikipedia: REST
- geeksforgeeks.org: REST API (Introduction)
- geeksforgeeks.org: REST API Architectural Constraints
- mulesoft.com: What is a RESTful API?
- Dzone refcard: Foundations of RESTful Architecture 🌟
- Dzone: REST API tutorials
OpenAPI Specification (originally known as the Swagger Specification)¶
- OpenAPI evolved from the Swagger project. Swagger started out as a specification for documenting RESTful APIs. Later on, tools to generate client and server code and generating of test cases were added. While the original Swagger Specification was donated to the Linux Foundation and renamed the OpenAPI, Swagger remains one of the most widely used open-source toolsets for developing OpenAPIs.
- Wikipedia: OpenAPI Specification 🌟
- OpenAPI FAQ. What is OpenAPI Specification (OAS)? OpenAPI Specification The OAS defines a standard, programming language-agnostic interface description for REST APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic.
- apis.guru/openapi-directory: large archive of sample OpenAPI descriptions
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¶
- REST vs. gRPC: Battle of the APIs
- Comparing OpenAPI With gRPC 🌟 OpenAPI is a great choice due to its interoperability. On the other hand, gRPC offers a better performance. Luckily, you don’t have to choose one or the other.
Tools¶
API Testing¶
- softwaretestingportal.com: API Testing, Key Terminologies and more…
- dzone.com: 10 API Testing Tips for Beginners (SOAP and REST) Let’s take a look at ten API testing tips for beginners with a focus on REST APIs and SOAP APIs.
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.