rest API rule modification with Panorama

Not applicable

rest API rule modification with Panorama

Hello, and thanks for whatever help you can provide.

I am trying to create a script that will modify one rule from enable to disable and back again via wget. I created a admin user on the panorama box, created a hash based on that user and password. when I run the script I get the following:

<response status="error" code="13"><msg><line>Could not find schema node for xpath /config/devices/entry[@name='local.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='Dana Test']</line></msg></response>

the wget is below:

wget --no-check-certificate "<hash>=&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rule

s/entry[@name='Dana Test']&element=<disabled>yes</disabled>" --no-http-keep-alive -O output

wget --no-check-certificate "<commit-all><shared-policy><device-group>"Edge Firewall"</device-group></shared-policy></commit-all>&key=<hash>=" --no-http-keep-alive -O output

cat output

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!