YAML
API Types - YAML
API Types is a classification of web API architectural styles and protocols widely used in modern software development, including REST, GraphQL, SOAP, gRPC, and WebSocket. Each type corresponds to different communication patterns, data formats, and use cases, forming the foundation for data exchange between systems. The choice of appropriate API type significantly impacts system performance, scalability, and development efficiency.
API
REST
GraphQL
SOAP
gRPC
WebSocket
Web Services
Communication Protocol
- code: "01"
slug: "rest"
name: "REST"
description: "A resource-oriented architectural style using the HTTP protocol."
fullName: "Representational State Transfer"
protocol: "HTTP/1.1, HTTP/2"
dataFormat:
- "JSON"
- "XML"
- "YAML"
- "Plain Text"
communicationPattern: "Request-Response"
state: "Stateless"
caching: "Excellent (HTTP-level)"
useCases:
- "Web applications"
- "Mobile apps"
- "Microservices"
- "Public APIs"
- code: "02"
slug: "graphql"
name: "GraphQL"
description: "An API that enables flexible data fetching through client-driven query language."
fullName: "Graph Query Language"
protocol: "HTTP/1.1, HTTP/2"
dataFormat:
- "JSON"
communicationPattern: "Query-Response"
state: "Stateless"
caching: "Complex (requires custom implementation)"
useCases:
- "Mobile apps"
- "SPAs"
- "Complex data relationships"
- "API aggregation"
- code: "03"
slug: "soap"
name: "SOAP"
description: "An XML-based messaging protocol API characterized by strict standardization."
fullName: "Simple Object Access Protocol"
protocol: "HTTP, HTTPS, SMTP, TCP"
dataFormat:
- "XML"
communicationPattern: "Request-Response, One-way"
state: "Stateful or Stateless"
caching: "No built-in caching"
useCases:
- "Financial services"
- "Healthcare systems"
- "Enterprise integration"
- "Legacy systems"
- code: "04"
slug: "grpc"
name: "gRPC"
description: "A high-performance RPC framework developed by Google using Protocol Buffers."
fullName: "Google Remote Procedure Call"
protocol: "HTTP/2"
dataFormat:
- "Protocol Buffers (binary)"
communicationPattern: "Unary, Server Streaming, Client Streaming, Bidirectional Streaming"
state: "Connection-based"
caching: "No built-in HTTP caching"
useCases:
- "Microservices"
- "Internal service-to-service communication"
- "Real-time systems"
- "IoT"
- code: "05"
slug: "websocket"
name: "WebSocket"
description: "A protocol enabling full-duplex communication, suitable for real-time data exchange."
fullName: "WebSocket Protocol"
protocol: "WS, WSS (WebSocket over TLS)"
dataFormat:
- "JSON"
- "Binary"
- "Text"
communicationPattern: "Full-duplex, Event-driven"
state: "Stateful (persistent connection)"
caching: "Requires custom logic"
useCases:
- "Chat applications"
- "Live dashboards"
- "Online games"
- "Collaborative editing tools"
- code: "06"
slug: "webhook"
name: "Webhook"
description: "An event-driven HTTP callback mechanism that enables push notifications from server to client."
fullName: "Web Callback"
protocol: "HTTP, HTTPS"
dataFormat:
- "JSON"
- "XML"
- "Form Data"
communicationPattern: "Event-driven, Push"
state: "Stateless"
caching: "Not applicable"
useCases:
- "Payment notifications"
- "CI/CD integration"
- "Notification systems"
- "System integration"