Bootstrap FreeKB - Broadcom API Gateway - List Encapsulated Assertions using the Gateway Migration Utility
Broadcom API Gateway - List Encapsulated Assertions using the Gateway Migration Utility

Updated:   |  Broadcom API Gateway articles

This assumes you are familiar with the basic usage of the Gateway Migration Utility. Following is an example of how to list every encapsulated assertion in an API Gateway.

/path/to/GatewayMigrationUtility.sh restman
-host apig.example.com
-port 8443
-username john.doe
-password f5VPX0yUJPg.m4BrjdgMv84UgktddJD3xA
-method GET
-path '1.0/encapsulatedAssertions'

 

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 GET
-path '1.0/encapsulatedAssertions'

 

Or, you can return a single encapsulated assertion by including the ID of the encapsulated assertion.

/path/to/GatewayMigrationUtility.sh restman
-argFile example.properties
-method GET
-path '1.0/encapsulatedAssertions/fa003c1f2478cc407b0a8acbba2aa199'

 

Or, you can use the -query option to return a single encapsulated assertion by including the name of the encapsulated assertion.

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

 

The -response option can be used to output the XML to a file.

/path/to/GatewayMigrationUtility.sh restman
-argFile example.properties
-method GET
-path '1.0/encapsulatedAssertions'
-response /path/to/example.xml

 

Here is an example of the output that could be returned.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<l7:List xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
    <l7:Name>ENCAPSULATED_ASSERTION List</l7:Name>
    <l7:Type>List</l7:Type>
    <l7:TimeStamp>2021-01-05T21:59:45.724-06:00</l7:TimeStamp>
    <l7:Link rel="self" uri="https://apig.example.com:8443/restman/1.0/encapsulatedAssertions?name=assertion001"/>
    <l7:Link rel="template" uri="https://apig.example.com:8443/restman/1.0/encapsulatedAssertions/template"/>
    <l7:Item>
        <l7:Name>assertion001</l7:Name>
        <l7:Id>f380d7b766f92ef13d6238d1c0da09ac</l7:Id>
        <l7:Type>ENCAPSULATED_ASSERTION</l7:Type>
        <l7:TimeStamp>2021-01-05T21:59:45.724-06:00</l7:TimeStamp>
        <l7:Link rel="self" uri="https://apig.example.com:8443/restman/1.0/encapsulatedAssertions/f380d7b766f92ef13d6238d1c0da09ac"/>
        <l7:Resource>
            <l7:EncapsulatedAssertion id="f380d7b766f92ef13d6238d1c0da09ac" version="10">
                <l7:Name>assertion001</l7:Name>
                <l7:Guid>205ad2a9-8722-4cc4-b5a6-3e1a7356736f</l7:Guid>
                <l7:PolicyReference id="f380d7b766f92ef13d6238d1c0d0ed89" resourceUri="http://ns.l7tech.com/2010/04/gateway-management/policies"/>
                <l7:EncapsulatedArguments>
                    <l7:EncapsulatedAssertionArgument>
                        <l7:Ordinal>1</l7:Ordinal>
                        <l7:ArgumentName>foo</l7:ArgumentName>
                        <l7:ArgumentType>string</l7:ArgumentType>
                        <l7:GuiLabel>foo</l7:GuiLabel>
                        <l7:GuiPrompt>true</l7:GuiPrompt>
                    </l7:EncapsulatedAssertionArgument>
                </l7:EncapsulatedArguments>
                <l7:EncapsulatedResults>
                    <l7:EncapsulatedAssertionResult>
                        <l7:ResultName>bar</l7:ResultName>
                        <l7:ResultType>other</l7:ResultType>
                    </l7:EncapsulatedAssertionResult>
                </l7:EncapsulatedResults>
                <l7:Properties>
                    <l7:Property key="allowTracing">
                        <l7:StringValue>false</l7:StringValue>
                    </l7:Property>
                    <l7:Property key="description">
                        <l7:StringValue>assertion001 foo bar</l7:StringValue>
                    </l7:Property>
                    <l7:Property key="policyGuid">
                        <l7:StringValue>b44f4478-9c7a-43d2-aee3-2a8faa736ae6</l7:StringValue>
                    </l7:Property>
                </l7:Properties>
            </l7:EncapsulatedAssertion>
        </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 a6bd0e in the box below so that we can be sure you are a human.