XML API response for predefined EDL only returns 1 value instead of the entire list

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

XML API response for predefined EDL only returns 1 value instead of the entire list

L1 Bithead

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:

 

<response status="success">
<result total-count="1257" count="1">
<external-list>
<valid-members>
<member>2.58.56.101</member>
</valid-members>
</external-list>
</result>
</response>

 

 

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

1 REPLY 1

Community Team Member

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.

 
LIVEcommunity team member, CISSP
Cheers,
Kiwi
Don't forget to hit that Like button if a post is helpful to you!
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 LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!