Is there any REST API to fetch all the users in a instance along with their groups

Iam trying fetching all the users along with their groups , In the documentation there is get users , or bulk get users ,end point but for that account id’s are required , and iam trying to fetch for around 1000 users and making such amount of call’s will slow the application.