Is it possible to create policies for a particular flow at the org or env level ?

If the preflow (for eg.) of all the proxies in an org have the same set of policies, is it possible to create them at a more central level i.e at the org or env level ?

Solved Solved
0 4 446
1 ACCEPTED SOLUTION

You can use the maven dependency plugins to reuse policies across proxies. You can see it here : https://github.com/apigee/proxy-dependency-maven-plugin

If you are using scripts inside policies , those you can define at org or env level using resources. Read more here : http://apigee.com/docs/api/resource-files

View solution in original post

4 REPLIES 4

Dear @Venkataraghavan ,

As far as i know, Answer is NO. You cannot attach polices to org or env level.

You can attach policies only to API Proxy flows and each policy will be specific to particular API Proxy flow to which it has been attached.

Cheers,

Anil Sagar

You can use the maven dependency plugins to reuse policies across proxies. You can see it here : https://github.com/apigee/proxy-dependency-maven-plugin

If you are using scripts inside policies , those you can define at org or env level using resources. Read more here : http://apigee.com/docs/api/resource-files

Not applicable

Hi @Venkataraghavan , other suggestions if you're into Grunt, Gulp and JavaScript build tools is to leverage search and replace plugins, which effectively do the same as Maven Dependency Management Plugin.

For instance, the following code will search for a pattern string and replace it the content from a file located in the filesystem (e.g. FTP, URL, Dropbox Folder, etc.):

{//fragment from common folder (Git submodule) 
   pattern: '@@EXAMPLE-STEP-COMMON-XML-TO-JSON-GIT-SUBMODULE-FRAGMENT#1', 
   replacement: "<%= grunt.file.read('common/apiproxy/proxies/xmltojson-js-step	s-common-frag.xml') %>" }

You can learn more about this approach by following the example here: https://github.com/apigeecs/apigee-deploy-grunt-plugin/blob/master/grunt/search-and-replace-files.js...

Not applicable

As suggested by @sarthak, Maven dependency plugin is used in many programs for this purpose.

As maven is a third party tool and it add these policies at deployment time, Engg team is looking into "Global Policy" feature so that this become available OOTB from platform.