API - Listing Device Group Addresses by Location

Reply
Highlighted
L2 Linker

API - Listing Device Group Addresses by Location

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!

 

 

L4 Transporter

Re: API - Listing Device Group Addresses by Location

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.

L2 Linker

Re: API - Listing Device Group Addresses by Location

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

L2 Linker

Re: API - Listing Device Group Addresses by Location

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

 

Nonetheless, really appreciate your help!

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!