API log export hard-coded to a 20 entry limit?


ATTENTION Customers, All Partners and Employees: The Customer Support Portal (CSP) will be undergoing maintenance and unavailable on Saturday, November 7, 2020, from 11 am to 11 pm PST. Please read our blog for more information.

L2 Linker

API log export hard-coded to a 20 entry limit?

In panorama 5.1.5 code, I'm attempting to pull down traffic logs for analysis of application type vs rule.  My query is structured like this:


Which gives me a success return, along with "query job enqueued with jobid 181"

When I query the results using


I'm only getting 20 results - although there are many, many more entries in the logs.  Is this a hard-coded limit on results?  Is there a way around it?

L1 Bithead

20 is the default, but this is customizable up to 5000 using nlogs.  Use the following format:

https://<firewall>/api/?type=log&log-type=<type>&nlogs=<number of logs to return>&query=<URL encoded query parameters>&key=<API key>

You can use additional modifiers outlined in the API guide to start 5000 logs back and pull the previous 5000 logs.  You can continue doing this until all of the logs of interest are pulled.

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!

The Live Community thanks you for your participation!