Edit Configuration
Table of Contents
Expand all | Collapse all
-
- Upgrade a Firewall to the Latest PAN-OS Version (API)
- Show and Manage GlobalProtect Users (API)
- Query a Firewall from Panorama (API)
- Upgrade PAN-OS on Multiple HA Firewalls through Panorama (API)
- Automatically Check for and Install Content Updates (API)
- Enforce Policy using External Dynamic Lists and AutoFocus Artifacts (API)
- Configure SAML 2.0 Authentication (API)
- Quarantine Compromised Devices (API)
- Manage Certificates (API)
-
- Asynchronous and Synchronous Requests to the PAN-OS XML API
- Run Operational Mode Commands (API)
- Apply User-ID Mapping and Populate Dynamic Groups (API)
- Get Version Info (API)
-
- PAN-OS REST API
- Access the PAN-OS REST API
- Resource Methods and Query Parameters (REST API)
- PAN-OS REST API Request and Response Structure
- PAN-OS REST API Error Codes
- Work With Objects (REST API)
- Create a Security Policy Rule (REST API)
- Work with Policy Rules on Panorama (REST API)
- Create a Tag (REST API)
- Configure a Security Zone (REST API)
- Configure an SD-WAN Interface (REST API)
- Create an SD-WAN Policy Pre Rule (REST API)
- Configure an Ethernet Interface (REST API)
- Update a Virtual Router (REST API)
- Work With Decryption (APIs)
Edit Configuration
Useaction=edit to replace
an existing object hierarchy at a specified location in the configuration
with a new value. Use the xpath parameter to specify the location
of the object, including the node to be replaced. Use the element parameter
to specify a new value for the object using its XML object hierarchy
(as seen in the output ofaction=show).
- Replace the application(s) currently used in a
rule rule1 with a new application:curl -X POST 'https://firewall/api?type=config&action=edit&xpath=xpath-value&element=element-value"wherexpath=/config/devices/entry/vsys/entry/rulebase/security/rules/entry[@name='rule1']/application&element=<application><member>app-name</member></application>
- Use the response from the config show API request to create the XML body for the element.
curl -X POST 'https://firewall/api?type=config&action=show"- Optionally replace all members in a node with a new set of members using the entry tag in both the xpath and element parameters. For example, to replace all the address objects in the address group named test with two new static members namedabc andxyz, use:
curl -X POST 'https://firewall/api?type=config&action=edit&xpath=/config/devices/entry/vsys/entry[@name='vsys1']/address-group/entry[@name='test']&element=<entry name='test'><static><member>abc</member><member>xyz</member></static></entry>" - Use the response from the config show API request to create the XML body for the element.