- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
02-25-2022 08:50 PM
set audit-comment comment "paul manual edit" xpath
'/api/?type=config&action=get&xpath=/config/devices/entry[@name='localhost.localdomain']/device-group/entry[@name='paul']/pre-rulebase/security/rules/entry[@name='paul-feb-24']'
From Panorama -> Management tab
With enabled "Require audit comment on policies", I keep getting this Error message:
OrderedDict([('response', OrderedDict([('@status', 'success'), ('@code', '13'), ('msg', \"Audit comments are missing for policy configuration being committed. Please add audit comments and try again.\\nList of xpaths:\\n/config/devices/entry/device-group/entry[@name='paul']/pre-rulebase/security/rules/entry[@name='paul-audit-comment-create-feb-24']\\n/config/devices/entry/device-group/entry[@name='paul']/pre-rulebase/security/rules/entry[@name='paul-feb-24']\")]))]) "
Commit API calls will still fail with the error message I post above.
Any help is greatly appreciated.
03-04-2022 04:29 AM
Hi @HermanEdwards, yes, per the other thread, the localhost.localdomain is required. You will see it in the XML config file, in the API explorer, and other observable places (debugs, etc). I have requested that the documentation is changed to reflect this.
02-25-2022 09:12 PM
Update
Follow-up: While reading through XML API, some endpoints include Device entry name and some don't.
If anyone know when the Device entry name should be ignored, please feel free to share.
For more info, examples where Device entry name gets ignored can be found at https://docs.paloaltonetworks.com/pan-os/8-1/pan-os-panorama-api/pan-os-xml-api-request-types/config...
So far, when editing the config of a Policy rule, I believe a device entry name should always be specified. This is b/c API explorer always shows it.
03-04-2022 04:29 AM
Hi @HermanEdwards, yes, per the other thread, the localhost.localdomain is required. You will see it in the XML config file, in the API explorer, and other observable places (debugs, etc). I have requested that the documentation is changed to reflect this.
04-04-2022 05:14 PM
just my two cents here. The audit comment feature is very buggy and there are / have been a number of issues with it. If you are looking to use it as an a way for auditing change, you may be better suited to look to something outside of this feature. We're told things are fixed in some newer releases but we've hit a number of issues.
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!