GET VS POST

Reply
Not applicable

GET VS POST

So I am trying to use the API to upload a custom-url-category, and my problem is that I have exced the length restriction of a HTML GET, So I tried doing a HTML PUT.

curl --insecure --form "type=config" --form "action=edit" --form "xpath=$xpath" --form "element=$element" --form "key=$pkey" "https://$panorama/api/"

But, I get 502 Bad Gateway - Does the PAN xml-api only GET??

L3 Networker

Re: GET VS POST

you should be using --data and --data-urlencode vs. --form.  URL-encode

everything except the key= parameter.

also see https://live.paloaltonetworks.com/message/16433#16433.

that will work with either the Perl or Python panxapi program.

Highlighted
Not applicable

Re: GET VS POST

Thanks, That did it

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!