An automation engineer is writing a Python script to interact with the Palo Alto Networks XML API. The script needs to authenticate and retrieve the running configuration from Panorama. Which initial API request parameter is required to generate a valid API key?
The keygen request type is the only mechanism that exchanges credentials for an API key, which every subsequent XML API call requires. Passing 'user' and 'password' to type=keygen returns a key tied to that account, satisfying the stem's need to authenticate before retrieving the Panorama running configuration.
Why this answer
The Palo Alto Networks XML API requires an API key for authentication, which is generated by sending a request with type=keygen along with valid user and password parameters. This key is then used in subsequent API calls (e.g., type=op or type=config) to authenticate without resending credentials. Without a valid key, no other API operations can be performed.
Exam trap
NetSec-Architect often tests the misconception that any API call can authenticate — candidates forget that keygen is the only endpoint that accepts raw credentials and must be called first.
How to eliminate wrong answers
Option A is wrong because type=op executes operational commands and requires an existing API key — it cannot generate one. Option C is wrong because type=report is used for generating reports and does not authenticate; async=yes is unrelated to key generation. Option D is wrong because type=config manipulates configuration and also requires an API key; action=get retrieves config but does not authenticate.