Add a Custom Policy to the Palette?

Not applicable

Hello! Is it possible to create a custom policy that would then be available (in the Palette, for example) to all of our proxies? If so, how is this done? Finally, would this be a reference or a copy? Thanks!

1 2 633
2 REPLIES 2

Hi @Dieter Randolph

Yes - You can use the existing Apigee Edge policies and create a Shared flow. This Shared flow can be deployed and then referenced in any proxy. Its like a common code (could be one policy or a bunch with some logic) which can be referenced in my other proxies. To call a Shared flow, you need to have a Flow Callout policy in your proxy. If you want to enforce this Shared flow for ALL your proxies, then you need read about Flow hooks

For more info - check this link. There are many posts about Shared Flows in the community as well. For example - https://community.apigee.com/articles/34410/achieving-awesome-reuse-with-shared-flows-and-flow.html

Let me know if this helps

Hi @Dieter Randolph, What I understood from your question is if you create a custom policy say something like XMLToCSV and wants to put that in policies pallette on edge UI, right?

If so then it is not supported as edge UI is just a simple tool to work around and check and develop the code on the fly or a beginner.

But yes you can create you custom policies, using java-callouts, javascript call out or Python call-out to extend and do any sort of custom processing.

Some examples are:

https://github.com/DinoChiesa/ApigeeEdge-Java-Compute-Hash

https://github.com/DinoChiesa/ApigeeEdge-Java-Add-Xml-Node

There are two ways to reuse these custom policies.

1. Using shared flows, more info he re

2. Using a deployment tool automation like maven dependency plugin of apigee more info here

Both of these have a different approach to reusability.

Hope this helps!