PCNSE Panorama API Practice Question
A team uses the Panorama API to generate custom reports. They need to retrieve a list of all rules that have logging at session end enabled. Which API endpoint should be used?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
GET /api/?type=config&action=get&xpath=/config/devices/entry/vsys/entry/rulebase/security/rules
The Panorama API endpoint GET /api/?type=config&action=get&xpath=/config/devices/entry/vsys/entry/rulebase/security/rules retrieves the XML configuration of all security rules. Under each rule, the 'log-start' and 'log-end' elements indicate logging settings. To find rules with logging at session end enabled, one would check for the presence of a 'log-end' element with value 'yes'. Option B is incorrect because it attempts to run an operational command to show logs, not retrieve rule configuration. Option C retrieves log forwarding profiles, not rules. Option D runs a predefined report, which is not suitable for retrieving rule-specific logging settings.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
GET /api/?type=config&action=get&xpath=/config/devices/entry/vsys/entry/rulebase/security/rules
Why this is correct
This xpath retrieves security rules, including the log-end attribute.
- ✗
GET /api/?type=op&cmd=<show><log></log></show>
Why it's wrong here
This is an operational command to show logs, not to list rules.
- ✗
GET /api/?type=config&action=get&xpath=/config/shared/log-settings
Why it's wrong here
This retrieves log forwarding profiles, not security rules.
- ✗
GET /api/?type=report&reporttype=predefined
Why it's wrong here
This runs a predefined report, not a custom query for rules.
Go deeper
Related to this question
About these practice questions
This PCNSE question is part of Courseiva's 504-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCNSE practice question is part of Courseiva's free Palo Alto Networks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCNSE exam.