Copy automation

Cortex XSOAR 6 API

post /automation/copy

Copy given automation

CURL
curl -X POST \ -H "Authorization: [[apiKey]]" \ -H "Accept: application/json" \ -H "Content-Type: application/json,application/xml" \ "https://hostname:443/automation/copy" \ -d '{ "filter" : { "searchAfterMap" : { "key" : [ "searchAfterMap", "searchAfterMap" ] }, "searchAfterMapOrder" : { "key" : 6 }, "size" : 1, "searchAfterElastic" : [ "searchAfterElastic", "searchAfterElastic" ], "ignoreWorkers" : true, "query" : "query", "searchBefore" : [ "searchBefore", "searchBefore" ], "searchBeforeElastic" : [ "searchBeforeElastic", "searchBeforeElastic" ], "searchAfter" : [ "searchAfter", "searchAfter" ], "page" : 0, "sort" : [ { "asc" : true, "field" : "field", "fieldType" : "fieldType" }, { "asc" : true, "field" : "field", "fieldType" : "fieldType" } ], "Cache" : { "key" : [ "Cache", "Cache" ] } }, "savePassword" : true, "script" : { "outputs" : [ { "contentPath" : "contentPath", "contextPath" : "contextPath", "description" : "{}", "type" : "type" }, { "contentPath" : "contentPath", "contextPath" : "contextPath", "description" : "{}", "type" : "type" } ], "dbotCreatedBy" : "dbotCreatedBy", "scriptTarget" : 9, "sizeInBytes" : 2, "deprecated" : true, "syncHash" : "syncHash", "polling" : true, "remote" : true, "type" : "type", "searchableName" : "searchableName", "toServerVersion" : { "Digits" : [ 5, 5 ], "Label" : "Label" }, "contextKeys" : [ "contextKeys", "contextKeys" ], "modified" : "2000-01-23T04:56:07.000+00:00", "xsoarReadOnlyRoles" : [ "xsoarReadOnlyRoles", "xsoarReadOnlyRoles" ], "visualScript" : "visualScript", "id" : "id", "locked" : true, "rawTags" : [ "rawTags", "rawTags" ], "allReadWrite" : true, "numericId" : 2, "sequenceNumber" : 3, "previousAllRead" : true, "dependsOn" : { "key" : [ "dependsOn", "dependsOn" ] }, "pswd" : "pswd", "created" : "2000-01-23T04:56:07.000+00:00", "indexName" : "indexName", "xsoarHasReadOnlyRole" : true, "sensitive" : true, "shouldCommit" : true, "version" : 7, "script" : "script", "tags" : [ "tags", "tags" ], "detached" : true, "important" : [ { "related" : "related", "contextPath" : "contextPath", "description" : "description" }, { "related" : "related", "contextPath" : "contextPath", "description" : "description" } ], "previousAllReadWrite" : true, "system" : true, "name" : "name", "hasRole" : true, "propagationLabels" : [ "propagationLabels", "propagationLabels" ], "private" : true, "dockerImage" : "dockerImage", "commitMessage" : "commitMessage", "hidden" : true, "primaryTerm" : 7, "roles" : [ "roles", "roles" ], "runOnce" : true, "enabled" : true, "timeout" : 4, "engineGroup" : "engineGroup", "packID" : "packID", "highlight" : { "key" : [ "highlight", "highlight" ] }, "engine" : "engine", "subtype" : "subtype", "MainEngineInfo" : { "engine" : "engine", "engineGroup" : "engineGroup" }, "vcShouldIgnore" : true, "prevName" : "prevName", "definitionId" : "definitionId", "fromServerVersion" : { "Digits" : [ 5, 5 ], "Label" : "Label" }, "runAs" : "runAs", "previousRoles" : [ "previousRoles", "previousRoles" ], "itemVersion" : { "Digits" : [ 5, 5 ], "Label" : "Label" }, "packPropagationLabels" : [ "packPropagationLabels", "packPropagationLabels" ], "xsoarPreviousReadOnlyRoles" : [ "xsoarPreviousReadOnlyRoles", "xsoarPreviousReadOnlyRoles" ], "cacheVersn" : 5, "sortValues" : [ "sortValues", "sortValues" ], "vcShouldKeepItemLegacyProdMachine" : true, "allRead" : true, "arguments" : [ { "auto" : "auto", "default" : true, "hidden" : true, "defaultValue" : "defaultValue", "deprecated" : true, "name" : "name", "description" : "description", "isArray" : true, "secret" : true, "type" : "type", "predefined" : [ "predefined", "predefined" ], "required" : true }, { "auto" : "auto", "default" : true, "hidden" : true, "defaultValue" : "defaultValue", "deprecated" : true, "name" : "name", "description" : "description", "isArray" : true, "secret" : true, "type" : "type", "predefined" : [ "predefined", "predefined" ], "required" : true } ], "comment" : "comment", "packName" : "packName", "user" : "user", "sourceScripID" : "sourceScripID" } }' \ -d ' UNDEFINED_EXAMPLE_VALUE true 123456789 aeiou aeiou aeiou UNDEFINED_EXAMPLE_VALUE UNDEFINED_EXAMPLE_VALUE aeiou aeiou 123456789 true true true 123456789 aeiou aeiou aeiou 2000-01-23T04:56:07.000Z aeiou aeiou UNDEFINED_EXAMPLE_VALUE true true aeiou true aeiou aeiou true true UNDEFINED_EXAMPLE_VALUE aeiou aeiou true 2000-01-23T04:56:07.000Z aeiou 123456789 aeiou aeiou aeiou true aeiou true true aeiou 123456789 true aeiou aeiou aeiou true aeiou aeiou true 123456789 aeiou true 123456789 true 123456789 aeiou aeiou aeiou aeiou true aeiou 123456789 aeiou aeiou true true 123456789 aeiou true aeiou aeiou '
Authentication: api_key Api Key "Authorization"
Request
Body
optional
filter
optional
GenericStringFilter is a general filter that will fetch entities using the Query value
Cache
optional
Map
Cache of join functions
ignoreWorkers
optional
Boolean
Do not use workers mechanism while searching bleve
page
optional
Number (Long)
0-based page format: int64
query
optional
String
searchAfter
optional
Array of strings
Efficient next page, pass max sort value from previous page
searchAfterElastic
optional
Array of strings
Efficient next page, pass max ES sort value from previous page
searchAfterMap
optional
Map
Map accounts search after values - stores next page sort values per account. There is no need to store searchBeforeMap as [current page searchBefore] equals to [prev page searchAfter] More, there is no way to generate correct searchBefore from current page as some tenants may not appear at all. The map is relevant in proxy mode and used by tenants, each tenant extracts the searchAfter keys from the map.
searchAfterMapOrder
optional
Map of numbers (Long)
format: int64
searchBefore
optional
Array of strings
Efficient prev page, pass min sort value from next page
searchBeforeElastic
optional
Array of strings
Efficient prev page, pass min ES sort value from next page
size
optional
Number (Long)
Size is limited to 1000, if not passed it defaults to 0, and no results will return format: int64
sort
optional
Array
The sort order
Order struct holds a sort field and the direction of sorting
asc
optional
Boolean
field
optional
String
fieldType
optional
String
savePassword
optional
Boolean
script
optional
AutomationScript represents a script that will run on the system
MainEngineInfo
optional
engine
optional
String
Engine that will run the script
engineGroup
optional
String
EngineGroup that will run the script
allRead
optional
Boolean
allReadWrite
optional
Boolean
arguments
optional
Array
Argument to a module command
auto
optional
String
default
optional
Boolean
defaultValue
optional
String
deprecated
optional
Boolean
description
optional
String
hidden
optional
Boolean
isArray
optional
Boolean
name
optional
String
predefined
optional
Array of strings
required
optional
Boolean
secret
optional
Boolean
type
optional
String
cacheVersn
optional
Number (Long)
format: int64
comment
optional
String
commitMessage
optional
String
contextKeys
optional
Array of strings
created
optional
Object
format: date-time
dbotCreatedBy
optional
String
Who has created this event - relevant only for manual incidents
definitionId
optional
String
dependsOn
optional
Map
This fields indicates which commands this script depends on
deprecated
optional
Boolean
detached
optional
Boolean
dockerImage
optional
String
enabled
optional
Boolean
engine
optional
String
Engine that will run the script
engineGroup
optional
String
EngineGroup that will run the script
fromServerVersion
optional
Digits
optional
Array of numbers (Long)
WARNING: when adding new attributes or changing the names of the existing ones, remember to add support in UnmarshalJSON for items that were exported by msgpack. format: int64
Label
optional
String
hasRole
optional
Boolean
Internal field to make queries on role faster
hidden
optional
Boolean
highlight
optional
Map
id
optional
String
important
optional
Array
Important The important outputs of a given command
contextPath
optional
String
description
optional
String
Description is either a string or a map from string to interface
related
optional
String
To what other context path this output is related
indexName
optional
String
itemVersion
optional
Digits
optional
Array of numbers (Long)
WARNING: when adding new attributes or changing the names of the existing ones, remember to add support in UnmarshalJSON for items that were exported by msgpack. format: int64
Label
optional
String
locked
optional
Boolean
modified
optional
Object
format: date-time
name
optional
String
numericId
optional
Number (Long)
format: int64
outputs
optional
Array
Output of a module command
contentPath
optional
String
contextPath
optional
String
description
optional
Object
Description is either a string or a map from string to interface
type
optional
String
packID
optional
String
packName
optional
String
packPropagationLabels
optional
Array of strings
polling
optional
Boolean
prevName
optional
String
previousAllRead
optional
Boolean
previousAllReadWrite
optional
Boolean
previousRoles
optional
Array of strings
Do not change this field manually
primaryTerm
optional
Number (Long)
format: int64
private
optional
Boolean
propagationLabels
optional
Array of strings
pswd
optional
String
rawTags
optional
Array of strings
remote
optional
Boolean
roles
optional
Array of strings
The role assigned to this investigation
runAs
optional
String
runOnce
optional
Boolean
script
optional
String
scriptTarget
optional
Number (Long)
ScriptTarget represents the module where this script should run format: int64
searchableName
optional
String
sensitive
optional
Boolean
sequenceNumber
optional
Number (Long)
format: int64
shouldCommit
optional
Boolean
sizeInBytes
optional
Number (Long)
format: int64
sortValues
optional
Array of strings
sourceScripID
optional
String
subtype
optional
String
ScriptSubType holds the script type version
syncHash
optional
String
system
optional
Boolean
tags
optional
Array of strings
timeout
optional
Number (Long)
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. format: int64
toServerVersion
optional
Digits
optional
Array of numbers (Long)
WARNING: when adding new attributes or changing the names of the existing ones, remember to add support in UnmarshalJSON for items that were exported by msgpack. format: int64
Label
optional
String
type
optional
String
ScriptType holds the type of a script
user
optional
String
vcShouldIgnore
optional
Boolean
vcShouldKeepItemLegacyProdMachine
optional
Boolean
version
optional
Number (Long)
format: int64
visualScript
optional
String
xsoarHasReadOnlyRole
optional
Boolean
xsoarPreviousReadOnlyRoles
optional
Array of strings
xsoarReadOnlyRoles
optional
Array of strings
Responses

