Palo Alto Networks Certified Security Automation Engineer (PCSAE)IntegrationsEasy

A security engineer is developing a custom integration for Cortex XSOAR that interacts with a cloud security service. The service's API endpoints are geographically distributed, and the integration needs to connect to the specific endpoint closest to the XSOAR deployment to minimize latency. The base URL for the API thus needs to be configurable per integration instance. How should the engineer implement this configurability?

  1. ADefine the base URL as an integration parameter in the YAML file.
  2. BEmbed the base URL directly into each command's `_http_request` call.
  3. CHardcode all possible endpoint URLs in the Python script and use conditional logic.
  4. DUse `demisto.setContext()` to store the chosen base URL after initial setup.
Show answer & explanation

Correct answer: A. Define the base URL as an integration parameter in the YAML file.

Defining the base URL as an integration parameter in the YAML file allows it to be configured uniquely for each integration instance. This enables operators to select the geographically closest endpoint when setting up the instance without modifying the integration's code.

Why the other options are wrong

  • B. Embedding the base URL in each `_http_request` call leads to code duplication and makes it harder to change globally for the instance.
  • C. Hardcoding requires code changes for every environment and doesn't allow instance-specific configuration.
  • D. `demisto.setContext()` is for storing playbook context data, not for fundamental integration configuration like a base URL.

Configurable Base URL

The ability to define the base URL for an external API as an integration parameter in Cortex XSOAR, allowing different integration instances to connect to different endpoints (e.g., regional servers) without code modification.

  • Defined as an integration parameter in YAML.
  • Configurable per integration instance.
  • Accessed via `demisto.params()` in the script.

Memory trick: Parameters guide the integration to its proper port.

More Integrations questions