'REST Best Practices - List of simplified entities to populate dropdown
We have a REST API where we have the following rule: when returning a list of entities for a "list entity" use case, we do "GET /entities", returning the required fields.
However, in many cases we need a list of a simplified version of an entity (id and description), for instance to fill a dropdown menu. Is there a "best practice" in this scenario?
Should I use the same "GET /entities" with parameters or should I consider this simplified list as a new resource? In that case (new resource), this resource would be in the same level as the original list (GET /entities-for-dropdown) or could it be a child (GET /entities/dropdown)? Is there another (better) solution?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
