NEW
Also known as: Representational State Transfer, RESTful API
An HTTP-based architectural style for stateless, resource-oriented APIs using standardized methods and representations.
DESCRIPTION
REST is an architectural style for building web APIs around resources identified by URIs and manipulated through stateless HTTP methods. It emphasizes a uniform interface, cacheability, and layered systems. Common practices include using JSON payloads, standard HTTP status codes, and hypermedia for discoverability. REST APIs are widely used for microservices and public web services due to simplicity and tooling support. OpenAPI and JSON Schema often complement REST for documentation and validation.
ALTERNATIVE DEFINITIONS
MDN Web Docs
Representational state transfer (REST) is an architectural style for designing APIs.
Highlights REST as an architectural style focused on API design.
AWS
A REST API is an API that conforms to the principles of the REST architectural style.
Emphasizes conformance to REST principles for APIs.
Roy Fielding
Representational State Transfer (REST) is an architectural style that uses a small set of simple interfaces to communicate between clients and services.
Authoritative origin emphasizing constraints and uniform interfaces.
RELATED TERMS
Hypertext Transfer Protocol OpenAPI Specification JSON OAuth 2.0 API Gateway Hypermedia as the Engine of Application State JSON Schema Rate Limiting
COMPETING TERMS
RELATIONS
- Broader: API
KNOWLEDGE AREAS
Data Integration & Interoperability Software Engineering Platform & Tooling
TARGET AUDIENCE
Software Developer DevOps Engineer Data Engineer Data Architect Cloud Architect Enterprise Architect
EXTERNAL SOURCES
- Wikipedia - Representational state transfer
- Microsoft Learn - Azure guidance on REST API design
- RESTfulAPI.net - Practical REST concepts and patterns
- IETF - HTTP/1.1 semantics for REST APIs
- OpenAPI Initiative - Industry specification for HTTP APIs
TOP QUESTIONS
What makes a REST API different from other API styles?
A REST API follows resource-oriented, stateless interactions over HTTP with standardized methods and representations. It emphasizes a uniform interface and cacheability.
Category: Requirements
Why is REST API still relevant today?
REST remains prevalent due to simplicity, wide tooling support, and web-native compatibility. It fits many microservices and public APIs without complex client libraries.
Category: Relevancy
What are common mistakes when designing a REST API?
Misusing HTTP methods, inconsistent status codes, poor error formats, and ignoring pagination and rate limits are common pitfalls that reduce usability and reliability.
Category: Mistakes
How should a REST API be documented?
Use OpenAPI to describe endpoints, parameters, and schemas. Auto-generate interactive docs, include examples, and version changes clearly to support consumers.
Category: Best practices
What is a hot topic around REST API today?
API contracts, schema validation, zero-downtime versioning, and security patterns like OAuth 2.0 and mTLS are prominent discussions for REST APIs.
Category: Topic
What risks come with exposing a REST API publicly?
Improper authentication, injection attacks, and data leakage are major risks. Rate limiting, input validation, and robust authorization are critical controls.
Category: Risk
What are notable alternatives to a REST API?
GraphQL enables precise queries and gRPC supports high-performance binary RPCs. Choosing depends on client needs, performance, and ecosystem.
Category: Alternatives
How do you version a REST API safely?
Prefer backward-compatible changes, semantic versioning, and additive evolutions. Consider header-based or URI versioning and communicate deprecations clearly.
Category: Best practices
How is HATEOAS applied in a REST API?
HATEOAS provides hyperlinks in responses to guide clients. It enhances discoverability and decouples client logic from hardcoded routes.
Category: Example