The saved automation.

Body
pythonEnabled
optional
Boolean
scripts
optional
Array
arguments
optional
Array
Argument to a module command
auto
optional
String
default
optional
Boolean
defaultValue
optional
String
deprecated
optional
Boolean
description
optional
String
hidden
optional
Boolean
isArray
optional
Boolean
name
optional
String
predefined
optional
Array of strings
required
optional
Boolean
secret
optional
Boolean
type
optional
String
comment
optional
String
contextKeys
optional
Array of strings
dependsOn
optional
Map
deprecated
optional
Boolean
detached
optional
Boolean
dockerImage
optional
String
enabled
optional
Boolean
hidden
optional
Boolean
id
optional
String
locked
optional
Boolean
modified
optional
Object
format: date-time
name
optional
String
outputs
optional
Array
Output of a module command
contentPath
optional
String
contextPath
optional
String
description
optional
Object
Description is either a string or a map from string to interface
type
optional
String
permitted
optional
Boolean
polling
optional
Boolean
propagationLabels
optional
Array of strings
roles
optional
Array of strings
runAs
optional
String
scriptTarget
optional
Number (Long)
ScriptTarget represents the module where this script should run format: int64
system
optional
Boolean
tags
optional
Array of strings
type
optional
String
ScriptType holds the type of a script
user
optional
String
version
optional
Number (Long)
format: int64
selectedScript
optional
Map of objects
suggestions
optional
Array of strings