Files
awesome-kubernetes/docs/api.md
Inaki Fernandez b962617136 markdown lint
2022-10-02 22:51:53 +02:00

32 KiB
Raw Blame History

APIs with SOAP, REST and gRPC

  1. APIs
  2. Python FastAPI
  3. Python REST APIs with flask
  4. Motivation
  5. State of the API Report
    1. Postman State of the API Report
    2. Smartbear State of the API Report
  6. Types of API Protocols. Interprocess Communication in Microservices
    1. SOAP API Protocol (Simple Object Access Protocol)
    2. REST API Protocol (Representational State Transfer)
      1. OpenAPI Specification (originally known as the Swagger Specification)
    3. RPC API Protocol (Remote Procedure Call)
      1. gRPC
    4. Asynchronous APIs
      1. WebSockets
      2. Socket.io
      3. AsyncAPI
  7. Comparisons
    1. SOAP vs REST
    2. REST vs OpenAPI vs gRPC
    3. REST vs GraphQL vs gRPC
  8. Tools
    1. API Testing
    2. GraphQL
      1. Hasura
  9. Browser APIs
  10. API Security
  11. Free Web Services (Public APIs)
  12. Open Banking
  13. RPA
  14. API Ops
  15. Related
  16. Video APIs
  17. API Business Models
  18. Images
  19. Tweets

APIs

Python FastAPI

Python REST APIs with flask

Motivation

State of the API Report

Postman State of the API Report

Smartbear State of the API Report

Types of API Protocols. Interprocess Communication in Microservices

SOAP API Protocol (Simple Object Access Protocol)

REST API Protocol (Representational State Transfer)

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.
  • OpenAPI (f.k.a Swagger) has introduced a set of standardized specifications for REST APIs that, among many things, allows producers and consumers of APIs to work together in designing an API before even writing a single line of code! This design-first approach has improved the experience of API developers by giving them the opportunity to use tools like OpenAPI generator which takes an OpenAPI definition and generates scaffolding code for backenders, making the development of APIs much faster.
  • 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

Asynchronous APIs

WebSockets

Socket.io

AsyncAPI

  • AsyncAPI Building the future of event-driven architecture. Open source tools to easily build and maintain your event-driven architecture. All powered by the AsyncAPI specification, the industry standard for defining asynchronous APIs.
  • thenewstack.io: AsyncAPI Could Be the Default API Format for Event-Driven Architectures
  • microcks.io: Simulating CloudEvents with AsyncAPI and Microcks
    • The rise of Event Driven Architecture (EDA) is a necessary evolution step towards cloud-native applications. Events are the ultimate weapon to decouple your microservices within your architecture. They are bringing great benefits like space and time decoupling, better resiliency and elasticity.
    • But events come also with challenges! One of the first you are facing when starting up as a development team - aside the technology choice - is how to describe these events structure? Another challenge that comes very quickly after being: How can we efficiently work as a team without having to wait for someone elses events?
    • Well explore those particular two challenges and see how to simulate events using CloudEvents, AsyncAPI and Microcks.
    • AsyncAPI is an industry standard for defining asynchronous APIs. Our long-term goal is to make working with EDAs as easy as it is to work with REST APIs.
    • Microcks is an Open source Kubernetes-native tool for mocking/simulating and testing APIs. One purpose of Microcks is to turn your API contract (OpenAPI, AsyncAPI, Postman Collection) into live mocks in seconds. It means that once it has imported your AsyncAPI contract, Microcks start producing mock events on a message broker at a defined frequency. Using Microcks you can then simulate CloudEvents in seconds, without writing a single line of code. Microcks will allow the team relying on input events to start working without waiting for the team coding the event publication.
  • asyncapi.com: AsyncAPI and CloudEvents I've been receiving the same question for a long time now: Should I use CloudEvents or AsyncAPI? — And my response has always been the same: it depends!
    • CloudEvents: a specification for describing event data in a common way. CloudEvents seeks to ease event declaration and delivery across services, platforms and beyond!
    • AsyncAPI: Create machine-readable definitions of your event-driven APIs.

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.
  • baeldung.com: REST vs SOAP

REST vs OpenAPI vs gRPC

REST vs GraphQL vs gRPC

Tools

API Testing

GraphQL

Hasura

  • Hasura 🌟 Instant realtime GraphQL APIs for all your data
    • Build modern apps and APIs 10x faster
    • TickInstant GraphQL & REST APIs
    • TickBuilt in authorization for secure data access
    • TickOpen source

Browser APIs

API Security

Free Web Services (Public APIs)

Open Banking

RPA

API Ops

Video APIs

API Business Models

Images

??? note "Click to expand!"

<center>
[![top 10 api testing tools](images/summarising_top_10_api_testing_tools.png){: style="width:50%"}](https://blog.testproject.io/2020/06/25/top-10-api-testing-tools-to-watch-in-2020/)

[![20 API Business Models](images/api_business_models.jpg)](https://www.infoq.com/presentations/API-Business-Models/)

![gRPC vs REST vs GraphQL comparison](images/grpc_vs_rest_vs_graphql.png)

![REST API Design](images/REST_API_Design.jfif)
</center>

Tweets

Click to expand!

People complain about tooling fatigue but web dev in 2021 is 10x simpler than in 2011. You just gotta pick the right tools.

Infra: @PulumiCorp
Data: @PostgreSQL
API: @HasuraHQ
Frontend: @vercel's NextJS

And no proprietary bullshit—100% open source!

— gunar.uk (@gunar) May 21, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

/1 REST is the most common communication standard between computers over the internet. What is it? Why is it so popular? Let's take a look at this thread. pic.twitter.com/GBdBcC56aF

— Alex Xu (@alexxubyte) August 25, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>