7 ms·
In typical business applications you often have two endpoints: One to fetch a single resource and one to fetch all resources of that type. Why not merge them a
by akullpp 4y ago
In typical business applications you often have two endpoints: One to fetch a single resource and one to fetch all resources of that type.
Why not merge them and work with lists, I think a lot people would intuitively understand the following:
GET /users?ids=1
{ "users": [] }
GET /users?ids=1,2,3,4
{ "users": [ { "id": 3 } ] }
Transport the ids in any way you like, that's not my point.