to
clone an existing configuration object. Use the
xpath
parameter
to specify the location of the object to be cloned. Use the
from
parameter
to specify the source object, and the
newname
parameter
to provide a name for the cloned object.
Use the following API query to clone a security
policy called rule1 to rule2:
curl -X GET "https://<firewall>/api/?key=apikey&type=config&action=clone&xpath=/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules&from=/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='rule1']&newname=rule2"
Confirm that the XML response for the request looks like
the following:
<response status="success" name="rule2"/>
A corresponding success log is recorded in the
Configuration log: