End-of-Life (EoL)
Upgrade a Firewall to the Latest PAN-OS Version (API)
You can use the PAN-OS XML API to update your
firewall with the latest PAN-OS and Content Release versions.
- Download the latest content update.Use the following request to first download the latest content update:curl -X GET 'https://<firewall>/api/?type=op&cmd=<request><content><upgrade><download><latest/></download></upgrade></content></request>&key=<apikey>'If successful, the response contains ajobidthat you can use to check on the status of your request.<response status="success" code="19"> <result> <msg> <line>Download job enqueued with jobid 2</line> </msg> <job>2</job> </result> </response>Check on the content download status.Use thejobidto ensure that the content download completes successfully:curl -X GET 'https://<firewall>/api/?type=op&cmd=<show><jobs><id>2</id></jobs></show>&key=<apikey>'The response should include the following:<response status="success">…Install the latest content update.Use the following request to install the newly downloaded content:curl -X GET 'https://<firewall>/api/?type=op&cmd<request><content><upgrade><install><version>latest</version></install></upgrade></content></request>key=<apikey>'If successful, the response contains ajobidthat you can use to check on the status of your request.<response status="success" code="19"> <result> <msg> <line>Content install job enqueued with jobid 3</line> </msg> <job>3</job> </result> </response>Check on the content installation status.Use thejobidto ensure that the content installation completes successfully:curl -X GET 'https://<firewall>/api/?type=op&cmd=<show><jobs><id>3</id></jobs></show>&key=<apikey>'The response should include the following:<response status="success">…Check for the latest PAN-OS software update.After installing the latest Content Release update, check for the latest available PAN-OS software updates:curl -X GET 'https://<firewall>/api/?type=op&cmd=<request><system><software><check></check></software></system></request>&key=<apikey>'In the response, the first entry is the latest version of PAN-OS:<response status="success"> <result> <sw-updates last-updated-at="2015/10/20 14:16:30"> <msg /> <versions> > <version>7.1.0</version> <filename>PanOS_3000-7.1.0-c65</filename> <size>720</size> <size-kb>737504</size-kb> <released-on>2015/10/20 13:23:11</released-on> ...Download the latest PAN-OS software update.
- In this case, the latest version is 7.1.0-c65, so download that version:curl -X GET 'https://<firewall>/api/?type=op&cmd=<request><system><software><download><version>7.1.0-c65</version></download></software></system></request>&key=<apikey>'Use the jobid in the response to ensure that the system update download completes successfully:curl -X GET 'https://<firewall>/api/?type=op&cmd=<show><jobs><id>318</id></jobs></show>&key=<apikey>'The response should include the following:<response status="success">…Install the latest PAN-OS software update.To install the latest system update, include the version in a software install request:curl -X GET 'https://<firewall>/api/?type=op&cmd=<request><system><software><install><version>7.1.0-c65</version></install></software></system></request>&key=<apikey>'Check on the software installation status.Use thejobidin the response to ensure that the system update installs successfully:curl -X GET 'https://<firewall>/api/?type=op&cmd=<show><jobs><id>320</id></jobs></show>&key=<apikey>'The response should include the following:<response status="success">…Reboot the firewall.After the system update installs successfully, trigger:curl -X GET 'https://<firewall>/api/?type=op&cmd=<request><restart><system></system></restart></request>&key=<apikey>'
Recommended For You
Recommended Videos
Recommended videos not found.