REST API (Representational State Transfer)
A REST API is a web interface that exposes data as resources identified by URLs and manipulated with standard HTTP methods such as GET, POST, PUT, and DELETE. Each request is stateless and responses are usually JSON, making REST the most common style for public and internal APIs.
Technical Architecture & Deep-Dive
REST (Representational State Transfer) was defined by Roy Fielding as a set of constraints for scalable networked systems: client-server separation, statelessness, cacheability, and a uniform interface. In practice, a REST API maps nouns like `/customers/42` to resources and uses HTTP verbs for actions.
REST is simple and cache-friendly, but generic endpoints return fixed response shapes. Mobile and web clients often receive far more fields than they render, or must call several endpoints to build one screen. Edge BFF layers solve this by aggregating and slimming REST responses before they reach the client.
Key Architectural Benefits
Implement REST API (Representational State Transfer) at the Edge
Deploy lightweight API aggregation, edge caching, and secret injection in minutes without Docker containers or complex servers.
Frequently Asked Questions
Q:What is the difference between REST and GraphQL?
REST exposes fixed resource endpoints with predefined response shapes. GraphQL exposes one endpoint where clients specify exactly which fields they need. An edge projection layer can give REST APIs GraphQL-like field selection without migrating backends.
Related Architecture Concepts
GraphQL is a query language and runtime for APIs in which clients send a query describing exactly the fields they need, and the server returns JSON matching that shape. A strongly typed schema defines available data, and a single endpoint replaces many REST routes.
Overfetching occurs when an API response delivers more data than the client application requires to render the current screen or view. For example, downloading an entire 50-field user profile object simply to display an avatar and first name wastes bandwidth, memory, and parsing time.
JSON Projection is the declarative extraction, transformation, and renaming of specific nested properties from upstream API payloads into a clean target schema. Executed at the edge without unsafe eval() functions, it delivers lightweight, structured JSON tailored to client UI components.
An API Gateway is a single entry point that sits between client applications and backend services. It routes requests, enforces authentication and rate limits, transforms payloads, and aggregates responses so clients talk to one stable endpoint instead of many internal APIs.
Ready-to-Use Edge Recipes
Answer "how to filter unnecessary fields from rest api response" by projecting REST API data server-side: upstream https://jsonplaceholder.typicode.com/users/{{query.userId}}, client sees only mapped keys.
Fix "how to create mobile friendly api from legacy rest service" by pointing Mobile App (iOS & Android) at RealComposer. Vault secrets authenticate https://jsonplaceholder.typicode.com/users/{{query.userId}}; client tokens gate your public URL.
You do not need to spin up an Express, FastAPI, or Docker microservice just to stitch REST APIs together. RealComposer fetches multiple upstream endpoints concurrently at the edge, injects private credentials, and combines the responses into a single JSON schema with sub-10ms response times.