Adding device serial number to Panorama with API

L2 Linker

Adding device serial number to Panorama with API

I am trying to add a PA-VM to the Panorama using the Panorama API.

 

I try:

 

https://1.0.20.30.40//api/?key=LUFRPT0zAndSoOnAndSoOnAndSoOn=&type=config&action=set&xpath=/config/devices/entry[@name='all']&element=<serial>12345678012345</serial>

 

and I get :

 

StatusCode : 200
StatusDescription : OK
Content : <response status="error" code="12"><msg><line>At most 1 occurrence is allowed for devices/entry</line></msg></response>

 

 

To show devices the the commad is:

 

/api/?type=op&cmd=<show><devices><all></all></devices></show>

or

/api/?type=op&cmd=<show><devices><connected></connected></devices></show>

 

What is the correct API call to add a serial number to the Panorama?

 

thanks

Roger

 

 

 

 

L2 Linker

Re: Adding device serial number to Panorama with API

Getting closer, but not quite

 

api/?type=config&action=set&key=LUFRPT0zAndSoOnAndSoOnAndSoOn&xpath=/config/mgt-config/devices/entry/[@name='12345678012345']

 

<response status="error" code="12">
<msg>
<line>Invalid target object in set handler</line>
</msg>
</response>
 
any ideas? Thanks
L2 Linker

Re: Adding device serial number to Panorama with API

L7 Applicator

Re: Adding device serial number to Panorama with API

@RogerMccarrick,

Just FYI, and I forget to do it often as well, but when passing along API values you should put it in a Code box. This stops Live from auto-formating the API request as an actual hyperlink, which often breaks longer URLs and makes it difficult for people to see what they should actually be using. 

;-) 

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!