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

Rename Configuration

Useaction=rename to rename an object at a specified location in the configuration. Use the xpath parameter to specify the location of the object to be renamed. Use the newname parameter to provide a new name for the object.
  1. Use the following API query to rename an address object calledold_address tonew_address:
    curl -X POST 'https://firewall/api?type=config&action=rename&xpath=/config/devices/entry/vsys/entry[@name='vsys1']/address/entry[@name='old_address']&newname=new_address"
  2. Confirm that the XML response for the request looks like the following:
    <response status="success" code="20"> <msg>command succeeded</msg> </response>