Scripts
APIs for managing scripts (automations)
Create or update a given automation.
The saved automation.
POST /automation HTTP/1.1
Host: hostname
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 2329
{
"filter": {
"Cache": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"ignoreWorkers": true,
"page": 1,
"query": "text",
"searchAfter": [
"text"
],
"searchAfterElastic": [
"text"
],
"searchAfterMap": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"searchAfterMapOrder": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"searchBefore": [
"text"
],
"searchBeforeElastic": [
"text"
],
"size": 1,
"sort": [
{
"asc": true,
"field": "text",
"fieldType": "text"
}
]
},
"savePassword": true,
"script": {
"MainEngineInfo": {
"engine": "text",
"engineGroup": "text"
},
"allRead": true,
"allReadWrite": true,
"arguments": [
{
"auto": "text",
"default": true,
"defaultValue": "text",
"deprecated": true,
"description": "text",
"hidden": true,
"isArray": true,
"name": "text",
"predefined": [
"text"
],
"required": true,
"secret": true,
"type": "text"
}
],
"cacheVersn": 1,
"comment": "text",
"commitMessage": "text",
"contextKeys": [
"text"
],
"created": "2026-01-01T00:00:00.000Z",
"dbotCreatedBy": "text",
"definitionId": "text",
"dependsOn": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"deprecated": true,
"detached": true,
"dockerImage": "text",
"enabled": true,
"engine": "text",
"engineGroup": "text",
"fromServerVersion": {
"Digits": [
1
],
"Label": "text"
},
"hasRole": true,
"hidden": true,
"highlight": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"id": "text",
"important": [
{
"contextPath": "text",
"description": "text",
"related": "text"
}
],
"indexName": "text",
"itemVersion": {
"Digits": [
1
],
"Label": "text"
},
"locked": true,
"modified": "2026-01-01T00:00:00.000Z",
"name": "text",
"numericId": 1,
"outputs": [
{
"contentPath": "text",
"contextPath": "text",
"description": {},
"type": "text"
}
],
"packID": "text",
"packName": "text",
"packPropagationLabels": [
"text"
],
"polling": true,
"prevName": "text",
"previousAllRead": true,
"previousAllReadWrite": true,
"previousRoles": [
"text"
],
"primaryTerm": 1,
"private": true,
"propagationLabels": [
"text"
],
"pswd": "text",
"rawTags": [
"text"
],
"remote": true,
"roles": [
"text"
],
"runAs": "text",
"runOnce": true,
"script": "text",
"scriptTarget": 1,
"searchableName": "text",
"sensitive": true,
"sequenceNumber": 1,
"shouldCommit": true,
"sizeInBytes": 1,
"sortValues": [
"text"
],
"sourceScripID": "text",
"subtype": "text",
"syncHash": "text",
"system": true,
"tags": [
"text"
],
"timeout": 1,
"toServerVersion": {
"Digits": [
1
],
"Label": "text"
},
"type": "text",
"user": "text",
"vcShouldIgnore": true,
"vcShouldKeepItemLegacyProdMachine": true,
"version": 1,
"visualScript": "text",
"xsoarHasReadOnlyRole": true,
"xsoarPreviousReadOnlyRoles": [
"text"
],
"xsoarReadOnlyRoles": [
"text"
]
}
}The saved automation.
{
"pythonEnabled": true,
"scripts": [
{
"arguments": [
{
"auto": "text",
"default": true,
"defaultValue": "text",
"deprecated": true,
"description": "text",
"hidden": true,
"isArray": true,
"name": "text",
"predefined": [
"text"
],
"required": true,
"secret": true,
"type": "text"
}
],
"comment": "text",
"contextKeys": [
"text"
],
"dependsOn": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"deprecated": true,
"detached": true,
"dockerImage": "text",
"enabled": true,
"hidden": true,
"id": "text",
"locked": true,
"modified": "2026-01-01T00:00:00.000Z",
"name": "text",
"outputs": [
{
"contentPath": "text",
"contextPath": "text",
"description": {},
"type": "text"
}
],
"permitted": true,
"polling": true,
"propagationLabels": [
"text"
],
"roles": [
"text"
],
"runAs": "text",
"scriptTarget": 1,
"system": true,
"tags": [
"text"
],
"type": "text",
"user": "text",
"version": 1
}
],
"selectedScript": {
"ANY_ADDITIONAL_PROPERTY": {}
},
"suggestions": [
"text"
]
}Copy given automation
The saved automation.
POST /automation/copy HTTP/1.1
Host: hostname
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 2329
{
"filter": {
"Cache": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"ignoreWorkers": true,
"page": 1,
"query": "text",
"searchAfter": [
"text"
],
"searchAfterElastic": [
"text"
],
"searchAfterMap": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"searchAfterMapOrder": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"searchBefore": [
"text"
],
"searchBeforeElastic": [
"text"
],
"size": 1,
"sort": [
{
"asc": true,
"field": "text",
"fieldType": "text"
}
]
},
"savePassword": true,
"script": {
"MainEngineInfo": {
"engine": "text",
"engineGroup": "text"
},
"allRead": true,
"allReadWrite": true,
"arguments": [
{
"auto": "text",
"default": true,
"defaultValue": "text",
"deprecated": true,
"description": "text",
"hidden": true,
"isArray": true,
"name": "text",
"predefined": [
"text"
],
"required": true,
"secret": true,
"type": "text"
}
],
"cacheVersn": 1,
"comment": "text",
"commitMessage": "text",
"contextKeys": [
"text"
],
"created": "2026-01-01T00:00:00.000Z",
"dbotCreatedBy": "text",
"definitionId": "text",
"dependsOn": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"deprecated": true,
"detached": true,
"dockerImage": "text",
"enabled": true,
"engine": "text",
"engineGroup": "text",
"fromServerVersion": {
"Digits": [
1
],
"Label": "text"
},
"hasRole": true,
"hidden": true,
"highlight": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"id": "text",
"important": [
{
"contextPath": "text",
"description": "text",
"related": "text"
}
],
"indexName": "text",
"itemVersion": {
"Digits": [
1
],
"Label": "text"
},
"locked": true,
"modified": "2026-01-01T00:00:00.000Z",
"name": "text",
"numericId": 1,
"outputs": [
{
"contentPath": "text",
"contextPath": "text",
"description": {},
"type": "text"
}
],
"packID": "text",
"packName": "text",
"packPropagationLabels": [
"text"
],
"polling": true,
"prevName": "text",
"previousAllRead": true,
"previousAllReadWrite": true,
"previousRoles": [
"text"
],
"primaryTerm": 1,
"private": true,
"propagationLabels": [
"text"
],
"pswd": "text",
"rawTags": [
"text"
],
"remote": true,
"roles": [
"text"
],
"runAs": "text",
"runOnce": true,
"script": "text",
"scriptTarget": 1,
"searchableName": "text",
"sensitive": true,
"sequenceNumber": 1,
"shouldCommit": true,
"sizeInBytes": 1,
"sortValues": [
"text"
],
"sourceScripID": "text",
"subtype": "text",
"syncHash": "text",
"system": true,
"tags": [
"text"
],
"timeout": 1,
"toServerVersion": {
"Digits": [
1
],
"Label": "text"
},
"type": "text",
"user": "text",
"vcShouldIgnore": true,
"vcShouldKeepItemLegacyProdMachine": true,
"version": 1,
"visualScript": "text",
"xsoarHasReadOnlyRole": true,
"xsoarPreviousReadOnlyRoles": [
"text"
],
"xsoarReadOnlyRoles": [
"text"
]
}
}The saved automation.
{
"pythonEnabled": true,
"scripts": [
{
"arguments": [
{
"auto": "text",
"default": true,
"defaultValue": "text",
"deprecated": true,
"description": "text",
"hidden": true,
"isArray": true,
"name": "text",
"predefined": [
"text"
],
"required": true,
"secret": true,
"type": "text"
}
],
"comment": "text",
"contextKeys": [
"text"
],
"dependsOn": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"deprecated": true,
"detached": true,
"dockerImage": "text",
"enabled": true,
"hidden": true,
"id": "text",
"locked": true,
"modified": "2026-01-01T00:00:00.000Z",
"name": "text",
"outputs": [
{
"contentPath": "text",
"contextPath": "text",
"description": {},
"type": "text"
}
],
"permitted": true,
"polling": true,
"propagationLabels": [
"text"
],
"roles": [
"text"
],
"runAs": "text",
"scriptTarget": 1,
"system": true,
"tags": [
"text"
],
"type": "text",
"user": "text",
"version": 1
}
],
"selectedScript": {
"ANY_ADDITIONAL_PROPERTY": {}
},
"suggestions": [
"text"
]
}Delete a given automation from the system.
automation deleted
No content
POST /automation/delete HTTP/1.1
Host: hostname
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 2329
{
"filter": {
"Cache": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"ignoreWorkers": true,
"page": 1,
"query": "text",
"searchAfter": [
"text"
],
"searchAfterElastic": [
"text"
],
"searchAfterMap": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"searchAfterMapOrder": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"searchBefore": [
"text"
],
"searchBeforeElastic": [
"text"
],
"size": 1,
"sort": [
{
"asc": true,
"field": "text",
"fieldType": "text"
}
]
},
"savePassword": true,
"script": {
"MainEngineInfo": {
"engine": "text",
"engineGroup": "text"
},
"allRead": true,
"allReadWrite": true,
"arguments": [
{
"auto": "text",
"default": true,
"defaultValue": "text",
"deprecated": true,
"description": "text",
"hidden": true,
"isArray": true,
"name": "text",
"predefined": [
"text"
],
"required": true,
"secret": true,
"type": "text"
}
],
"cacheVersn": 1,
"comment": "text",
"commitMessage": "text",
"contextKeys": [
"text"
],
"created": "2026-01-01T00:00:00.000Z",
"dbotCreatedBy": "text",
"definitionId": "text",
"dependsOn": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"deprecated": true,
"detached": true,
"dockerImage": "text",
"enabled": true,
"engine": "text",
"engineGroup": "text",
"fromServerVersion": {
"Digits": [
1
],
"Label": "text"
},
"hasRole": true,
"hidden": true,
"highlight": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"id": "text",
"important": [
{
"contextPath": "text",
"description": "text",
"related": "text"
}
],
"indexName": "text",
"itemVersion": {
"Digits": [
1
],
"Label": "text"
},
"locked": true,
"modified": "2026-01-01T00:00:00.000Z",
"name": "text",
"numericId": 1,
"outputs": [
{
"contentPath": "text",
"contextPath": "text",
"description": {},
"type": "text"
}
],
"packID": "text",
"packName": "text",
"packPropagationLabels": [
"text"
],
"polling": true,
"prevName": "text",
"previousAllRead": true,
"previousAllReadWrite": true,
"previousRoles": [
"text"
],
"primaryTerm": 1,
"private": true,
"propagationLabels": [
"text"
],
"pswd": "text",
"rawTags": [
"text"
],
"remote": true,
"roles": [
"text"
],
"runAs": "text",
"runOnce": true,
"script": "text",
"scriptTarget": 1,
"searchableName": "text",
"sensitive": true,
"sequenceNumber": 1,
"shouldCommit": true,
"sizeInBytes": 1,
"sortValues": [
"text"
],
"sourceScripID": "text",
"subtype": "text",
"syncHash": "text",
"system": true,
"tags": [
"text"
],
"timeout": 1,
"toServerVersion": {
"Digits": [
1
],
"Label": "text"
},
"type": "text",
"user": "text",
"vcShouldIgnore": true,
"vcShouldKeepItemLegacyProdMachine": true,
"version": 1,
"visualScript": "text",
"xsoarHasReadOnlyRole": true,
"xsoarPreviousReadOnlyRoles": [
"text"
],
"xsoarReadOnlyRoles": [
"text"
]
}
}automation deleted
No content
Import an automation to Cortex XSOAR
file
The saved automation
AutomationScript represents a script that will run on the system
Who has created this event - relevant only for manual incidents
Engine that will run the script
EngineGroup that will run the script
Internal field to make queries on role faster
Do not change this field manually
The role assigned to this investigation
ScriptTarget represents the module where this script should run
ScriptSubType holds the script type version
A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
ScriptType holds the type of a script
POST /automation/import HTTP/1.1
Host: hostname
Authorization: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 15
{
"file": "text"
}The saved automation
{
"MainEngineInfo": {
"engine": "text",
"engineGroup": "text"
},
"allRead": true,
"allReadWrite": true,
"arguments": [
{
"auto": "text",
"default": true,
"defaultValue": "text",
"deprecated": true,
"description": "text",
"hidden": true,
"isArray": true,
"name": "text",
"predefined": [
"text"
],
"required": true,
"secret": true,
"type": "text"
}
],
"cacheVersn": 1,
"comment": "text",
"commitMessage": "text",
"contextKeys": [
"text"
],
"created": "2026-01-01T00:00:00.000Z",
"dbotCreatedBy": "text",
"definitionId": "text",
"dependsOn": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"deprecated": true,
"detached": true,
"dockerImage": "text",
"enabled": true,
"engine": "text",
"engineGroup": "text",
"fromServerVersion": {
"Digits": [
1
],
"Label": "text"
},
"hasRole": true,
"hidden": true,
"highlight": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"id": "text",
"important": [
{
"contextPath": "text",
"description": "text",
"related": "text"
}
],
"indexName": "text",
"itemVersion": {
"Digits": [
1
],
"Label": "text"
},
"locked": true,
"modified": "2026-01-01T00:00:00.000Z",
"name": "text",
"numericId": 1,
"outputs": [
{
"contentPath": "text",
"contextPath": "text",
"description": {},
"type": "text"
}
],
"packID": "text",
"packName": "text",
"packPropagationLabels": [
"text"
],
"polling": true,
"prevName": "text",
"previousAllRead": true,
"previousAllReadWrite": true,
"previousRoles": [
"text"
],
"primaryTerm": 1,
"private": true,
"propagationLabels": [
"text"
],
"pswd": "text",
"rawTags": [
"text"
],
"remote": true,
"roles": [
"text"
],
"runAs": "text",
"runOnce": true,
"script": "text",
"scriptTarget": 1,
"searchableName": "text",
"sensitive": true,
"sequenceNumber": 1,
"shouldCommit": true,
"sizeInBytes": 1,
"sortValues": [
"text"
],
"sourceScripID": "text",
"subtype": "text",
"syncHash": "text",
"system": true,
"tags": [
"text"
],
"timeout": 1,
"toServerVersion": {
"Digits": [
1
],
"Label": "text"
},
"type": "text",
"user": "text",
"vcShouldIgnore": true,
"vcShouldKeepItemLegacyProdMachine": true,
"version": 1,
"visualScript": "text",
"xsoarHasReadOnlyRole": true,
"xsoarPreviousReadOnlyRoles": [
"text"
],
"xsoarReadOnlyRoles": [
"text"
]
}Search Automation by filter
automationScriptFilter is a general filter that fetches entities using a query string query using the Query value
Do not use workers mechanism while searching bleve
0-based page
Efficient next page, pass max sort value from previous page
Efficient next page, pass max ES sort value from previous page
Efficient prev page, pass min sort value from next page
Efficient prev page, pass min ES sort value from next page
Size is limited to 1000, if not passed it defaults to 0, and no results will return
automationScriptResult
POST /automation/search HTTP/1.1
Host: hostname
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 390
{
"Cache": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"ignoreWorkers": true,
"page": 1,
"query": "text",
"searchAfter": [
"text"
],
"searchAfterElastic": [
"text"
],
"searchAfterMap": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"searchAfterMapOrder": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"searchBefore": [
"text"
],
"searchBeforeElastic": [
"text"
],
"size": 1,
"sort": [
{
"asc": true,
"field": "text",
"fieldType": "text"
}
],
"stripContext": true
}automationScriptResult
{
"pythonEnabled": true,
"scripts": [
{
"arguments": [
{
"auto": "text",
"default": true,
"defaultValue": "text",
"deprecated": true,
"description": "text",
"hidden": true,
"isArray": true,
"name": "text",
"predefined": [
"text"
],
"required": true,
"secret": true,
"type": "text"
}
],
"comment": "text",
"contextKeys": [
"text"
],
"dependsOn": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
},
"deprecated": true,
"detached": true,
"dockerImage": "text",
"enabled": true,
"hidden": true,
"id": "text",
"locked": true,
"modified": "2026-01-01T00:00:00.000Z",
"name": "text",
"outputs": [
{
"contentPath": "text",
"contextPath": "text",
"description": {},
"type": "text"
}
],
"permitted": true,
"polling": true,
"propagationLabels": [
"text"
],
"roles": [
"text"
],
"runAs": "text",
"scriptTarget": 1,
"system": true,
"tags": [
"text"
],
"type": "text",
"user": "text",
"version": 1
}
],
"selectedScript": {
"ANY_ADDITIONAL_PROPERTY": {}
},
"suggestions": [
"text"
]
}Last updated
Was this helpful?
