News for hackers. Stuff that matters.
Re:How to Design Better APIs by solatic on Saturday March 12, 2022 @01:39AM (#30649458)
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.

Re:How to Design Better APIs by akvadrako on Saturday March 12, 2022 @02:05AM (#30649551)
That's just like paging by day or whatever.