Retrieve list of users

I know there is an API to get a user/group by its name and Id. As an admin if i want to list out all the users/groups? Is there an API for it? (Similar to “net user /domain” command in windows that lists all users in a domain and “net group /domain” lists all the groups in a domain)
What I am looking for is given a user, it belongs to which group and vice-versa.

Thanks.

Is there an API to do this task? I am looking for similar requirement.

Thanks

@Shirisha

We currently do not have one for all users, we have an API to get details for a particular user

Thanks
Bali