How it works
A client sends a request (usually HTTP) specifying a resource and method. The server processes it and returns a response — most commonly JSON or XML. Internal implementation details stay hidden behind the contract.
API types
- REST — most common, uses HTTP methods (GET, POST, PUT, DELETE)
- GraphQL — client specifies exactly which fields it needs
- gRPC — binary protocol for microservices, very fast
- WebSocket — bidirectional real-time connection