Skip to content
StackDecode
System Design
10. API Design and ManagementAnimated

RESTful API Design

Resources, URLs and standard HTTP methods.

The idea

Nouns in URLs, verbs as methods, status codes for outcomes, and stateless requests.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

ClientServerGET /index.html
  • current message
  • earlier
  • failure or attack

A request names a method, a path and headers.

step:
1/4
from:
Client
to:
Server
1/4

Time runs downward. Solid arrows are requests, dashed arrows are replies.

Step by step

  1. 1Name resources (/orders/42)
  2. 2Use GET, POST, PUT, DELETE
  3. 3Return clear status codes
  4. 4Keep requests self-contained

Where it is used

Public and internal web APIs.

Watch out for

Verbs in URLs and returning 200 for errors.

Related