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

Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

L2 Linker

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 LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!