Custom Reports
Table of Contents
Expand all | Collapse all
-
- Upgrade a Firewall to the Latest PAN-OS Version (API)
- Show and Manage GlobalProtect Users (API)
- Query a Firewall from Panorama (API)
- Upgrade PAN-OS on Multiple HA Firewalls through Panorama (API)
- Automatically Check for and Install Content Updates (API)
- Enforce Policy using External Dynamic Lists and AutoFocus Artifacts (API)
- Configure SAML 2.0 Authentication (API)
- Quarantine Compromised Devices (API)
- Manage Certificates (API)
-
- Asynchronous and Synchronous Requests to the PAN-OS XML API
- Run Operational Mode Commands (API)
- Apply User-ID Mapping and Populate Dynamic Groups (API)
- Get Version Info (API)
-
- PAN-OS REST API
- Access the PAN-OS REST API
- Resource Methods and Query Parameters (REST API)
- PAN-OS REST API Request and Response Structure
- PAN-OS REST API Error Codes
- Work With Objects (REST API)
- Create a Security Policy Rule (REST API)
- Work with Policy Rules on Panorama (REST API)
- Create a Tag (REST API)
- Configure a Security Zone (REST API)
- Configure an SD-WAN Interface (REST API)
- Create an SD-WAN Policy Pre Rule (REST API)
- Configure an Ethernet Interface (REST API)
- Update a Virtual Router (REST API)
- Work With Decryption (APIs)
Custom Reports
For custom reports, the selection criteria,
such as time frame, group-by, and sort-by are part of the report
definition. The API returns any shared custom reports. Note that
quotes are not required around the report name and any spaces in
the report name must be URL encoded to%20.
For
custom reports created in a specific VSYS, you can retrieve them
directly by specifying thevsys parameters.
- Retrieve the report definition from the configuration:curl -X POST 'https://firewall/api?type=config&action=get&xpath=/config/devices/entry/vsys/entry[@name='vsys1']/reports/entry[@name='report-abc']"
- Create a job to retrieve a dynamic report usingreporttype=dynamic,reportname=custom-dynamic-report, andcmd=report-definition wherereport-definition is the XML definition retrieved in the previous query:
curl -X POST 'https://firewall/api?type=report&reporttype=dynamic&reportname=custom-dynamic-report&cmd=<type><appstat><aggregate-by><member>category-of-name</member><member>technology-of-name</member></aggregate-by></appstat></type><period>last-24-hrs</period><topn>10</topn><topm>10</topm><query>(name+neq+'')AND(vsys+eq+'vsys1')</query>"The response includes the job ID you can use to view the results:<response status="success"> <result> <msg> <line>Report job enqueued with jobid 6</line> </msg> <job>6</job> </result> </response>- View the dynamic report:
curl -X POST 'https://firewall/api?type=report&action=get&job-id=jobid" - Create a job to retrieve a dynamic report usingreporttype=dynamic,reportname=custom-dynamic-report, andcmd=report-definition wherereport-definition is the XML definition retrieved in the previous query: