I have created an edgemicro API proxy in edge with few policies like json2xml, access-control, transform-uppercase. I know that edge-micro will not execute the policy existing in edge. What I wanted to do was create an array for each proxy which will just list the policies that it had on edge. Is there a way to do that?
Kindly explain the business need for this?
In edge-micro why do you still want to add policy?
Generally speaking, each proxy has a proxy-name.xml file which has various details along with all policies used in the proxy,
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <APIProxy revision="2" name="hasan-tanium"> <Basepaths>/tanium</Basepaths> <ConfigurationVersion majorVersion="4" minorVersion="0"/> <CreatedAt>1543509207352</CreatedAt> <CreatedBy>-----@gmail.com</CreatedBy> <Description></Description> <DisplayName>tanium</DisplayName> <LastModifiedAt>1543516809108</LastModifiedAt> <LastModifiedBy>-----@gmail.com</LastModifiedBy> <ManifestVersion>SHA-512:24b884252f9cc4af99609a441fb3968e76befe56ae9663e58f9ded9608f9065d109bb835cf029a5082d187f09ddc2e41559fa0da7e88b92f0a82edf6d312ce95</ManifestVersion> <Policies> <Policy>AM-Set-Payload-for-Saved-Question</Policy> <Policy>AM-Set-XML-Response</Policy> <Policy>EV-Extract-Body-Response</Policy> <Policy>EV-Extract-Question-Name</Policy> <Policy>EV-Extract-Session-ID</Policy> <Policy>RF-Mandatory-Header</Policy> <Policy>SC-Get-SessionID</Policy> <Policy>XML-to-JSON-1</Policy> <Policy>XSLT-Remove-Namespaces-Response</Policy> <Policy>XSLT-Remove-Namespaces</Policy> </Policies> <ProxyEndpoints> <ProxyEndpoint>default</ProxyEndpoint> </ProxyEndpoints> <Resources> <Resource>xsl://XSLT-Remove-Namespaces.xsl</Resource> </Resources> <Spec></Spec> <TargetServers/> <TargetEndpoints> <TargetEndpoint>default</TargetEndpoint> </TargetEndpoints> </APIProxy>
There are many edgemicro proxies with policies inside it. Instead of keeping a list of edgemicro proxies and policies, is there a way to get that while the microgateway is running. So, when I configure the edgemicro, it will gather the edgemicro proxy and policy info. This is to make sure that latest version of proxy with policy is used. Also, keeping a different list of proxies and policies can be cumbersome.