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
- The default query in PAN-OS 9.0.x will return only 100 entries.
- To get specific number of entries, use newly introduced num record parameter
- 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
- 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
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