The Gateway Migration Utility is a script that can be used to perform a number of task, such as:
- Export a service, policy, or folder from an API Gateway
- Import a service, policy, or folder into an API Gateway
- View the certificates in an API Gateway
For example, let's say you have a development and production API Gateway. A service or policy could be created in the development API Gateway, and once ready for production, the service or policy could be exported from the development API Gateway and then imported into the production API Gateway.
Making a RESTman call to GET data from an API Gateway or to POST data to an API Gateway is one of the most practical uses of the GMU utility. For example, the following command can be used to view all of the certificates in the dev internal API Gateway.
./GatewayMigrationUtility.sh restman \ -trustCertificate \ –trustHostname \ -host example.com \ -port 8443 \ -username your_username \ -plaintextPassword your_password \ -method GET \ -path '1.0/trustedCertificates'
In the prior examples, a cleartext password was used. For security, the password being used can be encoded using the encode password command.
./GatewayMigrationUtility.sh encodePassword –password yourPassword
The encode password command will produce a unique string of data, such as ryr45YH37v8_76vGnauf0.392RT13a2134Xxa. The unique string of data can be used as the secured password.
The GMU commands can get quite lengthy. To reduce the length of the commands, common options can be stored in files. As an example, the example.properties files could contains common options used when making a restman call to the dev internal API Gateway.
trustCertificate trustHostname host=example.com port=8443 username=your_username password=your_password