API - Listing Device Group Addresses by Location

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

API - Listing Device Group Addresses by Location

L2 Linker

Hi all,

 

In exploring the XML API, I have come across a stumbling block.

 

What I'm attempting to sort out is under the Objects tab > Addresses in the side panel.

 

I have some addresses as Shared, and others that are not shared objects and specific to a location. What I'm ultimately wanting to do is query just the objects that are not shared versus ones that are, and do some data comparisons.

 

There didn't seem to be a clear way to do this via the API for non-shared objects, but I can get shared objects through an HTTP GET like:

https://my.panorama.domain/api/?type=config&action=get&xpath=/config/shared/address&key=MYAPIKEY

Is there a similar means of getting that information for non-shared objects specific to a device group location?

 

Any pointers would be greatly appreciated!

 

 

1 accepted solution

Accepted Solutions

L4 Transporter

The shared address objects are found under that path. The other objects would be found under the path for the vsys they correspond to (in a single-vsys environment, it would be vsys1). For example:

 

/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address

would be the xpath for address objects in vsys1.

View solution in original post

3 REPLIES 3

L4 Transporter

The shared address objects are found under that path. The other objects would be found under the path for the vsys they correspond to (in a single-vsys environment, it would be vsys1). For example:

 

/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address

would be the xpath for address objects in vsys1.

So if you're not using vsys there's no other method of getting that information programmatically?

 @nigelswift, I realized the @[name='vsys1'] could just be any device group name. Was a bit confused at first.

 

Nonetheless, really appreciate your help!

  • 1 accepted solution
  • 3997 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!