Backend API - list all members

Is there a backend API function that will return a list of all members? If not, what’s the best way to do this from the backend?

Query the database PrivateMembersData, use Wix Data database

Thanks