Integrations, Scripts, and APIs (X-Play, REST, CLI)
Integrations, Scripts, and APIs (X-Play, REST, CLI) tests how automation reaches systems outside Prism Central. Expect questions on endpoints, credentials, REST calls, scripts, and CLI usage, plus error handling.
Integration rules
- Store connection details in endpoints and secrets in credentials; reference them from playbooks and runbooks.
- REST actions need method, URL, headers, body, and expected response codes; parse JSON output into variables.
- Script actions run in the automation execution environment, not on the managed VM by default; include runtime and libraries.
- CLI tools such as ncli and acli are useful for scripted operations, but confirm the target and authentication context.
- Handle timeouts, non-2xx responses, and partial failures explicitly.
Worked example
An X-Play playbook must open an ITSM ticket. A REST action calls the ITSM endpoint with a credential object, sends a JSON body containing the alert ID and VM name, and maps the returned ticket number to a variable. A decision checks for HTTP 201. On failure, an email action notifies the automation team and the playbook ends without claiming success. The credential is referenced, not pasted into the script.
Traps
- Hardcoding API keys or passwords in scripts.
- Ignoring API version and endpoint differences.
- Assuming script output is automatically a structured variable; capture and parse it.
- Forgetting that a script runs where the executor runs, not on the target VM.
- Not checking response codes before continuing.