Call Another API Proxy from one API Proxy in the same organization

烈酒焚心 提交于 2019-12-21 06:45:23

问题


I have an existing API proxy in my organization which I want to call in my other API proxy.

Is there any other way to implement this?

One of the considerations in the API proxy development and design is not to implement ServiceCallout from one API proxy to another in the same organization, or recursively from an API proxy back to itself as indicated in the documentation.


回答1:


You can call one API proxy in other like any other request.

But i believe this is not something recommended as this would make a separate request call. what i suggest is to create a new flow within the same API proxy itself and copy the flow and policies in the other proxy to the new flow that you have created. By doing this you are just creating a new execution flow. (Which is faster and efficient but with some redundancy)




回答2:


As you say, it is not recommended to call an API Proxy from a service callout of another API Proxy because the system is not designed for this, and it will not perform well.

However you can share common resources among API Proxies. By resources, I mean java, JavaScript, XSLT, etc. This is achieved by storing these common resources at your organization level (or even at your environment level), and then referencing them in each proxy. I'm not sure if this really helps your situation or not.



来源:https://stackoverflow.com/questions/22499350/call-another-api-proxy-from-one-api-proxy-in-the-same-organization

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!