URI Design Rules

Prefer stable, meaningful nouns.

Good examples:

  • GET /users
  • GET /users/42
  • GET /users/42/orders
  • POST /orders

Avoid RPC-style paths such as GET /getUsers, POST /createUser, or POST /deleteUser when standard HTTP semantics can express the operation.

Use plural collection nouns consistently. Path parameters normally identify a specific resource. Query parameters are better for filtering, sorting, pagination, projection, and optional retrieval behavior.

Do not put sensitive information such as passwords, access tokens, or secrets into URLs because URLs can be logged, cached, stored in browser history, or transmitted through intermediary systems.

URI Examples
Collection: /users
Represents a collection of user resources.
Member: /users/42
Identifies one user.
Nested relationship: /users/42/orders
Represents orders associated with user 42.
Filtering: /users?role=admin
Query parameters modify collection retrieval.