Get Application Tags via API

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

Get Application Tags via API

L1 Bithead

I was wondering if there is actually a way to use the API to get the tags that an Application may have. I have gone through the documentation and there's API calls to get the Applications, Application Groups, and Application Filters themselves, but nothing that I found that would get the members of a Filter or Group or at the very least what tags an Application has on it. We currently have our environment split between Prisma Access managed by Strata Cloud Manager and on-premise Palo firewalls managed by Panorama. I want to make it as easy as possible to keep certain parts of those configurations synced, for example the rules that allow outbound internet access.

 

Looking at the documentation it doesn't even look like you can edit an Application's tag via the API. So, my question is am I missing something or is this functionality that just isn't present at the moment?

 

Prisma Access Strata Cloud Manager Panorama 

1 REPLY 1

Cyber Elite

Hi @cmorris8990 ,

 

If your list of tags does not need to be automated, you can simple click on PDF/CSV under Device Groups > Objects > Applications.  You will get a list of all applications and tags.

 

If you need to use the API, you just have to use the API Browser to find the path that you want. Every function of the API is not documented.  For example, you can list all applications with this URL: https://{{hostname}}.{{domain}}/api/?type=config&action=get&xpath=/config/predefined/application.

 

With that list you can parse through the XML <tag minver="9.1.0"> sections and determine all the tags for each application.  I think user added tags are located in a different XPath.  Check out this post -> https://live.paloaltonetworks.com/t5/general-topics/how-to-get-applications-using-xml-api/td-p/28058....  He has the Panorama XPaths on the bottom.

 

Thanks,

 

Tom

Help the community: Like helpful comments and mark solutions.
  • 699 Views
  • 1 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!