REST API
Definition
API style using standard HTTP methods (GET, POST, PUT, DELETE) and stateless requests — the dominant pattern for web service integration.
Use Cases
- Stripe: Online payments for web and mobile apps — Stripe exposes RESTful endpoints (for example, creating charges, customers, and payment intents) over HTTPS using standard HTTP methods and JSON. Developers authenticate with API keys and integrate via client libraries that call the underlying REST API. (Businesses can add payments quickly without building their own payment processing stack, accelerating time-to-market and enabling global online transactions.)
- GitHub: Automating repository and CI/CD workflows — GitHub provides a REST API to manage repos, issues, pull requests, and actions. Teams use HTTP requests with tokens (OAuth or fine-grained personal access tokens) to integrate internal tools, bots, and dashboards with GitHub data and operations. (Engineering teams automate repetitive tasks (issue triage, release notes, access management), improving developer productivity and operational consistency.)
- Twilio: Sending SMS and making voice calls from applications — Twilio offers REST APIs where applications send HTTPS requests to create messages or initiate calls. Requests include account credentials and parameters; responses return JSON with message/call status and identifiers for tracking. (Companies can add communications features without telecom infrastructure, enabling faster customer notifications and support workflows.)
Provider Equivalents
- AWS: Amazon API Gateway
- Azure: Azure API Management
- GCP: Google Cloud API Gateway
- OCI: Oracle API Gateway
Frequently Asked Questions
- What's the difference between a REST API and GraphQL?
- REST typically exposes multiple endpoints (URLs) for different resources (like /users or /orders) and returns a fixed shape of data per endpoint. GraphQL usually exposes a single endpoint where the client asks for exactly the fields it needs. REST can be simpler to cache and reason about with HTTP semantics, while GraphQL can reduce over-fetching/under-fetching when clients need flexible queries.
- When should I use a REST API?
- Use a REST API when you need a simple, widely supported way to expose data or actions over HTTP—especially for CRUD-style operations (create, read, update, delete) on resources like users, products, or tickets. It’s a good fit for public APIs, mobile backends, microservice-to-microservice communication, and integrations where standard HTTP tooling, caching, and observability are helpful.
- How much does a REST API cost?
- REST itself is a design approach and has no direct cost. Costs come from hosting and operating the API: compute (servers, containers, or serverless), API gateway/API management (requests, data transfer, features like auth and rate limiting), databases, logging/monitoring, and outbound bandwidth. Pricing depends mainly on request volume, payload sizes, latency/availability requirements, and security features (WAF, DDoS protection, private networking).
Category: software
Difficulty: intermediate
Related Terms
See Also