The goal is to migrate properties from the source server to target server. With the service ID and restman command, the bundle is being passed using the migrateIn command. Below is the error:
API Gateway: 9.4
When you use the restman command to export a service/policy/CWP, the response file is in an XML format. When trying to import that file, the payload is rejected because there are extraneous XML tags that are not needed to create a new property.
Also, if you are using the restman command to perform an export, use the restman command to perform the import.
Remove the extraneous XML tags from the payload (response file). For a cluster wide property, you only need the following tags:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<l7:ClusterProperty xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
<l7:Name>NAME_OF_CWP</l7:Name>
<l7:Value>VALUE_OF_CWP</l7:Value>
</l7:ClusterProperty>
Use the POST method to create the new CWP on the target:
./GatewayMigrationUtility.sh restman --argFile common.prop --method POST --path '1.0/clusterProperties' --request CWP.xml --response response.xml --trustCertificate
Alternatively, you can use the PUT method to create the new CWP with the same ID used on the source:
./GatewayMigrationUtility.sh restman --argFile common.prop --method PUT --path '1.0/clusterProperties/<CWP_ID>' --request CWP.xml --response response.xml --trustCertificate
These commands should be executed by a user with Administrator privileges within the Policy Manager.