Help with create api call

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

Help with create api call

L3 Networker

Despite me reading alot of documentation i have not really understood this.

 

Im trying to add a device in panorama, so i run this command from the cli.

 

 

set mgt-config devices 1234555 hostname 1234

 

This gives me the following output.

 

 (container-tag: mgt-config container-tag: devices container-tag: entry key-tag:                                                                            name value: 1234555 leaf-tag: hostname value: 1234) 
((eol-matched: . #t) (xpath-prefix: . /config) (context-inserted-at-end-p: . #f)                                                                           ) 
(mgt-config (devices (entry (@ (name 1234555)) (hostname 1234)))) 
(hostname 1234) 


<request cmd="set" obj="/config/mgt-config/devices/entry[@name='1234555']" cooki 
e="5357976790132914"><hostname>1234</hostname></request> 


2018-11-09 16:35:03 
<response status="success" code="20"><msg>command succeeded</msg></response> 
 
So when i try to create a request of this it looks like this (if i take the url)
 
This give me a "error 12"
 
If i use the api browser it gives me a get command, but i want to add a new device. Any ideas?
2 REPLIES 2

L3 Networker

I found this, however as  BPry points out, the user dont put the answer in code box, so i still dont know the answer 🙂

https://live.paloaltonetworks.com/t5/General-Topics/Adding-device-serial-number-to-Panorama-with-API...

 

According to that other post, looks like at the end of the code they are adding

devices&element=<entry>@name="SerialNumber"</entry>

 

Have you tried that or some variation of that?

  • 2834 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!