PAN-OS - View Pending Changes from CLI and API
How to view candidate configuration from PAN-OS CLI and API
> configure
> set mgt-config users devtooler-admin password
> set mgt-config users devtooler-admin permissions role-based superuser yes
> show config list changes
xpath: /config/mgt-config/users/entry[@name='devtooler-admin']
owner: admin
action: EDIT CREATE
other admins:admin
dirty id:1
prev dirty id:0
View via CLI
> show config diff
}
}
}
+ devtooler-admin {
+ phash **************;
+ permissions {
+ role-based {
+ superuser yes;
+ }
+ }
+ }
}
}
shared {
@@ -67,6 +75,1596 @@
View via API
> curl -k --location -g --request GET "https://<ip/hostname>/api/?type=config&action=get&xpath=/config/mgt-config/users/entry[@name='devtooler-admin']&key=<Token Here>"
<response status="success" code="19">
<result total-count="1" count="1">
<entry name="devtooler-admin" admin="admin" dirtyId="1" time="2022/07/20 12:21:28">
<phash admin="admin" dirtyId="1" time="2022/07/20 12:20:38">*****************</phash>
<permissions admin="admin" dirtyId="1" time="2022/07/20 12:21:28">
<role-based admin="admin" dirtyId="1" time="2022/07/20 12:21:28">
<superuser admin="admin" dirtyId="1" time="2022/07/20 12:21:28">yes</superuser>
</role-based>
</permissions>
</entry>
</result>
</response>