XML User API (using wget)~

L3 Networker

XML User API (using wget)~

Hi everyone

customer requested me for User XML

The device is 5.0.4 and There is no need to middleway server

PAN 5.0.x can receive restAPI directly

I do not make program properly

so I thought that I utilzed wget software

My labtop enviroment is Windows 7

There is simple wget.exe[win] in internet site

I received unique key in advance

wget --no-check-certificate " name="zero-200" ip="" timeout="20"></entry></login></payload></uid-message>" --output-document=pan-cfg.xml

response message saved pan-cfg.xml

I check message;;

open xml file

이미지 2.png

이미지 1.png

I don't understand that mean


When I inserted url box in web-browsing name="zero-200" ip="" timeout="20"></entry></login></payload></uid-message>

success!! no error

이미지 4.png

이미지 3.png

syntax do not support in wget?

[/, <, " etc..] ---> reason?

Why is this?

How can i solve this problem?

lately I tested utilzed wget software that made download running-config.xml

no error!

L0 Member

Re: XML User API (using wget)~


The problem is you have the URL wrapped in double quotes, but you also have double quotes within the URL, so wget sees the first double quote (just before zero-200) as the end of your message.  This is why the error from the Palo box is saying the end tags for payload and uid-message are not found.

To fix this you should just need to change each double quote in your URL for %22 (the encoded version) and it should work, e.g. (key shortened for ease of reading and changes in bold):<uid-message><version>1.0</version><type>update</type><payload><login><entry name=%22zero-200%22 ip=%22172.16.0.200%22 timeout=%2220%22></entry></login></payload></uid-message>" --output-document=pan-cfg.xml

Really all of the spaces and angle brackets could do with encoding too, but it doesn't seem to be complaining about them, if you want to space is %20, < is %3c and > is %3e


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!