KB Article #178574
How to make the API Manager connectors connect via a proxy
Problem
I want to use the API Manager connectors (Salesforce, API Builder, Service Now, etc.), but our network access to the internet is routed through an outbound HTTP proxy. How can I configure the API Manager connector to respect the outbound proxy settings?
Resolution
You need to add the SystemProperty settings below to [install dir]/apigateway/conf/jvm.xml inside the <ConfigurationFragment> tag or create a new file in that location if it does not already exist. If you create a new file, make sure to put the system properties inside a <ConfigurationFragment> </ConfigurationFragment> block:
<SystemProperty name=”apiconnector.http.proxyHost” value={your proxy host} />
<SystemProperty name=”apiconnector.http.proxyPort” value={your proxy port} />
After making the change, restart the Gateway instance running API Manager and now the import API from connector works. To be able to access the imported API’s these API’s need also get a routing through the outbound HTTP proxy. For this you have to create an alternative routing policy for the API Gateway running the API Manager.
Start by loading an API project that includes the API manager capabilities into Policy studio, then create a Proxy Server entry under External Connections | Proxy Server with:
• A name, e.g. “Outbound HTTP proxy”
• A host = {your proxy host}
• A port = {your proxy port}
Then configure an alternate routing policy by making a copy of the Default URL-based Routing policy, which is found under Generated Policies/REST APIs/Templates and renaming the copy to Routing via Proxy.
That policy should contain only one Connect to URL filter: In the setting tab of the Connect to URL filter, go to Proxy and add the proxy created earlier. Don’t change any other settings.
Now change the configuration to expose the new Routing via Proxy policy into API Manager. Under Server Settings | API Manager | Routing Policy add the policy you’ve created earlier and deploy the new configuration.
You are now able to change the Default method routing to Routing via Proxy in API Manager under Outbound | Advanced for the APIs that are using the connectors.