GET VS POST

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

GET VS POST

Not applicable

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??

2 REPLIES 2

L3 Networker

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.

Thanks, That did it

  • 2593 Views
  • 2 replies
  • 0 Likes
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!