Can I list all proxies using a specific virtual host? Or retrieve what virtual host a proxy is using?

We are writing a CLI tool for the Apigee Management API and I am trying to have a function such as

apigee proxy list --virtualhost default

So that I can list all proxies (we have hundreds currently) still have this attatched.

This will also help when updating certificates so that we can inform the appropriate teams that their proxy certificate may be affected.

Solved Solved
0 6 6,636
1 ACCEPTED SOLUTION

Yes, there is a "brute force" way to do this in Apigee Edge.

As an example, look here.

You can list proxies with a vhost that matches a particular regular expression.

To find proxies that use "default" vhost, you can use this:

node ./findVhosts.js -o $ORG -R "^default$"  --also_undeployed

This particular script looks only for the latest revision of the API Proxy. You could modify the script slightly so that it looks at all revisions, if you want that.

If you don't like nodejs you could write your own script.

View solution in original post

6 REPLIES 6

Not applicable

We don't have any such api which will give the proxies deployed.

There is a workaround. If you will try to delete using management api call, it will give the name of the proxies deployed to it.

Thank you. Whilst I see that that is an option, I dont feel it would be a super safe one to take for our use case.


Thanks for the suggestion tho.

Yes, there is a "brute force" way to do this in Apigee Edge.

As an example, look here.

You can list proxies with a vhost that matches a particular regular expression.

To find proxies that use "default" vhost, you can use this:

node ./findVhosts.js -o $ORG -R "^default$"  --also_undeployed

This particular script looks only for the latest revision of the API Proxy. You could modify the script slightly so that it looks at all revisions, if you want that.

If you don't like nodejs you could write your own script.

Thank you for that! We are building a tool in Golang for this so will have to work this into there, but knowing it is possible means its just a matter of doing it.

BTW, you can run that script with -v for verbose mode and it will tell you the verb + path it invokes to perform all the checks. That might help with your effort building the golang tool.

Oh fantastic idea. Thank you.