application filter (and groups) with PanRest API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

application filter (and groups) with PanRest API

Not applicable

Hi all,

I'm trying to retrieve applcation filters and groups with the pan rest api, same way it can be retrieved with the cli:

show vsys <vsys-name> application-filter

Thanks,

Andrei

1 accepted solution

Accepted Solutions

This was successful on my end.

https://ip/esp/restapi.esp?type=config&action=get&key=<key>&xpath=/config/devices/entry/vsys/entry/application-filter

<response status="success" code="19"><result total-count="1" count="1"><application-filter><entry name="hitatchi"><category><member>general-internet</member></category><subcategory><member>file-sharing</member></subcategory><technology><member>peer-to-peer</member></technology><evasive>yes</evasive><excessive-bandwidth-use>yes</excessive-bandwidth-use><prone-to-misuse>yes</prone-to-misuse><transfers-files>yes</transfers-files><used-by-malware>yes</used-by-malware><has-known-vulnerabilities>yes</has-known-vulnerabilities><pervasive>yes</pervasive></entry><entry name="test-fileshare"><category><member>general-internet</member></category><subcategory><member>file-sharing</member></subcategory><technology><member>browser-based</member><member>peer-to-peer</member></technology></entry></application-filter></result></response>

View solution in original post

4 REPLIES 4

L6 Presenter

Hi,

Here are several resources for your reading pleasure. Hope this helps.

https://live.paloaltonetworks.com/docs/DOC-1031

https://live.paloaltonetworks.com/docs/DOC-1583

-Renato

Problem is that the application-filter and application-groups objects do not appear in the query which retrieves all configuration.

I tried a specific xpath query such as the one that rerieves predefined apps: https://<ip>/esp/restapi.esp?key=<key>&type=config&action=get&xpath=/config/predefined/application similar to cli: show predefined application

I tried queries such as: xpath=/config/vsys/<vsys-name>/application-filter

or even just : xpath=/config/vsys/

But nothing works Smiley Sad. I'm still looking for a way to retrieve that objects.

This was successful on my end.

https://ip/esp/restapi.esp?type=config&action=get&key=<key>&xpath=/config/devices/entry/vsys/entry/application-filter

<response status="success" code="19"><result total-count="1" count="1"><application-filter><entry name="hitatchi"><category><member>general-internet</member></category><subcategory><member>file-sharing</member></subcategory><technology><member>peer-to-peer</member></technology><evasive>yes</evasive><excessive-bandwidth-use>yes</excessive-bandwidth-use><prone-to-misuse>yes</prone-to-misuse><transfers-files>yes</transfers-files><used-by-malware>yes</used-by-malware><has-known-vulnerabilities>yes</has-known-vulnerabilities><pervasive>yes</pervasive></entry><entry name="test-fileshare"><category><member>general-internet</member></category><subcategory><member>file-sharing</member></subcategory><technology><member>browser-based</member><member>peer-to-peer</member></technology></entry></application-filter></result></response>

Thanks it works!

  • 1 accepted solution
  • 2819 Views
  • 4 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!