Palo Alto REST API - test security-policy-match

L0 Member

Palo Alto REST API - test security-policy-match


I have been trying using the command "test security-policy-match" with REST API. I do get a proper response, but i'm missing some valuable information.

From the CLI i get the following response:
admin@KAS-PaloAlto> test security-policy-match from KAS- zone-1 to KAS-zone-2 source destination protocol 1


Ping {
from KAS-zone-1;
source-region none;
to KAS-zone-2;
destination-region none;
user any;
category any;
application/service any/any/any/any;
action allow;
icmp-unreachable: no
terminal yes;


When i use the following API:


I get the following response:

<response cmd="status" status="success">

As you see i dont get the information within the brackets, like in the CLI.

Any suggestions?

L4 Transporter

Re: Palo Alto REST API - test security-policy-match

That additional data in brackets represets the configuration of the security rule. It is pulled via a seperate API call and displayed on the CLI, but when using the API you have to make that API call yourself. For example, this would pull the same information about the rule:




<response status="success" code="19">
<result total-count="1" count="1">
<entry name="Ping">
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!