Hi All,
I have an API proxy with multiple paths exposed. When request comes then based on backend name in the payload it has to be routed to different backend APIs.
All the backend APIs need different message payload and authentication details.
What is the best practice for implementing this use case?
-
Create multiple route rules and multiple Target end points with condition based on request path and backend name from payload. Then do the transformation to backend format in the pre flow of target endpoint and call the backend API.
-
Have only one default route rule with multiple conditional flows with condition based on request path and backend name from payload.
-
Is there any other better way of doing this?
-
Where the backend request should be formed, in proxy endpoint or target end point?
-
In which flow backend response should be transformed to Client response, in target response pre/post flow or proxy end point pre/post flow?