Developing API proxies bundle and deploying.

To create API proxies and relevant policies we need to create the folder structure such as apiproxy, and chid folder policies, proxies, and targets. And default.xml files in root folder, proxies and target folder.

Is there any utility/framework wherein I will pass the apiproxy name, target end points and policy types with specific parameters, and it will create those folder structure and xml files required?

My customized application will be able to create the api proxies and assign policies and then call the import API proxy URL of Edge management API.

I would not like to go thru the Edge management UI to create and export it.

Any reference/implementation towards this will help. Thanks for the help.

0 3 279
3 REPLIES 3

To create API proxies and relevant policies we need to create the folder structure such as apiproxy, and chid folder policies, proxies, and targets. And default.xml files in root folder, proxies and target folder.

Yes, that's correct. (although the proxy and target endpoints do not need to be named "default.xml". That's a convention, but you can use any name for the file, and for the endpoint itself. For clarity I like to keep the name fo the file the same as the name of the endpoint it defines.).

Is there any utility/framework wherein I will pass the apiproxy name, target end points and policy types with specific parameters, and it will create those folder structure and xml files required?

I don't know of a generally-used framework for this. There are lots of good project templating engines out there, like maven archetypes, or yeoman. In fact, there's a Yeoman generator for an API Proxy, here. I myself built my own tool that generates API Proxies out of templates, but sadly it runs in emacs lisp. Not kidding.

My customized application will be able to create the api proxies and assign policies and then call the import API proxy URL of Edge management API.

I understand your desire, thanks for being so clear. And you're not alone, there are others looking for the same thing, judging from the yeoman generator and my own template-driven tool. Unfortunately I don't know of a single, widely-used generator for an API Proxy. I think it would be a great community project!

oh and here's a yeoman-based API proxy generator.

https://github.com/markitondemand/apigee-proxy-generator

You could use openapi2apigee, it can generate a proxy locally from an Open API Specification and it has provisions for adding policies via extensions in the OAS. It can also deploy to Edge.

It could be enhanced to support additional policies.

Easy install via npm: https://www.npmjs.com/package/openapi2apigee