Error:
An unexpected error occurred. Please click Reload to try again.
Error:
An unexpected error occurred. Please click Reload to try again.
Why does the API query to the EDL return only 100 entries inste... - Knowledge Base - Palo Alto Networks

Why does the API query to the EDL return only 100 entries instead of the entire list?

5709
Created On 09/28/20 07:31 AM - Last Modified 02/02/23 04:21 AM


Question


Why does the API query to the EDL return only 100 entries instead of the entire list?

Details
  • PAN-OS Upgraded to 9.0.x
  • API query to list EDL returns only 100 entries
  • The same query would return all entries on 8.1.x


Environment


  • Palo Alto Firewalls
  • PAN-OS upgrade to 9.0.x
  • External Dynamic List (EDL) configured.


Answer


  1. The default query in PAN-OS 9.0.x will return only 100 entries.
  2. To get specific number of entries, use newly introduced num record parameter 
  3. This is similar behavior in the CLI command as well. See below. 
request system external-list show type predefined-ip name panw-known-ip-list

panw-known-ip-list
        Total valid entries     : 614
        Total ignored entries   : 0
        Total invalid entries   : 0
        Total displayed entries : 100
New parameter "num record" can be used to customize the no. of displayed entries.
request system external-list show type predefined-ip num-records 500 name panw-known-ip-list

panw-known-ip-list
        Total valid entries     : 614
        Total ignored entries   : 0
        Total invalid entries   : 0
        Total displayed entries : 500
  1. Same parameter can be used in the API query by adding <num-records>x</num-records> where x is the no. of entries required. 
Example API call without num record:
https://NGFW-IP/api/?type=op&cmd=<request><system><external-list><show><type><predefined-ip><name>panw-known-ip-list</name></predefined-ip></type></show></external-list></system></request>&key=key
 
XMLAPIcallwithoutNumRecord

API call with num record for 500 entries 
https://NGFW-IP/api/?type=op&cmd=<request><system><external-list><show><type><predefined-ip><num-records>500</num-records><name>panw-known-ip-list</name></predefined-ip></type></show></external-list></system></request>&key=key
XMLAPICallwithNumRecord
 


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000HAuUCAW&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language