Layer7 API Management

Expand all | Collapse all

RESTMan bundle parameters

Jump to Best Answer
  • 1.  RESTMan bundle parameters

    Posted 06-20-2017 05:59 AM

    Hi,

     

    Could you confirm arguments shown below in RESTman documentation for "bundle" operation do not exist (anymore) ?

     

    GET 1.0/bundle/{resourceType}/{id}

    GET 1.0/bundle

     

    includeOnlyServicePolicybooleanfalse1.0.3True to export only service policy. False by default.
    includeOnlyDependenciesbooleanfalse1.0.3True to export only dependencies. False by default.

     

    In fact goal was to use "bundle" to export a policy *without* any dependencies, e.g. mimic what does the "export policy" in the Policy Manager.

     

    Using WSMan works through "gatewayManagementClient.sh" but we would rather stick continuing to use restman to avoir embedded java program (read:dead slow).

     

    ./gatewayManagementClient.sh apidev-eu-int.sanofi.com export -type policy -username xxxxx -password 'xxxxxxxx' -id e001cfd0c1c1ffaa18e187b5e72fd96f -outFile /var/tmp/foo -skipVerifyCertificate -skipVerifyHostname

     

    Thanks,



  • 2.  Re: RESTMan bundle parameters
    Best Answer

    Posted 06-20-2017 11:59 AM

    Hello

     

     

    The options you reference were added I believe in 9.2 to specifically support your objective to export a service with no dependencies. This can be done using bundle as such. 

     

    /restman/1.0/bundle/service/{id}?includeOnlyServicePolicy=true



  • 3.  Re: RESTMan bundle parameters

    Posted 06-21-2017 04:29 AM

    Hi.

    Confirmed, this option, although documented in 9.1, only works in 9.2. As most of our appliances are still in 9.1, we have to stick with WSMan.

     

    But doing it with RESTman is does not in fact mimic exactly the policy manager "export policy", what does is using WSMan (e.g: no mappings, etc).

    We modified our framework and now being able to:

     

          # exportPolicy -n "/OTK/Policy Fragments/authentication/OTK User Authentication"

     

    Generated command:

     

    /usr/bin/curl -k -X POST -H "Accept: application/soap+xml;charset=utf-8, application/soap+xml;charset=utf-16" -H "Content-Type: application/soap+xml;charset=utf-8;action=http://ns.l7tech.com/2010/04/gateway-management/policies/ExportPolicy" -u "******:xxxxxxxxxxx" --cacert /etc/pki/tls/private/CA_chain.pem "https://apidev-eu-int.sanofi.com:7443/wsman" -d "@/var/tmp/soapFile4331"

     

    argument soapFile4331:

     

    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <env:Header>
    <wsa:Action env:mustUnderstand="true">http://ns.l7tech.com/2010/04/gateway-management/policies/ExportPolicy</wsa:Action>
    <wsa:ReplyTo>
    <wsa:Address env:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
    </wsa:ReplyTo>
    <wsa:MessageID env:mustUnderstand="true">uuid:df2572ab-b43a-4983-aa67-7542117b6901</wsa:MessageID>
    <wsa:To env:mustUnderstand="true">https://apidev-eu-int.sanofi.com:7443/wsman</wsa:To>
    <wsman:ResourceURI>http://ns.l7tech.com/2010/04/gateway-management/policies</wsman:ResourceURI>
    <wsman:OperationTimeout>P0Y0M0DT0H5M0.000S</wsman:OperationTimeout>
    <wsman:SelectorSet>
    <wsman:Selector Name="id">e001cfd0c1c1ffaa18e187b5e72fd96f</wsman:Selector>
    </wsman:SelectorSet>
    </env:Header>
    <env:Body/>
    </env:Envelope>