Use the Command Line Interface

Cortex XSOAR enables you to run system commands, integration commands, automations, and more, from an integrated CLI.
Cortex XSOAR enables you to run system commands, integration commands, automations, and more, from an integrated command line interface (CLI). With the CLI’s auto-complete feature, you can easily find relevant commands, scripts, and arguments. The CLI is available throughout Cortex XSOAR, with the exception of the Marketplace and while editing Playbooks.
Example:
To run the print script with a value of hello and the key
a
from the context:
!Print value="hello ${a}"
To explicitly use the following characters, place them within single or double quotes. An escape character \ is not required.
&&, ||, !, {, }, [, ], (, ), ~, *, ?
To explicitly use the following characters, place them within single or double quotes and use an escape character \.
\, \n, \t, \r, ", ^, :, comma, and space
When writing a query or complex text in the CLI, we strongly recommend enclosing your text with the backtick (`) character. Text within the backticks does not require you to escape single quotation marks ('), double quotation marks ('') or backslashes (\).
Examples:
To run the searchIncidentv2 script with query of all
myfield
that equals "this is a test" using escape characters:
!SearchIncidentsV2 query="myfield:\"this is a test\""
To run the same query using backticks:
!SearchIncidentsV2 query=`myfield:"this is a test"`
To run the Python command returning Hello World using escape characters:
!py script="demisto.results(\"hello world\")"
To run the Python command returning Hello World using backticks:
!py script=`demisto.results("hello world")`
(
Multi-tenant
) - The CLI is not available from the main account in a multi-tenant deployment.

Recommended For You