Hacker News new | ask | show | jobs
by akullpp 1434 days 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.