When resource has a unique identifier it is retrieved:
/building/{building_id}
But what if "event" resource is described using building_id and floor_id parameters. How to name RESTful endpoint that is meant to retrieve present events?
To be precise, "event" resource has a unique identifier (id). Combination of building_id, floor_id ought to return present event in a particular location.
Is it? I recommend this:
If
returns one event and
returns all events, then
returns the list of (possibly only one) event(s) at the combination of
building_idandfloor_id.This looks like the often used filter-or-search-a-collection-resource-pattern.