Change the URL in Service Call Out Policy for API Proxies

Hi

What's the easiest way to change the URL in Service Callout Policy for all 600 API Proxies at one go ? Each API Proxy has the same URL in Service Callout Policy which we want to change so that it applies to all API Proxies.

Thanks

1 2 294
2 REPLIES 2

Assuming that you have the URL hardcoded in the proxies, it would require making a change to the policy configs and redeploying the proxies.

This can be achieved in an automated fashion with apigeetool, maven, grunt, etc.

- download all proxies

- update the URL

- redeploy to Apigee

If you already have a CI/CD flow in place and all the proxies are in a code repo such as git, this task is relatively easier, but if not, you'll have to first download all proxies prior to making the change.

Here are a few recommendations on going forward to avoid a scenario as this one:

- never hardcode URLs directly in the proxies (for backends or service callouts) - use target servers instead

http://docs.apigee.com/api-services/reference/service-callout-policy#httptargetconnection
http://docs.apigee.com/api-services/content/load-balancing-across-backend-servers

- if target servers are not an option (for any reason) - you can always have the URLs in a KVM and load them dynamically during runtime and reference it via variables

@GAURAV,

As far as I know there is no easy way to make this change. You can go and change the URL in each of the API Proxies manually or the other way would be to write a script that

a) downloads all the API Proxy

b) update the URL

c) Redeploy the API Proxy

Ideally this could be made simpler using one of the following ways:

1) Putting your Service Callout in a shared flow and using it in your API Proxies

2) Use a target server within the Service Callout, so that you just have to change the URL in the target server and the new URL would reflect in all your Service Callout policies