Repaso
EspaƱol
Backend & APIsFoundationsAPI-50

Which sentence best describes REST?

Options

  1. A database engine that is designed for storing web data
  2. A style for web APIs: resources with URLs, acted on by HTTP methods (Correct option)
  3. A security protocol that is used for logins and sessions
  4. A JavaScript framework that is used for building frontends

Answer

A style for designing web APIs: things are resources with URLs, and the standard HTTP methods (GET, POST, PUT, DELETE) act on them

Why

REST (Representational State Transfer) is an architectural style described by Roy Fielding in his doctoral dissertation (2000). It is not a library or a protocol.

In practice: GET /users/42 reads user 42, POST /users creates one, DELETE /users/42 removes it.

Its constraints include client-server, stateless requests, cacheable responses and a uniform interface.

Remember

REST = resources + URLs + HTTP methods.

Key terms

Practice this question in Repaso