Layer7 API Management

Expand all | Collapse all

RESTMAN /bundle params

Jump to Best Answer
  • 1.  RESTMAN /bundle params

    Posted 05-17-2017 04:31 AM



    When trying to export a bundle containing only one service (and dependencies), mapping about parent folder id show up but not folder definition (which is normal as not requested).


    <l7:Service id="c630da68059b12c41a24f8f9df4dc70f" version="52">
    <l7:ServiceDetail folderId="d3dfe996ca7aba6eea79e7cf2dd9df90" id="c630da68059b12c41a24f8f9df4dc70f" version="52">


    <l7:Mapping action="NewOrExisting" srcId="d3dfe996ca7aba6eea79e7cf2dd9df90" srcUri="" type="FOLDER">
    <l7:Property key="FailOnNew">


    As we can't "MapByName" this folder, becuase folder definition is not included, if we then add "requireFolder" along with "service" query params, the mentioned folder does not show up in resulting bundle.

    This is the command initiated:


    /usr/bin/curl -k -X GET -H "L7-key-passphrase: foobar" -H "Accept: application/xml" -H "Content-Type: application/xml" -u "username:password" --cacert /etc/pki/tls/private/CA_chain.pem "" --output "/var/tmp/restapi_comm31404.xml"


    What are we doing wrong here ?

  • 2.  Re: RESTMAN /bundle params

    Posted 05-17-2017 05:44 PM

    Good afternoon,


    The restman command you included has the "requireFolder" which is not a valid option and is ignored. If you are looking for the folder you have to use "folder".




    Stephen Hughes

    Director, CA Support

  • 3.  Re: RESTMAN /bundle params

    Posted 05-18-2017 05:08 AM



    Restman documentation mention this parameter:



  • 4.  Re: RESTMAN /bundle params
    Best Answer

    Posted 05-18-2017 12:38 PM

    Try adding:


    to the request url.


    The require folder parameter will only take effect if the folder is already included in the bundle export. By having the following in your bundle parameters: 


    • The folder parameter will include the folder and all its contents in the bundle export.
    • The requireFolder parameter tells the bundle exporter to only include the folder and not any of its contents (except those explicitly requested).
    • The service parameter tells to bundle exported to also export the service and all its dependencies.

  • 5.  Re: RESTMAN /bundle params

    Posted 05-18-2017 01:10 PM

    Thank you Victor for the insight.


    Phillipe, I've tested it in our lab and it should accomplish what you are looking for. Please let us know if it does.




    Stephen Hughes

    Director, CA Support

  • 6.  Re: RESTMAN /bundle params

    Posted 05-19-2017 08:09 AM



    Thanks. It Works


    Deep inside our administration framework it now does:


    callGETService -h "L7-key-passphrase: zepass" "/bundle?service=c630da68059b12c41a24f8f9df4dc70f&folder=d3dfe996ca7aba6eea79e7cf2dd9df90&requireFolder=d3dfe996ca7aba6eea79e7cf2dd9df90&includeDependencies=true&encassAsPolicyDependency=true&encryptSecrets=true"


    Single service is exported along with Folder mapping and definition. Just had to "MapByName" folder and it does the job.


    Kindly suggest to amend the RESTman documentation on this one

  • 7.  Re: RESTMAN /bundle params

    Posted 05-19-2017 01:19 PM

    That is great to hear. We will definitely look to outline this in our documentation.




    Stephen Hughes

    Director, CA Support