You can add a user to a project role as mentioned at https://docs.atlassian.com/jira/REST/cloud/#api/2/project/{projectIdOrKey}/role-addActorUsers.
You cannot do that in Confluence yet. You can create an add-on for Confluence to expose new REST end points and use it but that will require some add-on development effort.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.