: Asynchronous and Synchronous Requests to the PAN-OS XML API
Focus
Focus

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 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/?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>