API Design

API (Application Programming Interface) is a set of rules that allows different services to talk with each other.

Here are the 20 concepts to get started with API Design:

  1. Endpoint: A URL that represents a ‘resource’, such as a user or an order. Clients send requests to endpoints to read or modify data.
  2. HTTP Methods: Actions like GET, POST, PUT, PATCH, and DELETE. It defines what operation is performed on a resource.
  3. Request-Response: Communication pattern where a client sends a request… and server returns a response containing headers, a body, and a status code.
  4. Status Codes: Numeric codes (200, 404, 500) that tell the client if a request succeeded, failed, or needs extra action. Think of it as server “response indicator”.
  5. Authentication: Verifying the IDENTITY of a user, usually using credentials like passwords, API keys, or tokens.
  6. Authorization: Decide what an authenticated user can DO. For example, reading data or performing admin actions.
  7. Access Tokens: Short-lived credentials issued after authentication that clients include in requests to “prove” they have access rights.
  8. OAuth 2.0: An authorization framework that lets users grant limited access to their data ‘without’ sharing their passwords. Imagine delegated user access.
  9. Rate Limiting: A technique to restrict how many API requests a client can make in a given time window to PROTECT the system.
  10. Throttling: A technique that SLOWS down or temporarily blocks requests when usage exceeds allowed limits, instead of entirely rejecting them.
  11. Pagination: Split large datasets into smaller chunks to improve performance + reduce response size.
  12. Caching: Storing frequently accessed data so future requests can be served FASTER without recomputing or refetching it.
  13. Idempotency: A property where making the same request repeatedly yields the same result, essential for retries & reliability.
  14. Webhooks: A mechanism where the server “automatically” sends data to another system when an event happens,,, instead of waiting for polling.
  15. API Versioning: A strategy for managing ‘changes to an API’ over time without breaking existing clients.
  16. OpenAPI: A standard specification for describing APIs in a machine-readable format, often used to generate documentation and client code.
  17. REST vs GraphQL: Different API styles… REST exposes endpoints,,, while GraphQL allows clients to request exact data they need.
  18. API Gateway: A “single entry point” to route requests to various backend services. Plus, it handles concerns like authentication & rate limiting.
  19. Microservices: An architectural approach where an application is built as a set of small, independent services that communicate via APIs.
  20. Error Handling: A consistent way to return clear error messages and status codes so clients can understand & react to failures.