How to Export Address and Address-group Objects Using PAN-OS API
59598
Created On 09/26/18 13:44 PM - Last Modified 06/07/23 17:19 PM
Resolution Overview
This document describes how to export address and address-group objects from a Palo Alto Networks firewall into an Excel spreadsheet.
Steps
Login to the Palo Alto Networks firewall through a browser. G enerate an API Key with the following:https://<Firewall-IPaddress>/api/?type=keygen&user=<login-username>&password=<login-password>
Open a New Excel worksheet and select Data > From Web to bring up the Web Query dialog: Enter the address of the Palo Alto Networks firewall into the Address field click Go. Then, login to the firewall. Enter one of the URL (with the key embedded) into the address bar and click Go.
The Rest API URL to export Address objects:https:// <firewall-IP>/api/?type=config&action=get&key=<key >&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address
The Rest API URL to export Address-group objects:https:// <firewall-IP>/api/?type=config&action=get&key=<key >&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address-group
The firewall configuration will appear for the address objects. Click on Import to bring the data into the Excel worksheet. The screenshots below show examples of the resulting data:
owner: ssunku