REST API - How to get metadata for paging

Hi @user12 and welcome to the Atlassian Developer Community. It’s nice to have you here!

The number of users returned is based on the maxResults query parameter which is set to 50 by default. If the number of returned items are less than the maxResults used in a request, then the last page has been reached. If not, then the startAt query parameter can be used to retrieve the next set of users.

There is a thread here which also provides some ideas about how to go about this and some history:

I could also find this feature request for adding pagination:
https://jira.atlassian.com/browse/JRACLOUD-77122

Thanks,
Caterina