Describe the architecture of a RESTful web service by naming its resources and representations first, then the client–server boundary, the uniform interface, the constraint choices (statelessness, caching, layering, optional code-on-demand), and finally how it's deployed and secured. The order matters because every later decision inherits meaning from the earlier ones: you can't sensibly explain caching before you've said which responses are cacheable and under what conditions. A description built in that sequence gives reviewers, new teammates, and API consumers a single mental model instead of a pile of endpoints. The rest of this article turns that outline into a repeatable procedure, with the trade-offs that make the description honest rather than aspirational.
Start with purpose, scope, and the audience for your description
Before you write a single box on a diagram, fix what the description is for. Three audiences want different things from the same architecture: an API consumer needs resource semantics and error behavior; an implementing engineer needs component boundaries and data flow; an operations or security reviewer needs trust boundaries, deployment topology, and failure modes. Write one sentence of scope that names the system, its consumers, and what is deliberately out of scope.
State one or two architectural quality goals with numbers where you can. "Support 400 reads per second at p95 latency under 150 ms" is describable and checkable; "be scalable" is not. Also fix the reference date of the description and the API version it applies to, since REST API shapes drift and a description without a version ages into misinformation. Then list the external systems the service depends on and their failure expectations, because layering and statelessness claims only mean something relative to those dependencies.
A useful preliminary step is to inventory what already exists. If you're describing a greenfield design, say so and mark assumptions. If you're documenting a running service, describe what it does, not what REST textbooks say it should do—then list deviations as known gaps. Reviewers trust a description that admits a chatty endpoint far more than one that claims purity it can't demonstrate.
Name the resources, their identifiers, and their representations
REST architecture is organized around resources: named things—a customer, an invoice, a shipment, a search result set—that can be identified and manipulated. The single most clarifying move in any description is a resource model: a short list or small diagram of nouns, their hierarchy, and their identifiers. Keep identifiers stable and opaque in principle; explain your actual scheme (for example, /customers/{id}/invoices/{invoiceId}) and note that clients shouldn't parse identifiers for meaning.
Separate the resource from its representation. A resource is a conceptual thing; a representation is a concrete encoding—JSON with a particular media type, an HTML page, a CSV export, an image. Describe which media types the service produces and consumes, and whether clients negotiate them with Accept and Content-Type. This distinction explains a lot of otherwise confusing behavior: two requests to the same URL can legitimately return different bytes.
Be explicit about collection versus item resources and about sub-resources that exist only in context. Note which resources are read-only projections (a computed dashboard summary) and which accept writes. For each, record the methods supported and their safety and idempotency, because those properties are the contract clients build retries on. A compact inventory like the one below communicates more than paragraphs of prose:
| Resource | Path pattern | Methods | Safe / Idempotent | Notes |
|---|---|---|---|---|
| Customer | /customers/{id} | GET, PUT, PATCH, DELETE | GET safe; PUT/DELETE idempotent | Deletes are soft by default |
| Customer invoices | /customers/{id}/invoices | GET, POST | POST not idempotent | Paginated, filterable |
| Invoice | /invoices/{invoiceId} | GET, PATCH | PATCH not guaranteed idempotent | State-machine driven |
| Search | /search?q= | GET | Safe | Read-only projection |
If a resource models a business process rather than a stored record—an order that moves from placed to paid to shipped—say so. Describe the state machine and which transitions are exposed as operations, and how you represent them (state field changes versus explicit action sub-resources). This is where many "RESTful" descriptions quietly become remote procedure calls, and being upfront about it prevents arguments later.
Define the interface between clients and servers
The client–server constraint is the foundation: the client handles user interaction and presentation, the server handles data and business rules, and they evolve independently as long as the interface between them holds. Describe that interface concretely—base URL structure, versioning approach (URI path, media type, or header), authentication scheme at the boundary, content types, and error format.
Error representation deserves its own paragraph. Specify the status code families you use, the machine-readable error body shape (a code, a human message, correlation identifier, and field-level details where relevant), and which failures are retryable. Include how you signal validation errors versus authorization failures versus conflicts, since clients branch on those. A description that leaves error semantics implicit will produce brittle clients.
Also state what the interface deliberately hides: internal data stores, service decompositions, third-party providers. This is the abstraction boundary, and naming it is what lets you later change implementation without breaking consumers. If the service is one logical API backed by several internal components, say that the description's "server" is a logical role, not a single process.
Walk through the uniform interface as applied rules
The uniform interface is the constraint that distinguishes REST from "HTTP-shaped RPC," and it's best described as four applied rules rather than a doctrine. Cover each with your concrete choices:
First, identification of resources: every addressable thing has a URI, and those URIs are the contract. State whether URIs are permanent, how redirects preserve old identifiers, and whether any identifiers are temporary (presigned download links, for instance).
Second, manipulation through representations: clients act by exchanging representations, and the server decides how those map to underlying state. Explain how a client indicates desired changes—full replacement with PUT versus partial update with PATCH versus appending with POST—and what guarantees each provides. If you use PATCH, name the media type and describe the semantics without assuming every client will implement it.
Third, self-descriptive messages: each message carries enough metadata—method, media type, caching directives, status—for a recipient to process it without out-of-band knowledge. List the headers that matter in your API (conditional request headers, pagination links, rate-limit headers) and where clients can expect them.
Fourth, hypermedia as the engine of application state (HATEOAS): responses include links that tell clients what they can do next. Many production APIs implement this partially or not at all. Be honest: describe whether links are present, whether clients are expected to follow them, and what breaks if they don't. A service that publishes links but whose clients hard-code URLs is often described better as "hypermedia-aware but not hypermedia-driven."
Treat statelessness, caching, layering, and optional code-on-demand as decisions with costs
Statelessness is the constraint most often claimed and least often true at the edge. Describe where session state actually lives: in the request (tokens, cookies), in a shared store (a session cache, a database), or in neither. Then explain the consequence—stateless request handling makes horizontal scaling and failover simpler, but pushes state-management work onto clients and shared infrastructure. If you use server-side sessions behind a load balancer, say so plainly and note the affinity or shared-store requirement.
Caching is where statelessness pays off. Describe which responses are cacheable, by whom (browser, CDN, internal proxy), and for how long, expressed through Cache-Control, ETag, and Last-Modified. Explain conditional requests and what a 304 means for your API's data. Note the invalidation strategy and its latency; a cacheable collection that updates slowly is a different architectural animal from one that must be fresh on every read. Be explicit about what must never be cached—personal data, authorization-dependent responses—and how Vary handles representation differences.
Layering means a client can't tell whether it's talking to the origin server or an intermediary. Describe the deployed layers—load balancer, gateway, CDN, service mesh—and what each does and hides, including where authentication terminates, where rate limits apply, and which layer adds correlation identifiers. This is also where you explain cross-cutting concerns that don't belong in resource logic.
Code-on-demand is optional and often omitted. If your API ships executable content (scripts in a response, WebAssembly modules, client-side templates), describe the trust model and versioning; if not, state that the interface is data-only, which simplifies security review.
Draw the deployment view and trace one request end to end
An architecture description that stops at constraints is incomplete for anyone who has to run the thing. Add a deployment view: components, their processes or containers, the network boundaries between them, data stores with their replication roles, and external dependencies. Keep it coarse enough to read on one page; the point is to show trust boundaries and failure domains, not to mirror every microservice.
Then trace a single representative request through the system, step by step, naming what happens at each hop. A worked example makes abstract constraints concrete:
1: A mobile client sends GET /customers/8842/invoices?status=open with a bearer token and an If-None-Match header. 2: The CDN checks its cache, finds a stale entry with a matching entity tag from a prior request, and forwards to the gateway. 3: The gateway validates the token signature, applies the per-caller rate limit, attaches a correlation identifier, and routes to the invoice service. 4: The invoice service authenticates the caller's authorization to view customer 8842 (a check the CDN could not perform), queries the read replica, and assembles the representation. 5: The response includes pagination links, an ETag, and cache directives marked private because the data is caller-scoped. 6: A downstream catalog service is called only for the product names in the result; if it's slow, describe the fallback (cached names, partial response, or degraded flag).
Success check for this step: someone unfamiliar with the system can answer "where would this request fail, and what would the client see?" after reading the trace. If they can't, the trace is too abstract or the failure behavior is missing.
Document versioning, error behavior, and known failure modes
Versioning is an architectural decision, not a release-management afterthought. Describe the scheme, the compatibility promise it buys, and the deprecation process with timeframes. Note which changes are backward compatible (adding optional fields, new links) and which are not (removing fields, changing types or semantics), and how clients are warned. If two versions run simultaneously, describe the routing and how shared resources are represented across them.
Failure modes deserve the same specificity as happy paths. List the dependencies and what happens when each is unavailable—timeouts, circuit breakers, retries with backoff, and the user-visible effect. Explain idempotency keys if you support them, and where retrying is safe. State rate-limit behavior: limits, the headers that advertise them, and how a client should respond to 429. Describe pagination and its consistency guarantees under concurrent writes, since that's a frequent source of client bugs.
Record known deviations from REST constraints and their reasons. A long-polling endpoint, a batch operation that breaks per-resource caching, or a synchronous call that makes statelessness expensive are all legitimate choices, but they belong in the description with their consequences. This section is where an architecture document earns trust: it shows the design was chosen, not just asserted.
Keep the description accurate, reviewable, and maintainable
Two habits keep an architecture description from rotting. First, tie it to artifacts that change with the system: a version-controlled diagram, the OpenAPI or equivalent interface definition, and the resource table. Treat the prose as the explanation of those artifacts, and link claims to concrete configuration where possible—cache directives to the CDN policy, rate limits to gateway settings.
Second, give reviewers a checklist tied to the sections above: Are resources and representations distinguished? Are method safety and idempotency stated? Is statelessness described truthfully? Are cacheability and invalidation specified? Is the trust boundary clear? Is one request traced end to end? Is error behavior documented? Are deviations listed? A review that walks this list catches the usual gaps—an API labeled RESTful whose sessions live in memory, or a caching layer that quietly serves stale authorization-scoped data.
Finally, assign an owner and a review cadence, and update the description in the same change as breaking API modifications. Keep a short changelog at the top. The measure of a good architectural description is not elegance but whether a new engineer can predict what the service will do in an unlisted situation and be right most of the time.