Focus
Focus
Table of Contents

Delete Configuration

Useaction=delete to delete an object at a specified location in the configuration. Use thexpath parameter to specify the location of the object to be deleted.
To delete more than one object using a config type xml command, create individual requests and repeat the process for each object.
  • Delete a rule named rule1 in the security policy:
    curl -X POST 'https://firewall/api?type=config&action=delete&xpath=/config/devices/entry/vsys/entry/rulebase/security/rules/entry[@name='rule1']"
  • Delete a single member object in a group, use the object name in the xpath asmember[text()='name']. For example, to delete a static address object named abc in an address group named test, use the following xpath:
    curl -X POST 'https://firewall/api?type=config&action=delete&xpath=/config/devices/entry/vsys/entry[@name='vsys1']/address-group/entry[@name='test']/static/member[text()='abc']"