- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
10-12-2015 11:42 AM - edited 10-14-2015 08:21 AM
I am retrieving URL log entries via the XML API. I can successfully get logs when I skip none, but when I try to skip a larger number (for example, 5000), the firewall replies with error 17 "skip value too large".
<response status="error" code="17"><msg><line>skip value too large</line></msg></response>
There is no limit according to the Retrieving Logs section of the PAN-OS XML API Usage Guide (section 2.8) - and it seems implied that you can use this to retrieve additional sets of logs (since the max number of logs is limited to 5000).
An example of the HTTP request I use is:
https://hostname/api/?type=log&key=changeme&log-type=url&query=((action+eq+block-url)+or+(action+eq+block-continue)+or+(action+eq+alert))+and+(receive_time+geq+'2015%2F10%2F05+00%3A00%3A00')+and+(receive_time+leq+'2015%2F10%2F06+00%3A00%3A00')&nlogs=4999&skip=4999
As far as I can tell, I am using the skip parameter - is there a bug with the API, or am I using the skip value incorrectly? I need a way to pull the logs into my script (without having to manually download them into CSV).
Update: I did some experimentation to figure out where the exact cutoff point is for the skip value - it appears to be occurring when the skip value hits 1102.
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!