List of Target and Proxy Urls for all API's

Hi,

Is there a way to collect a report consisting of Apigee proxy urls mapped to their respective target urls for all the proxies present in a particular environment.

For example the list should be something like below:

1.  Proxy1      https://{org-name}-{env}.apigee.net/{basepath}    https://{target-url}
2. Proxy2      https://{org-name}-{env}.apigee.net/{basepath}    https://{target-url}

and so on


Thanks,
Shameem.

Solved Solved
0 2 288
1 ACCEPTED SOLUTION

If I were doing this I would write a script that uses the Apigee API.  If you are familiar with Python, use that. If you are familiar with JavaScript, use the nodejs wrapper. If you are familiar with Powershell, use that. 

Basically the logic would be

  • query the list of all API proxies
  • for each proxy
    • query its basepath, and emit that.
    • query any targetendpoints it has.  For each of those
      • determine if it is an HTTPTargetEndpoint. If so, emit that URL. 
      • if it is not HTTPTargetEndpoint, then... the target URL is not known. 

It's basically a nested for loop, with some conditional logic. 

If you're using nodejs to implement this, then this script might be a good starting point. It lists proxies and their basepaths. You'd need to extend it to also list target paths, to accomplish what you want.

View solution in original post

2 REPLIES 2

If I were doing this I would write a script that uses the Apigee API.  If you are familiar with Python, use that. If you are familiar with JavaScript, use the nodejs wrapper. If you are familiar with Powershell, use that. 

Basically the logic would be

  • query the list of all API proxies
  • for each proxy
    • query its basepath, and emit that.
    • query any targetendpoints it has.  For each of those
      • determine if it is an HTTPTargetEndpoint. If so, emit that URL. 
      • if it is not HTTPTargetEndpoint, then... the target URL is not known. 

It's basically a nested for loop, with some conditional logic. 

If you're using nodejs to implement this, then this script might be a good starting point. It lists proxies and their basepaths. You'd need to extend it to also list target paths, to accomplish what you want.

Thanks 🙂