Skip Value to Large Error from XML API

Reply
L1 Bithead

Skip Value to Large Error from XML API

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.

Tags (1)
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!