Add Multiple Resource Permissions for Resource has no effect

Using the API, I created a role. It is blank - no permissions at all. I then built a resourcePermission object with two paths: the org, / receiving a "get", and the /application receiving both "get" and "put". When I POSTed the call, I received a 201 in return, but no permissions were added.

I can add a permission to an individual resource with no issue, but the call for multiple resources doesn't appear to work.

URL: https://api.enterprise.apigee.com/v1/organizations/{_organization.Name}/userroles/{_role}/resourcepe...

json body:

{"resourcePermission":[{"path":"/","permissions":["get"]},{"path":"/applications","permissions":["get","put"]}]}

I tried making the second path to be /applications/ and that didn't help. I am Organization Admin, so I should be able to do this. Any help would be most appreciated.

0 2 167
2 REPLIES 2

Not applicable

the url you have shared is having role/resorcepermisiions but it should be permissions.

https://apidocs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/userroles/%7Brole_name%...

curl -u email:password https://api.enterprise.apigee.com/v1/o/{org_name}/userroles/development/permissions -H "Content-type:application/json" -X POST -d'{"path" : "/applications","permissions" : [ "put", "get" ]}'

Hello Priyadarshi, Thanks for the response. The curl that you provided is for the "Add Permissions for a Resource to a Role", which is found at this url. The command that I am trying to use is "Add Multiple Resource Permissions for a Resource", which is found at this link. In the end, I can add them individually, so I'm working around the limitation right now.