Is it possible to get Target Server info in a Java Callout

Not applicable

I'd really like to get Target Server details in my flow. Can I do this in a Java Callout policy by getting access to some of the underlying functionality.

For example is there any way for me to call the equivalent of:

this.application.getEnvironment().getTargetServer(name);

From the Java Callout - say from the message or execution contexts?

Solved Solved
1 4 486
1 ACCEPTED SOLUTION

Not applicable

Does this page answer your question: http://apigee.com/docs/ja/api-services/reference/v...

Is the question that the 'target.host' useful in getting the targetEndPoint details?

View solution in original post

4 REPLIES 4

Not applicable

Does this page answer your question: http://apigee.com/docs/ja/api-services/reference/v...

Is the question that the 'target.host' useful in getting the targetEndPoint details?

I think what you're asking is to make a call to get the administrative configuration details for a named target server. And the answer to that is: no, there is no Java object that allows you to do that, currently.

You could make a call to the administrative interface of Apigee Edge, to get this information. But that would require administrative credentials. Probably not what you wish to do.

Is there another way to solve the problem?

Not applicable

Not that I'm aware of. But, you could leverage KVM to store/retrieve config data at environment level. It would be similar as Target Server, which I guess you're using to store the URL. Access to KVMs are relatively inexpensive, so you can also reduce potential latency impact by retrieving and storing them in cache. One downside is that you'll require to maintain config data in two places, KVM and Target Server. Maybe use KVM end-to-end depending on your use case.

Not applicable