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

API to tag shared policy

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

API to tag shared policy

L1 Bithead

We have few shared policy and need to tag and disable them . Please help me with API deatails

4 REPLIES 4

L4 Transporter

Hello @Shruthi123 

 

You may check the REST-API documentation to understand how an existing policy can be edited to include a tag and to disable it.

The rest-api documentation is available at: https://x.x.x.x/restapi-doc (where x.x.x.x is your device IP).

 

 

Anoopkumar
Network Security Engineer

Cyber Elite
Cyber Elite

@Shruthi123 ,

If you use the API browser (https://<firewall>/api) it'll give you the actual XPath and complete API URL that you'll need to make the change. Easiest way to get the calls that you'll need to make in your actual environment instead of us giving you a generic call. 

 

Example to get you started: 

https://<ip>/api/?type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='<rule-name>']&element=<disabled>yes</disabled>

 

@BPry

 

can you please help me for xpath that is specific for "Shared policy". I have tagged & disabled device-group Policies but facing issue while tagging and disables "Shared Policy".

 

Xpath used for "device-group" policy = 

 
Shruthi123_0-1694693357305.png

 

 
Can you please help me with xpath of Shared policy?
 

L4 Transporter

@Shruthi123 

The xpath for shared policy is :

/config/shared/pre-rulebase/security/rules/entry[@name='policy-name']

 You may easily verify it by going into the API documentation -  https://<ip>/api (IP = your Firewall/Panorama IP)

Anoopkumar
Network Security Engineer
  • 812 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!