API Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(31 intermediate revisions by the same user not shown)
Line 2: Line 2:


* [[API#Subjects|API]]
* [[API#Subjects|API]]
* [[Amazon API Gateway Concepts]]
* [[REST and Hypermedia]]
* [[Grpc|gRPC]]
=Overview=
At its core, an AP*I is a contract that specifies sending requests and receiving responses. The API is all about the data.
A REST API is made up of [[REST_and_Hypermedia#Resource|resources]] and [[REST_and_Hypermedia#Method|methods]].
=REST and Hypermedia Concepts=
{{Internal|REST and Hypermedia|Resource, Method, Request, Response}}
=API=
==REST API==
==Websocket API==
=OpenAPI Operation Declaration and Implementation Examples=
{{Internal|OpenAPI_Specification_Path#Operation_Declaration_and_Implementation_Examples|OpenAPI Examples}}


=API Design=
=API Design=


API Design or API Modeling.
API Design or API Modeling.
API Contract.
<FONT color=darkgray>TO PROCESS:
* Best Practices in API Design: https://swagger.io/resources/articles/best-practices-in-api-design/
* Building and Enforcing API Standards at Scale with Swagger https://smartbear.com/resources/webinars/building-api-standards/
* Will Your API Design Process Scale? https://swagger.io/blog/api-design/will-your-api-design-process-scale/
</FONT>
==Top-Down Approach vs. Bottom-Up Approach==
The top-down API design and development approach is also known as "schema-first" or "definition-driven" approach.
<font color=darkgray>TO PROCESS:
* https://howtodoinjava.com/swagger2/code-generation-for-rest-api/
* https://www.blazemeter.com/blog/five-reasons-you-should-use-openapi-swagger-for-your-apis
</font>


=API Development=
=API Development=
One of the artifacts of API development could be a client SDK. Tools like [[Swagger Codegen]] provide the means to generate SDK right from the API definition.
<FONT color=darkgray>TO PROCESS:
* How to Build an API from the Ground Up: https://swagger.io/resources/articles/how-to-build-an-api-from-the-ground-up/
* Definition-Driven API development https://swagger.io/resources/webinars/definition-driven-api-development-how-oas-swagger/
* Why You Should Create an API Definition: https://swagger.io/blog/api-development/why-you-should-create-an-api-definition/
</FONT>


=API Documentation=
=API Documentation=
Documentation can be auto-generated from an API definition, or can be generated from an existing API at runtime (see [[Swagger Inflector]], [[Swagger Inspector]]).
<FONT color=darkgray>TO PROCESS:
* https://www.infoq.com/presentations/doc-restful-api
* Best Practices in API Documentation https://swagger.io/resources/articles/best-practices-in-api-documentation/
* Documenting Your Existing APIs: API Documentation Made Easy with OpenAPI & Swagger https://swagger.io/resources/articles/documenting-apis-with-swagger/
* API Documentation with the OpenAPI Specification & Swagger Tools https://smartbear.com/resources/webinars/api-documentation-openapi-swagger/
</FONT>


=API Testing=
=API Testing=
<FONT color=darkgray>TO PROCESS:
* https://swagger.io/solutions/api-testing/
</FONT>


=API Mocking and Virtualization=
=API Mocking and Virtualization=
API development can become cumbersome as the number of dependencies on internal and external services grows. A technique to deal with that is to mock API dependencies, and interact with them before the actual service is built.
<FONT color=darkgray>TO PROCESS:
* https://swagger.io/solutions/mocking-and-virtualization/
</FONT>


=API Governance=
=API Governance=
<FONT color=darkgray>TO PROCESS:
* https://swagger.io/solutions/governance-and-standardization/
</FONT>


=API Monitoring=
=API Monitoring=
<FONT color=darkgray>TO PROCESS:
* https://swagger.io/solutions/api-monitoring/
</FONT>
=OpenAPI=
{{Internal|OpenAPI|OpenAPI}}
=API Handler=
The handler and the business logic should be separated, even though the primary purpose of the application is to handle API requests.
The API handler does to access the database directly, the access is intermediated by the business logic layer.
=API Types=
==HTTP==
==gRPC==

Latest revision as of 02:08, 11 May 2024

Internal

Overview

At its core, an AP*I is a contract that specifies sending requests and receiving responses. The API is all about the data.

A REST API is made up of resources and methods.

REST and Hypermedia Concepts

Resource, Method, Request, Response

API

REST API

Websocket API

OpenAPI Operation Declaration and Implementation Examples

OpenAPI Examples

API Design

API Design or API Modeling.

API Contract.

TO PROCESS:

Top-Down Approach vs. Bottom-Up Approach

The top-down API design and development approach is also known as "schema-first" or "definition-driven" approach.

TO PROCESS:

API Development

One of the artifacts of API development could be a client SDK. Tools like Swagger Codegen provide the means to generate SDK right from the API definition.

TO PROCESS:

API Documentation

Documentation can be auto-generated from an API definition, or can be generated from an existing API at runtime (see Swagger Inflector, Swagger Inspector).

TO PROCESS:

API Testing

TO PROCESS:

API Mocking and Virtualization

API development can become cumbersome as the number of dependencies on internal and external services grows. A technique to deal with that is to mock API dependencies, and interact with them before the actual service is built.

TO PROCESS:

API Governance

TO PROCESS:

API Monitoring

TO PROCESS:

OpenAPI

OpenAPI

API Handler

The handler and the business logic should be separated, even though the primary purpose of the application is to handle API requests.

The API handler does to access the database directly, the access is intermediated by the business logic layer.

API Types

HTTP

gRPC