Fetch usergroups for Jira and Confluence

Which REST APIs can I use to fetch this information?

  1. Get a list of all usergroups of Jira that have access to Jira and product role is “user”
  2. Get a list of all usergroups of Confluence that have access to Confluence and product role is “user”

You can use applicationrole API to fetch groups that have access to Jira. And for confluence I’ve been looking for a similar API since quite some time now , without any success