PAN-OS has a very comprehensive XML API, and you'll find under the hood that the PAN-OS web GUI itself uses this API (try browsing to https://yourdevice/debug and have a look around).

In 2019, I'd recommend that your automation efforts should focus on Terraform and Ansible to achieve your objectives, or if you're using Python or Perl then use the relevant assistance (e.g. the Python toolset or the Perl package).

However, there are occasions like testing or development where a quick shell script is preferable, and for this you may want to call the PAN-OS XML API directly. There is plenty of documentation for the XML API, but as an addendum, I've started collating useful examples of API calls. You can find them here: