Enhanced Security Measures in Place:   To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.

Adding device serial number to Panorama with API

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

Adding device serial number to Panorama with API

L2 Linker

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

 

 

 

 

1 accepted solution

Accepted Solutions
3 REPLIES 3

L2 Linker

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

@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. 

😉 

  • 1 accepted solution
  • 4077 Views
  • 3 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!