Asynchronous and Synchronous Requests to the PAN-OS XML API
Focus
Focus
Next-Generation Firewall

Asynchronous and Synchronous Requests to the PAN-OS XML API

Table of Contents

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 and 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. When a request is sent to the server, the application doesn't pause and wait for a response—instead, it continues running normally while the request processes in the background. Synchronous requests are ideal for quick operations where immediate data is needed. However, asynchronous operations provide significant performance advantages for time-intensive tasks, preventing interface blocking and improving user experience. Instead of waiting for completion, you can receive a job ID that can be used to check status later.
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/?key=apikey&type=report&action=get&job-id=jobid
  • Retrieve logs:
    https://<firewall>/api/?key=apikey&type=log&action=get&job-id=jobid
  • Export technical support data:
    https://<firewall>/api/?key=apikey&type=export&category=tech-support&action=get&job-id=jobid
  • Commit:
    https://<firewall>/api/?key=apikey&type=commit&cmd=<commit></commit>
  • Operational commands:
    https://<firewall>/api/?key=apikey&type=op&cmd=<show><jobs><id>jobid</id></jobs></show>