- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
10-27-2022 10:05 AM
Hi there,
Has any one been able to successfully use the XML API to query the predefined EDL lists and have the ENTIRE list returned back in the response?
When I attempt to query say the panw-torexit-ip-list, the XML response only returns using this command:
https://<firewall>/api/?REST_API_TOKEN=**********&type=op&cmd=%3Crequest%3E%3Csystem%3E%3Cexternal-list%3E%3Cshow%3E%3Ctype%3E%3Cpredefined-ip%3E%3Cname%3Epanw-torexit-ip-list%3C%2Fname%3E%3C%2Fpredefined-ip%3E%3C%2Ftype%3E%3C%2Fshow%3E%3C%2Fexternal-list%3E%3C%2Fsystem%3E%3C%2Frequest%3E
I only get one member returned:
Here is the XML syntax that i'm using:
<request><system><external-list><show><type><predefined-ip><name>panw-torexit-ip-list</name></predefined-ip></type></show></external-list></system></request>
I've attempted to query this EDL from the CLI on the firewall and the entire EDL is returned... I'm just not able to get the entire list returned via API.
Thank you,
Michael
11-24-2022 04:27 AM
Hi @mslavens ,
I'm not seeing the same thing on my lab so I'm not sure why it's happening like this for you.
That being said, I notice in your reply that the total-count=1257 and the count=1 ... which is why it only returns 1 line for you.
I'm not sure why the count=1 in your case but you can manually change this value using the <num-records> tags.
Try this:
<request><system><external-list><show><type><predefined-ip><name>panw-torexit-ip-list</name><num-records>1257</num-records></predefined-ip></type></show></external-list></system></request>
If the number of IP addresses changes you'll have to change the num-records value as well so it's not ideal.
Hope this helps.
-Kiwi.
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!