Proxy chaining to specific deployment in a proxy

Hi All,

I am trying to implement proxy chaining to call a seperate proxy as a target endpoint for a proxy. I am also able to achieve it.

But my requirement is to, call a specific deployment of a proxy using proxy chaining. For example, if I have deployed the proxy in prod and test environment and I have to call the proxy deployed in prod environment only.

Is there any way to specify the deployment during proxy chaining?..Please let me know your thoughts on this.

Thanks In Advance.

Solved Solved
1 5 390
1 ACCEPTED SOLUTION

@Harini Rajkumar,

As documented here, you can invoke one API Proxy from another API Proxy provided using the proxy chaining feature provided both the Proxies are deployed in the same environment.

In your case, you have the API Proxy#1 deployed in test and prod environments and you want to invoke the API Proxy #2 that is deployed in prod environment only.

As per the documentation and also per my experiments and you will be able to use proxy chaining only for invoking API Proxy #2 from API Proxy #1 only in prod environment.

For test environment, you have to use the normal way of invoking the API Proxy #2 from API Proxy #1, that is:

<HTTPTargetConnection>
    <URL>http://<org-name>-test.apigee.net/<base-path></URL>
</HTTPTargetConnection>

But as you know this would incur additional network hops.

Meanwhile, can you please let me know why the API Proxy #2 is deployed only in the prod environment ? Is there any reason for not deploying it in test environment ?

View solution in original post

5 REPLIES 5

@Harini Rajkumar,

As documented here, you can invoke one API Proxy from another API Proxy provided using the proxy chaining feature provided both the Proxies are deployed in the same environment.

In your case, you have the API Proxy#1 deployed in test and prod environments and you want to invoke the API Proxy #2 that is deployed in prod environment only.

As per the documentation and also per my experiments and you will be able to use proxy chaining only for invoking API Proxy #2 from API Proxy #1 only in prod environment.

For test environment, you have to use the normal way of invoking the API Proxy #2 from API Proxy #1, that is:

<HTTPTargetConnection>
    <URL>http://<org-name>-test.apigee.net/<base-path></URL>
</HTTPTargetConnection>

But as you know this would incur additional network hops.

Meanwhile, can you please let me know why the API Proxy #2 is deployed only in the prod environment ? Is there any reason for not deploying it in test environment ?

Hi Amar,

According to my requirement, for example, let us take a revision 7 of a proxy1 is deployed in env1 and revision 8 of a proxy1 is deployed in env2.

Now I am using proxy chaining from the target endpoint of proxy 2 to call proxy1 as below.

<LocalTargetConnection>

<Path>/proxy1</Path>

<LocalTargetCnnection>.

I am not sure, if I give the path, which environment is getting executed.For now, I want revision 8 deployed in env2 to get executed from this path. Is it possible to mention the specific deployment in proxy chaning? Please help me with this.

Thanks!!

@Harini Rajkumar,

If you use the Path element in proxy chaining, then also the request will go to the same environment from which you are trying to invoke the API Proxy #2.

In your example, if you are trying to invoke proxy 2 from proxy 1 in env1, then the API request will go the proxy 2 in env1 only. If the proxy 2 is not deployed in env1, then you will get a 404 Application Not Found Error.

@Harini Rajkumar,

I did recheck on the proxy chaining and would like to confirm the following:

1. With Proxy chaining, you can invoke API Proxy #2 from API Proxy #1 only in the same environment.

2. Let's say you have API Proxy #1 deployed in env1 and you want to invoke API Proxy #2 in a different environment, then you can use the traditional way, that is, HTTPTargetConnection as explained in my answer above.

<HTTPTargetConnection>
      <URL>http://<org-name>-<env>.apigee.net/<base-path></URL>
</HTTPTargetConnection>

Thank you very much Amar!!!!