1.When we will use proxy end point post flow and target end point post flow.

When we will use proxy end point post flow and target end point post flow.

Solved Solved
1 8 2,361
2 ACCEPTED SOLUTIONS

Hi @Rajesh Nimmada - This link should give you a better understanding of flows. If you still have questions, please reach out

View solution in original post

@Rajesh Nimmada ,

Great Question, It's one of the important & my favorite feature in Apigee Edge. It's very powerful & It seems like little confusing at first but once you understand it's dead simple.

To answer your question,

  • Post Flow executes after conditional flows in proxy endpoint or target endpoint.
  • Post flow is useful if you would like to execute some logic after some conditional logic in conditional flow.
  • Post flow executes no matter what after conditional flow.

Coming to when do you use proxy endpoint post flow & when do you use target endpoint post flow,

  • Let's say you have a single proxy endpoint with basepath /v1/songs
  • Let's say you have multiple target endpoints in same proxy with different target urls like https://rock.songs.com , https://baas.songs.com
  • Let's say you would like to route the requests to right target using route rules in Apigee Edge
  • Let's say you have a conditional flow that executes in target endpoint https://rock.songs.com which executes a policy that changes the request object by adding a new property to the payload & you would like to execute a policy which converts request format from JSON to XML after adding the new parameter in conditional flow since https://rock.songs.com will accept only xml as input.
  • So, You will use TargetEndPoint request post flow to add JSON to XML policy to convert request format.
  • If you add JSON to XML policy to Proxy Endpoint post flow it will result in converting the request for other endpoint https://baas.songs.com also which we don't want to happen since

    https://baas.songs.com accept request of JSON format only.

See 4MV4D video below on understanding flows with example below.

For additional information, You can refer the link mentioned by @Sai Saran Vaidyanathan .

Hope it helps. Please keep us posted if you still has any queries.

View solution in original post

8 REPLIES 8

Hi @Rajesh Nimmada - This link should give you a better understanding of flows. If you still have questions, please reach out

Yeah sure, Thank you very much for your response.

@Rajesh Nimmada ,

Great Question, It's one of the important & my favorite feature in Apigee Edge. It's very powerful & It seems like little confusing at first but once you understand it's dead simple.

To answer your question,

  • Post Flow executes after conditional flows in proxy endpoint or target endpoint.
  • Post flow is useful if you would like to execute some logic after some conditional logic in conditional flow.
  • Post flow executes no matter what after conditional flow.

Coming to when do you use proxy endpoint post flow & when do you use target endpoint post flow,

  • Let's say you have a single proxy endpoint with basepath /v1/songs
  • Let's say you have multiple target endpoints in same proxy with different target urls like https://rock.songs.com , https://baas.songs.com
  • Let's say you would like to route the requests to right target using route rules in Apigee Edge
  • Let's say you have a conditional flow that executes in target endpoint https://rock.songs.com which executes a policy that changes the request object by adding a new property to the payload & you would like to execute a policy which converts request format from JSON to XML after adding the new parameter in conditional flow since https://rock.songs.com will accept only xml as input.
  • So, You will use TargetEndPoint request post flow to add JSON to XML policy to convert request format.
  • If you add JSON to XML policy to Proxy Endpoint post flow it will result in converting the request for other endpoint https://baas.songs.com also which we don't want to happen since

    https://baas.songs.com accept request of JSON format only.

See 4MV4D video below on understanding flows with example below.

For additional information, You can refer the link mentioned by @Sai Saran Vaidyanathan .

Hope it helps. Please keep us posted if you still has any queries.

Thank you very much @Anil Sagar

Now I have an idea on target end point post flow by reading your wonderful explanation. If possible can you please give some example for proxy end point post flow also.

It's simple, If you would like to execute any policy after condition flow independent of which target endpoint, You will place the policy in Proxy EndPoint post flow. Hope it helps.

Awesome read @Anil Sagar

@Anil Sagar @ Google,

Thanks for the details and clarification.

In the above example, is it better to apply the JSON to XML transformation in the conditional flow itself (after adding the parameter of course) ? Or is there any difference it makes if it is done in target endpoint request post flow?

or can we have an example which explicitly need the target end point post flow?