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

This assumes you are familiar with the basic usage of the Gateway Migration Utility that you are using an arguments file with an encoded password to connect to your API Gateway, 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
-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

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




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




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |