You can use the ResourceAdminService to perform that task.
i) Open the carbon.xml and enable the WSDL view for admin services.
https://localhost:9443/services/ResourceAdminService?wsdl
Select the "addRolePermission" request.
pathToAuthorize - The registry path that need to set permissions.
roleToAuthorize - Role name that need to authorize
actionToAuthorize - This can be following values
2 - READ
3 - WRITE
4 - DELETE
5 - AUTHORIZE
permissionType - This can be following valies
1 - Allowed
2 - Denied
i) Open the carbon.xml and enable the WSDL view for admin services.
<HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>ii) Use the following WSDL endpoint to generate the SoapUI project.
https://localhost:9443/services/ResourceAdminService?wsdl
Select the "addRolePermission" request.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://services.resource.registry.carbon.wso2.org">
<soap:Header/>
<soap:Body>
<ser:addRolePermission>
<!--Optional:-->
<ser:pathToAuthorize>?</ser:pathToAuthorize>
<!--Optional:-->
<ser:roleToAuthorize>?</ser:roleToAuthorize>
<!--Optional:-->
<ser:actionToAuthorize>?</ser:actionToAuthorize>
<!--Optional:-->
<ser:permissionType>?</ser:permissionType>
</ser:addRolePermission>
</soap:Body>
</soap:Envelope>
pathToAuthorize - The registry path that need to set permissions.
roleToAuthorize - Role name that need to authorize
actionToAuthorize - This can be following values
2 - READ
3 - WRITE
4 - DELETE
5 - AUTHORIZE
permissionType - This can be following valies
1 - Allowed
2 - Denied