Files
awesome-kubernetes/docs/api.md
Inaki Fernandez d2d15abcbe apr
2023-11-12 20:37:07 +01:00

54 KiB
Raw Blame History

APIs with SOAP, REST and gRPC

  1. APIs
  2. From RESTful to Event-Driven APIs
  3. API Gateway vs. Load Balancer: What's The Difference?
  4. Python FastAPI
  5. Python REST APIs with flask
  6. Motivation
  7. State of the API Report
    1. Postman State of the API Report
    2. Smartbear State of the API Report
  8. 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
  9. Comparisons
    1. SOAP vs REST
    2. REST vs OpenAPI vs gRPC
    3. REST vs GraphQL vs gRPC
  10. Tools
    1. API Testing
    2. GraphQL
      1. Hasura
  11. Browser APIs
  12. API Security
  13. Free Web Services (Public APIs)
  14. Open Banking
  15. RPA
  16. API Ops
  17. Related
  18. Video APIs
  19. API Business Models
  20. Videos
  21. Images
  22. Tweets

APIs

From RESTful to Event-Driven APIs

API Gateway vs. Load Balancer: What's The Difference?

  • blog.hubspot.com: API Gateway vs. Load Balancer: What's The Difference? An API gateway vs. load balancer comparison can be boiled down to the fact that they both manage traffic entering your website or application but have different roles. An API gateway handles authentication and security policies, while a load balancer API distributes network traffic across multiple servers.

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

Videos

??? note "Click to expand!"

<center>
<iframe width="560" height="315" src="https://www.youtube.com/embed/yWzKJPw_VzM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</center>

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)

