Is there any difference in the syntax of the security rule set command using the API between 9.1 and 10.2?

Is there any difference in the syntax of the security rule set command using the API between 9.1 and 10.2?

2573
Created On 06/16/23 00:28 AM - Last Modified 07/23/24 21:19 PM


Question


Is there any difference in the syntax of the security rule set command using the API between 9.1 and 10.2?

Environment


  • PA-Series Next-Generation Firewall
  • PAN-OS 9.1, 10.2
  • XML API


Answer


There are differences in the rule set between PAN-OS 9.1 and 10.2.
Example given below

PAN-OS 9.1: 
  • Specify with one hip-profile tag.
[HIP tag]
<hip-profiles><member>any</member></hip-profiles>
[Example]
curl https://[WebUIIP]/api/? --data "key=[Key]&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='rule1']&element='<to><member>any</member></to><from><member>any</member></from><source><member>any</member></source><destination><member>any</member></destination><source-user><member>any</member></source-user><category><member>any</member></category><application><member>any</member></application><service><member>any</member></service><action>allow</action><hip-profiles><member>any</member></hip-profiles>'"

PAN-OS 10.2:
  • It is specified by two hip-profile tags, source and destination.
[HIP tags]
<source-hip><member>any</member></source-hip><destination-hip><member>any</member></destination-hip>
[Example]
curl https://[WebUIIP]/api/? --data "key=[Key]&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='rule1']&element='<to><member>any</member></to><from><member>any</member></from><source><member>any</member></source><destination><member>any</member></destination><source-user><member>any</member></source-user><category><member>any</member></category><application><member>any</member></application><service><member>any</member></service><action>allow</action><source-hip><member>any</member></source-hip><destination-hip><member>any</member></destination-hip>'"


 


Additional Information


Note: This is one specific command. Other commands may vary as well. Refer to the API documentation for specific versions.

Get Started With The PAN-OS XML-API version 9.1

Get Started With The PAN-OS XML-API version 10.2
 



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000kI6oCAE&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language