How can I fetch Org/Environment names within the Edge Microgateway plug-in?

I'm trying to write a custom plug-in. I am able to see the config key/secret, and the request, but what I am after is the Apigee env/org properties of the Edge Microgateway instance. Is there an object model doc for what’s available in a plugin?

Solved Solved
0 3 147
1 ACCEPTED SOLUTION

Former Community Member
Not applicable

If MG was started with the EDGEMICRO_ORG and EDGEMICRO_ENV variables, then those variables are available to the plugin.

Plugin specific configuration, key and secret are the only values available to the plugin. One way to see what is available to the plugin is to print the req object in the onrequest method.

View solution in original post

3 REPLIES 3

Former Community Member
Not applicable

If MG was started with the EDGEMICRO_ORG and EDGEMICRO_ENV variables, then those variables are available to the plugin.

Plugin specific configuration, key and secret are the only values available to the plugin. One way to see what is available to the plugin is to print the req object in the onrequest method.

can i get publickey and other download parts like products,proxies from apigee in config of a custom plugin?

Former Community Member
Not applicable

Products:

No, not unless you call the products endpoint (https://{org}-{env}.apigee.net/edgemicro-auth/products) endpoint from the custom plugin.

Proxies:

You cannot download proxies information without access to the key and secret. If you did add the key and secret to the custom plugin's config then you can from this endpoint (https://edgemicroservices.apigee.net/edgemicro/bootstrap/organization/{org}/environment/{env}/proxies). The key and secret is sent as basic auth.