What is a REST API?
What is a REST API?
What is a REST API?
A REST (Representational State Transfer) API exposes data as resources identified by URLs, accessed with standard HTTP verbs: GET to read, POST to create, PUT/PATCH to update, and DELETE to remove. Responses are usually JSON.
Core Principles
- Stateless - each request contains everything the server needs; no server-side session.
- Resource-oriented - URLs name resources (/customers/42), not actions.
- HTTP methods - verbs convey intent.
- Status codes - 200, 201, 400, 404, 429, 500 describe the outcome.
Why REST?
REST is simple, widely understood, and works over plain HTTP. Most public APIs (Stripe, Twilio, SendGrid) are RESTful, making it the default choice for new integrations.