The PAN-OS XML API uses XML for both requests and responses. When making requests, construct an HTTPS GET or POST request with the correct type and action along with the correct XPath. Here is an example API request:
Ensure you replace variables such as
with the IP address or hostname of your firewall or Panorama and API key, respectively.
When making configuration requests (
), you can use XPath, a syntax for selecting nodes from within an XML document. Use the XPath to isolate and modify portions of your configuration. The XML configuration within PAN-OS uses four different types of nodes as shown here:
Root nodes are top-level nodes with no parent. Requesting the root node returns all child elements.
Element nodes represent containers of information. Element nodes can contain other element nodes or simply act as a container of information. Example:
Attribute nodes are nodes that contain name/value pairs. Example:
Text nodes contain plain text. Example:
Explore the API with the API browser, CLI, or debug console to learn how to construct XML requests.