Having trouble with panxapi

L1 Bithead

Having trouble with panxapi

,

hello,

I'm experiencing an issue with panxapi where it returns a success code (19), but the result is actually not being received.  I'm using the -x and -g options to try and pull back the pre-rulebase on my panorama for a specific device group.

The xpath works in the API browser, but when I apply the same to the panxapi command I get nothing back.

Here is that xpath:

panxapi <hostname and key hidden to protect the innocent> -x -g /config/devices/entry[@name='localhost.localdomain']/device-group/entry[@name='device group name']/pre-rulebase/rules

Any help is appreciated... here's the output I get at the CLI:

get: success

<response status="success" code="19"><result/></response>

L1 Bithead

Re: Having trouble with panxapi

You will want double quotes around the xpath otherwise the single quotes will be eaten by the shell.

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!