Pagination in REST architecture

Viewed 394

Suppose we have an endpoint that return a list of users, list can be paginated

/users?offset=20&limit=10

What to return when total count of users is less than offset? An empty list, an error or ...?

Should we also return total count of users in response? Or this should be another endpoint?

1 Answers
Related