====== PAN-OS API Set Configuration ======
Prefix all commands with
https://10.1.1.1/api/?key=API_KEY
=====General Firewall Setup=====
====Set Hostname====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system&element=HOSTNAME_2
====Set Timezone====
&type=config=&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system&element=Europe/London
====Set NTP====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system&element=139.143.5.30139.143.5.31
====Set DNS====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system&element=1.1.1.11.0.0.1
====Enable "Verify Update Server====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system&element=yes
====Disable Insecure Management Services====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system&element=yesyes
=====Dynamic Updates=====
====Set Dynamic Update Schedule - Anti-Virus====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/update-schedule/anti-virus&element=36download-and-install
====Set Dynamic Update Schedule - Apps & Threats====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/update-schedule/threats&element=30download-and-install212
====Set Dynamic Update Schedule - GlobalProtect Datafile====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/update-schedule/global-protect-datafile&element=55download-and-install
====Set Dynamic Update Schedule - GlobalProtect Clientless VPN Datafile====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/update-schedule/global-protect-clientless-vpn&element=40download-and-install
====Set Dynamic Update Schedule - WildFire====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/update-schedule/wildfire&element=5download-and-install
====Set Dynamic Update Schedule - All====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system&element=30download-and-install2855download-and-install40download-and-install15download-and-install5download-and-install
=====WildFire Settings=====
However, to do all WildFire with Curl, we must skip the " symbols.
====Set WildFire Public Cloud to EU Data Centre====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting/wildfire&element=eu.wildfire.paloaltonetworks.com
====Set WildFire to Log Benign Files====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting/wildfire&element=yes
====Set WildFire to Log Grayware Files====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting/wildfire&element=yes
====Set WildFire Size Limits and Update Server and Logging====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting&element=eu.wildfire.paloaltonetworks.comnoyes103010001000551102
====Set WildFire Size Limits Individually====
**PE File**
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting/wildfire/file-size-limit/entry[@name='pe']&element=18
**APK File**
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting/wildfire/file-size-limit/entry[@name='apk']&element=11
**PDF File**
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting/wildfire/file-size-limit/entry[@name='pdf']&element=3070
**MS Office File**
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting/wildfire/file-size-limit/entry[@name='ms-office']&element=16380
**Jar File**
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting/wildfire/file-size-limit/entry[@name='jar']&element=4
**Flash File**
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting/wildfire/file-size-limit/entry[@name='flash']&element=4
**MaOSX Executable**
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting/wildfire/file-size-limit/entry[@name='MacOSX']&element=9
**Archive File**
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting/wildfire/file-size-limit/entry[@name='archive']&element=49
**Linux ELF File**
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting/wildfire/file-size-limit/entry[@name='linux']&element=49
**Script**
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting/wildfire/file-size-limit/entry[@name='script']&element=19
=====Security Settings=====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting&element=yesnoyes
Set "Forward segments exceeding TCP App-ID inspection queue" settings in Device->Setup->Content-ID
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting&element=no
Set the "Forward segments exceeding TCP content inspection queue" and "Forward datagrams exceeding UDP content inspection queue" settings in Device->Setup->Content-ID
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting&element=nono
Set URL Proxy for SSL Decrypt. This allows proper response pages to be delivered even when decryption is not enabled.
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/setting&element=yes
==Terminal Service Agent Config==
===Create TS Agent Entry===
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/ts-agent&element=10.1.2.35009
===Delete TS Agent Entry===
&type=config&action=delete&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/ts-agent/entry[@name='name-of-ts-entry']
=====HA Configuration=====
====Set Interface as HA Interface====
&type=config&action=set&xpath=/config/devices/entry[@name="localhost.localdomain"]/network/interface/ethernet&element=
====Main HA Settings====
Within '''', if you do not set ''x'', then the firewall will use HA1. You can set ''ha1-a'', ''ha1-b' or ''management''.
To enabled decryption, add ''yes''' to '''''.
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig&element=ethernet1/61.1.1.1255.255.255.252nomanagementethernet1/72.2.2.1255.255.255.252yes101auto231.1.1.2192.168.2.1
====Set HA Link Monitoring Settings====
&type=config&action=set&xpath=/config/devices/entry[@name="localhost.localdomain"]/deviceconfig&element=yesethernet1/8
====Disable HA Path Monitoring====
&type=config&action=set&xpath=/config/devices/entry[@name="localhost.localdomain"]/deviceconfig&element=no
====Enable HA====
&type=config&action=set&xpath=/config/devices/entry[@name="localhost.localdomain"]/deviceconfig&element=yes
====Disable HA====
&type=config&action=set&xpath=/config/devices/entry[@name="localhost.localdomain"]/deviceconfig&element=no
=====Objects=====
====Create Address Objects====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address&element=IP_VALUETAG_NAME_IF_APPLICABLE
====Edit Address Object====
&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address/entry[@name='ADDRESS_OBJECT']&element=NEW_VALUE