Re:How to Design Better APIs
by CrimsonRain on Friday March 11, 2022 @11:47PM
(#30649066)
b -> What happens if the "list of IDs" is 10k or 100k or 1M+?
[ Parent
| on HN ]
There's typically business-logic ways to require a range to be specified, and then you specify a maximum range. For example, if the resource in question is audit events, you require the user to specify a time range, up to a maximum of a day, or seven days, or whatever performance / budget constraints allow for.
Re:How to Design Better APIs
by CrimsonRain on Saturday March 12, 2022 @08:42AM
(#30651268)
So if I specify a range and something changes between in that range while I'm interacting with those, sounds like same problem is back? Just same issue; different package :)
If I do a search, a paginated search result can have an ID so I can paginate between the data without a new data messing up my pagination.
But for normal entities, simple pagination is (mostly) more than enough.
The solution you are describing is overkill and almost no benefit at all.