Skip to content
IT glossary
BackendUpdated December 3, 2026

REST

REST is a way to design APIs around resources, such as orders or invoices. A client uses a resource’s address to interact with it and exchanges representations of it, such as JSON.

Also known as: REST API, RESTful

Think in resources, not remote functions

In a REST API, the starting question is “What does the client need to work with?” rather than “Which server function should it call?” In a library app, a book, a collection of loans, and an individual loan can all be resources. Each can have a URI. What crosses the network is a representation of the resource, not a database row or a live object. A loan could be represented as JSON for an app or as HTML for a browser.

What makes an interface RESTful?

REST stands for Representational State Transfer. It is an architectural style, not a protocol, and it defines constraints beyond naming routes:

  • Client–server separation: The client handles the user interaction; the server provides access to resources. Both sides can change internally without breaking the interface.
  • Stateless requests: Each request carries the information needed to understand it. The server can remember that a book is on loan, but it should not need to remember which loan the client selected in a previous request to know what the current request means.
  • A uniform interface: Clients identify resources, manipulate them through representations, and interpret self-descriptive messages. In HTTP, a media type helps tell the client how to read the body. Hypermedia controls such as links and forms tell it which transitions are available without requiring it to hard-code every destination URI.
  • Cacheability and layers: Responses indicate whether they can be reused. Clients interact with the same interface whether a response comes from the origin server or via an intermediary such as a proxy cache.

REST also defines an optional constraint called code on demand, where the server can extend the client by sending executable code.

Example: creating and reading a loan

POST /loans
Content-Type: application/json

{"bookId":17}

If the server creates a loan, it can return 201 Created with Location: /loans/81. The client can then use GET /loans/81 to retrieve it. A representation might include a renewal control when renewal is available. The client follows that control rather than constructing a renewal URL from the loan ID. Resource-oriented HTTP APIs are common in mobile backends and partner integrations, though many omit hypermedia and still use the label “REST API.”

What interviewers look for

A common prompt is to design a small API and explain what happens when a request is retried. Suppose a connection drops before the client sees the response to POST /loans. The server may already have created the loan, so retrying blindly can create a duplicate. An API can define an idempotency key to make retries of that operation safe from duplicate creation. By contrast, PUT and DELETE are idempotent by HTTP semantics: repeating an identical request has the same intended effect, not necessarily the same response. Another common distinction is that GET is safe: the client is not asking for a state change, even though the server may still log the request.