A resource is a named conceptual entity that an API stores, exposes, or lets clients manipulate. Resource-oriented design standardizes the things an API manages and applies familiar actions across them, reducing the need to memorize many subtly different methods. section 1.3 section 1.5
Use resources deliberately rather than turning every data type into an independently managed object:
- Pair resources with standard operations such as create, get, list, update, and delete when those operations make sense. section 1.3
- Keep tightly coupled concepts inline when clients do not need to address them independently. An image annotation can contain a bounding box and notes without making each one a full resource. section 4.3.1
- Treat collections and individual resources differently: list or create against a collection, and get, update, or delete an individual resource. section 9.3.2
Flight reservations as a resource
Instead of exposing unrelated methods such as ScheduleFlight(), ShowAllBookings(), CancelReservation(), and RescheduleFlight(), model FlightReservation as a resource and apply consistent operations: CreateFlightReservation(), GetFlightReservation(), ListFlightReservations(), DeleteFlightReservation(), and UpdateFlightReservation(). section 1.3


