What is an API?
Think of an API as a contract between applications. A provider exposes specific capabilities (e.g., “create a ticket,” “fetch a user”) and a consumer calls those capabilities using the provider’s rules. APIs power everything from mobile apps and SaaS integrations to internal microservices - enabling modular, scalable systems. Common API styles include REST (resource-oriented over HTTP), GraphQL (client-shaped queries), gRPC (binary RPC over HTTP/2), and Webhooks (provider-initiated callbacks). APIs define endpoints, methods, and data formats so one application can request information or trigger actions in another safely and consistently.
How APIs Work
- Request - A client sends a call to an endpoint (URL or method) with headers and, optionally, a body.
- Authentication - The server verifies identity (API keys, OAuth, JWT, mTLS).
- Processing - Backend logic executes (validations, business rules, database operations).
- Response - The server returns a status code (e.g., 200, 201, 400, 401, 404) and data (usually JSON).
- Observability - Logs, metrics, and traces capture performance and errors.