Bootstrap FreeKB - Broadcom API Gateway - Create Folder using the Gateway Migration Utility
Broadcom API Gateway - Create Folder using the Gateway Migration Utility

Updated:   |  Broadcom API Gateway articles

This assumes you are familiar with the basic usage of the Gateway Migration Utility. Let's say you want to create a folder using the Gateway Migration Utility. First, create an XML file.

touch myFolder.xml

 

Add the following to the XML file. In this example, the folder will be named myFolder.

<l7:Folder folderId="0000000000000000ffffffffffffec76" xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
    <l7:Name>myFolder</l7:Name>
</l7:Folder>

 

Issue the following command to create the Cluster Wide Property.

/path/to/GatewayMigrationUtility.sh restman
-host apig.example.com
-port 8443
-username john.doe
-password f5VPX0yUJPg.m4BrjdgMv84UgktddJD3xA
-method POST
-path '1.0/folders'
-request myFolder.xml

 

Or the -argFile option can be used, to reduce the number of options that are used on the command line.

/path/to/GatewayMigrationUtility.sh restman
-argFile example.properties
-method POST
-path '1.0/folders'
-request myFolder.xml

 

You can then use the Gateway Migration Utility to ensure the folder was created.

/path/to/GatewayMigrationUtility.sh restman
-argFile example.properties
-method GET
-path '1.0/folders'
-query 'name=myFolder'

 

Which should return something like this.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<l7:List xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
    <l7:Name>FOLDER List</l7:Name>
    <l7:Type>List</l7:Type>
    <l7:TimeStamp>2020-11-03T22:34:41.599-06:00</l7:TimeStamp>
    <l7:Link rel="self" uri="https://apig.example.com:8443/restman/1.0/folders"/>
    <l7:Link rel="template" uri="https://apig.example.com:8443/restman/1.0/folders/template"/>
    <l7:Item>
        <l7:Name>myFolder</l7:Name>
        <l7:Id>fc3df4d7f82f3a659657c2a70287bec6</l7:Id>
        <l7:Type>FOLDER</l7:Type>
        <l7:TimeStamp>2020-11-03T22:34:41.599-06:00</l7:TimeStamp>
        <l7:Link rel="self" uri="https://apig.example.com:8443/restman/1.0/folders/fc3df4d7f82f3a659657c2a70287bec6"/>
        <l7:Resource>
            <l7:Folder folderId="8bae51330510d965be8eb9217530ff08" id="fc3df4d7f82f3a659657c2a70287bec6" version="0">
                <l7:Name>myFolder</l7:Name>
            </l7:Folder>
        </l7:Resource>
    </l7:Item>
</l7:List>

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 525bff in the box below so that we can be sure you are a human.