Asynchronous and Synchronous Requests to the PAN-OS XML API

Most PAN-OS XML API requests are synchronous, meaning the response immediately provides the requested data. For example, when you Make Your First API Call and request system information, the API response is immediate and contains information such as the IP address, hostname, and model of your firewall.
However, there are some Request Types that require more time to process and are asynchronous, meaning they require more than one request to get final results. These API requests include the following:
With asynchronous requests, you first initiate a request. The API responds with a job ID while it processes your request. In your subsequent requests, you use this job ID to check on the results of your original request.
Examples (replace jobid with the actual job ID):
  • Get reports:
    https://firewall/api/?type=report&action=get&job-id=jobid
    Code copied to clipboard
    Unable to copy due to lack of browser support.
  • Retrieve logs:
    https://firewall/api/?type=log&action=get&job-id=jobid
    Code copied to clipboard
    Unable to copy due to lack of browser support.
  • Export technical support data:
    https://firewall/api/?type=export&category=tech-support&action=get&job-id=jobid
    Code copied to clipboard
    Unable to copy due to lack of browser support.
  • Commit:
    https://firewall/api/?type=op&cmd=<show><jobs><id>jobid</id></jobs></show>
    Code copied to clipboard
    Unable to copy due to lack of browser support.
  • Operational commands:
    https://firewall/api/?type=op&action=get&job-id=jobid
    Code copied to clipboard
    Unable to copy due to lack of browser support.

Related Documentation