JS resources not getting deleted from Management API Calls

Hi

We have deleted all the API Proxies from an organization in APIGEE Gateway.

API Proxies contained some policies which have the reference of JS reesources.

But after deletion of API Proxies, JS resources not getting deleted from Management API Calls.

Getting below error, here JS-SetTenantId is the name of the policy which was present in API Proxy and that has the reference of setTenantId js resource which we are trying to delete using

http://docs.apigee.com/management/apis/delete/organizations/%7Borg_name%7D/resourcefiles/%7Bresource...

{
    "code": "events.EventHandlingFailure",
    "message": "Resource is in use by [JS-SetTenantId]",
    "contexts": []
}

We are having 9 Node Cluster with 4 RMP.

1 1 121
1 REPLY 1

Hi @GAURAV

It seems that there remains a policy somewhere in your organization that references the setTenantId.js resource. Are you certain that you have found all the policies?

The policies can exist within sharedflows or proxies. You said that you deleted all the proxies. Is it possible you have a sharedflow that references the policy?

Here is a tool that allows you to exhaustively search for policies within both sharedflows and proxies. Example invocation:

node ./findPoliciesByName.js -o myorg -n -R JS-SetTenantId

Maybe try this and it might find the reference.