For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex XSOAR 6.xCortex XSOAR 8 (SaaS)Cortex XSOAR 8.x (On-premCortex XSIAM

run-playbook

Run Cortex XSOAR playbooks locally using the Demisto SDK command-line interface.

This command runs the given playbook in Cortex XSOAR or Cortex XSIAM.

The run-playbook command requires interactions with Cortex XSIAM or Cortex XSOAR. Before using the command, verify the environment variables are set up.

Arguments
Argument
Description

-u, --url

URL to a Cortex XSOAR or Cortex XSIAM instance.

-p, --playbook_id

The ID of the playbook to run.

-t, --timeout

Timeout for the command in seconds. The playbook will continue to run in Cortex XSOAR/Cortex XSIAM. The default is 90 seconds.

--insecure

Skips certificate validation when authorizing Cortex XSOAR or Cortex XSIAM.

-w, --wait

Waits until the playbook run is finished and get a response.

Examples

The following examples assume both the DEMISTO_API_KEY and DEMISTO_BASE_URL environment variables are set:

export DEMISTO_BASE_URL = https://demisto.local

export DEMISTO_API_KEY = api key

  • demisto-sdk run-playbook -p 'playbook_id'

    This runs the playbook with playbook_id in the instance https://demisto.local and waits for the playbook to finish its run. If the run takes more than 90 seconds (the default timeout), the command stops while the playbook keeps running in Cortex XSOAR/Cortex XSIAM.

  • demisto-sdk run-playbook -p 'playbook_id' -n

    This runs the playbook with playbook_id in the instance https://demisto.local and does not wait to see the response. The playbook keeps running in Cortex XSOAR/Cortex XSIAM.

  • demisto-sdk run-playbook -p 'playbook_id' -t 300

    This runs the playbook with playbook_id in the https://demisto.local instance and waits for the playbook to finish its run. If the playbook runs for more than five minutes (300 seconds), the command stops while the playbook keeps running in Cortex XSOAR/Cortex XSIAM. For a long-running playbook, consider increasing the timeout argument.

Last updated

Was this helpful?