[![REST vs GrapQL](images/rest_vs_graphql.jfif)](https://t.co/AF9GfbgBWZ)
</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>

Optimize API performance with these 5 tips.

Thread🧵👇

— RapidAPI (@Rapid_API) October 21, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

API Testing. What is it?

Thread 🧵👇

— RapidAPI (@Rapid_API) October 24, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Authentication vs. Authorization What's the difference?

A thread 🧵

— RapidAPI (@Rapid_API) October 27, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Let's discuss how we can handle CORS in Express.

Thread 🧵👇

— RapidAPI (@Rapid_API) October 27, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

HTTP headers that developers should be aware of.

Thread🧵👇

— RapidAPI (@Rapid_API) November 10, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

OAuth2, features, and advantages.

Thread 🧵👇

— RapidAPI (@Rapid_API) November 12, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

How to increase API performance?

Thread 🧵👇

— RapidAPI (@Rapid_API) November 11, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Different Architectural Styles of APIs

Thread 🧵👇

— RapidAPI (@Rapid_API) November 25, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

What is GraphQL? When should we use it?

How is GraphQL the same as REST? How are they different? Lets dive deeper.

Watch here: https://t.co/AF9GfbgBWZ pic.twitter.com/EUgGe82rNu

— Bytebytego (@bytebytego) November 28, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Local Storage. What is it?

Thread 🧵👇

— RapidAPI (@Rapid_API) November 28, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Best Practices for Securing API Keys

Thread 🧵👇

— RapidAPI (@Rapid_API) December 12, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

API Authentication methods

Thread 🧵👇

— RapidAPI (@Rapid_API) December 26, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Here, we'll discuss the three most commonly used API authentication techniques:

- HTTP Authentication
- API Keys (Bearer token, JSON Web Token)
- OAuth

— RapidAPI (@Rapid_API) December 26, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

HTTP Status codes worth knowing about

Thread 🧵👇

— RapidAPI (@Rapid_API) December 27, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

What exactly is CORS, and how does it work?

Thread 🧵

— RapidAPI (@Rapid_API) December 27, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

What is an API? pic.twitter.com/FBQfcGDsdh

— RapidAPI (@Rapid_API) December 28, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Difference between API Authentication and API Authorization.

Thread 🧵👇

— RapidAPI (@Rapid_API) December 28, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

How does JSON web token (JWT) authentication work?

Thread 🧵👇🏻

— RapidAPI (@Rapid_API) December 29, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

What is the difference between an API and a Microservice?

Thread 🧵👇

— RapidAPI (@Rapid_API) December 29, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

API security best practices 👇

{ 1 / 6 } pic.twitter.com/0IjjK7zhWv

— RapidAPI (@Rapid_API) December 30, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

What is a REST API?

Thread 🧵👇

— Rapid (@Rapid_API) January 30, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

10 API related terms that every developer should be aware of

Thread 🧵👇

— Rapid (@Rapid_API) February 6, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

What are CRUD operations?

Thread 🧵👇

— Rapid (@Rapid_API) February 6, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

How do Webhooks work?👇 pic.twitter.com/9CQ76uhY4l

— Rapid (@Rapid_API) February 7, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

How to use Axios to make API requests.

Thread 🧵👇

— Rapid (@Rapid_API) February 6, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Five GPT-3 based APIs for your next side project.

Thread 🧵👇

— Rapid (@Rapid_API) February 7, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

API Design best practices

Thread 🧵👇

— Rapid (@Rapid_API) February 9, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

HTTP 2xx Status Codes worth knowing about

Thread 🧵👇

— Rapid (@Rapid_API) February 9, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

What's the difference between the HTTP methods PUT and PATCH?

A thread 👇

{ 1 / 5 } pic.twitter.com/lTCpIGU9l3

— Rapid (@Rapid_API) February 10, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

What's the difference between API and microservice?

Thread 🧵👇

— Rapid (@Rapid_API) February 14, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Top location APIs that you can use in your next project

Thread 🧵👇

— Rapid (@Rapid_API) February 15, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Cloud and APIs. How does it work?

Thread 🧵👇

— Rapid (@Rapid_API) February 18, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

8 APIs that you can use in your next side project

Thread 🧵👇

— Rapid (@Rapid_API) February 20, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

How does JSON web token (JWT) authentication work?

Thread 🧵👇

— Rapid (@Rapid_API) February 22, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

REST API development tips 👇

{ 1 / 6 } pic.twitter.com/9L2QKReuRp

— Rapid (@Rapid_API) February 24, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Benefits of API caching 👇🧵

— Rapid (@Rapid_API) February 24, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Difference between API and Webhook

Thread 🧵👇

— Rapid (@Rapid_API) February 27, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

/1 What are the API architectural styles?

The diagram below shows the common API architectural styles in one picture:

1. REST
2. GraphQL
3. Web socket
4. Webhook
5. gRPC
6. SOAP pic.twitter.com/ojmpp12A09

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

Introduction to GraphQL queries.

A thread 🧵👇

— Rapid (@Rapid_API) March 9, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Lets talk about different API testing methods.

Thread 🧵👇

— Rapid (@Rapid_API) March 13, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

API Integration. What is it?

Thread 🧵👇

— Rapid (@Rapid_API) March 14, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

How to avoid API rate limits?

A thread 🧵👇

— Rapid (@Rapid_API) March 15, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Difference between JSON and XML

- Structure
- Performance
- Compatibility
- Usage
- Supported types
- Readability
- Flexibility

Thread 🧵👇

— Rapid (@Rapid_API) March 17, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Let's talk about APIs

- What is an API
- Usage of APIs
- Types of APIs
- Benefits of APIs

Thread 🧵👇

— Rapid (@Rapid_API) March 22, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Lets learn about OAuth

Thread 🧵👇

— Rapid (@Rapid_API) March 28, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Different API Authentication Methods

1 Basic Auth
2 API Keys
3 OAuth 2.0
4 JSON Web Tokens
5 Header API Authentication

Thread 🧵👇

— Rapid (@Rapid_API) April 6, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

API Design Principles and Best Practices.

Focus on User Experience
Embrace RESTful Principles
Use Consistent Naming Conventions
Versioning & Backward Compatibility
Error Handling and Messaging
Pagination and Filtering
Security and Authentication

Thread🧵👇

— Rapid (@Rapid_API) April 12, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

API documentation.

Tools, Techniques, and Importance:

Thread🧵👇

— Rapid (@Rapid_API) April 12, 2023
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>