Bootstrap FreeKB - Broadcom API Gateway - List every version of a policy or service using the Gateway Migration Utility
Broadcom API Gateway - List every version of a policy or service using the Gateway Migration Utility

Updated:   |  Broadcom API Gateway articles

This assumes you are familiar with the basic usage of the Gateway Migration Utility, and that you understand the basic usage of restman to view the XML of a policy or service. The /versions option can be appended to return XML that lists every version of a service.

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

 

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/services/{service_id}/versions'

 

The same can be done with policies.

/path/to/GatewayMigrationUtility.sh restman
-argFile example.properties
-method GET
-path '1.0/policies/{policy_id}/versions'

 

In the XML that is returned, there will be a block of XML for each version of the policy, and each block will contain the following tag that identifies the version of the policy.

<l7:Name>Policy Version: 1</l7:Name>

 

versions can be included to return each version of the service.

/path/to/GatewayMigrationUtility.sh restman
-argFile example.properties
-method GET
-path '1.0/services/{service_id}/versions'

 

Each version will have a unique ordinal number, such as 1 for version 1, 2 for version 2, et cetera.

<l7:ordinal>1</l7:ordinal>

 

The ordinal number can be used to return a specific version of the service.

/path/to/GatewayMigrationUtility.sh restman
-argFile example.properties
-method GET
-path '1.0/services/{service_id}/versions/2'

 

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/policies/{policy_id}/versions'
-response /path/to/example.xml

 




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 a5bfd7 in the box below so that we can be sure you are a human.