Focus
Focus
Table of Contents
End-of-Life (EoL)

Clone Configuration

Use
action=clone
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.
  1. 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"
  2. 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:
    1,2014/03/19 19:07:45,0009C100708,CONFIG,0,0,2014/03/19 19:07:45,10.66.18.1,,clone,admin,Web,Succeeded, config devices entry vsys vsys1 rulebase security rules,384,0x8000000000000000

Recommended For You