Pulling reports using the XML API

by 2 weeks ago - last edited 2 weeks ago (811 Views)

Network and security admins usually spend their days putting out fires and fixing problems. Scripts and automated tasks are our little helpers that ensure that at the end of the day, we managed to clear the important tasks even though we were interrupted 5 thousand times because 'the firewall broke something' again.

 

Jobs need to be run, backups need to be taken and reports need to be created.

 

In this video tutorial, Jason Yates from the Global Enablement Team shows you how to access the API interface, which options are available, how the XML API works and how to leverage the API to fetch reports.

 

 

Some key commands and pointers:

 

  • Create a separate admin account for the API access with an appropriately restrictive admin role
  • Generate an API key
    https://<hostname>/api/?type=keygen&user=<username>&password=<password>
  • Add the key to the GET command
    https://<hostname>/api/?type=report&reporttype=predefined&reportname=<ReportName>&key=<APIkey>

 

Why not make your life a little easier? Feel free to leave a comment or ask a question in the comments below.

 

Reaper out!

Comments
by James.Christian
2 weeks ago

Excellent video Jason. Thanks.

by networkzeus
a week ago

Hi Jason,

 

Great video!

 

Out of interest what software/application  do you recommend importing the XML code into to view the reports?

 

I'm just after something simple to set up in a lab fairly quickly to see how I could use the reports in a single pain of glass.

 

Thanks

 

NetworkZeus

Ask Questions Get Answers Join the Live Community
Announcements
Customer Notice: Panorama Certificate Expiration on June 16 2017.  Read More >