Management API to get role associated to an API Proxy

In Edge UI, I am able to see the role(s) associated to an API Proxy but I am not able to get it as part of below management API call:

https://apidocs.apigee.com/management/apis/get/organizations/%7Borg_name%7D/apis

Is there any other call to get the roles associated to an API Proxy?

0 4 205
4 REPLIES 4

In Edge UI, I am able to see the role(s) associated to an API Proxy

I'm not clear.

Can you show a screenshot?

@Dino-at-Google Pls refer the attached screenshots from Edge UI. I am trying to get the role details as part of management API call. Pls help?

eui-proxy-view.png

eui-proxy-role-view.png

Unfortunately I'm still unclear.

I don't recognize those screenshots. You've got partial shots there, and I cannot determine where they originate.

It's possible they are from the old UI. I have been using the new UI for about 2 years now, and don't recall having seen shots like that in the new UI.

I can't really help you without knowing where the screenshots come from.

In general, the RBAC permissions model in Apigee Edge works like this:

users belong to roles

roles have a set of permissions on resources.

Resources are things like "keyvaluemaps", "reports" or "apis".

Given a proxy name, there is no way to determine which roles have which permissions on that apiproxy, without searching through the permissions for all roles.

To get permissions for a role,

GET $mgmtserver/v1/o/ORGNAME/userroles/ROLENAME/permissions

The result of that is a set of permissions. Each permission looks like this:

  {
    "organization" : "ORGNAME",
    "path" : "/RESOURCEPATH",
    "permissions" : [ "get", "put", "delete" ]
  },

Parse the list of permnissions, to find any entries that have

"path" : "/applications/APIPROXYNAME",
 

If you find that, then this ROLE has the given permissions on this api proxy. Repeat for all available roles.