Create or update a given automation.
curl -X 'POST'
-H "Authorization: [[apiKey]]"
\
-H
'Accept: application/json'
-H
'Content-Type: application/json,application/xml'
'https://hostname/automation'
-d
''
import http.client
conn = http.client.HTTPSConnection("hostname")
payload = "{\"filter\":{\"Cache\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"ignoreWorkers\":true,\"page\":0,\"query\":\"string\",\"searchAfter\":[\"string\"],\"searchAfterElastic\":[\"string\"],\"searchAfterMap\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"searchAfterMapOrder\":{\"property1\":0,\"property2\":0},\"searchBefore\":[\"string\"],\"searchBeforeElastic\":[\"string\"],\"size\":0,\"sort\":[{\"asc\":true,\"field\":\"string\",\"fieldType\":\"string\"}]},\"savePassword\":true,\"script\":{\"MainEngineInfo\":{\"engine\":\"string\",\"engineGroup\":\"string\"},\"allRead\":true,\"allReadWrite\":true,\"arguments\":[{\"auto\":\"string\",\"default\":true,\"defaultValue\":\"string\",\"deprecated\":true,\"description\":\"string\",\"hidden\":true,\"isArray\":true,\"name\":\"string\",\"predefined\":[\"string\"],\"required\":true,\"secret\":true,\"type\":\"string\"}],\"cacheVersn\":0,\"comment\":\"string\",\"commitMessage\":\"string\",\"contextKeys\":[\"string\"],\"created\":\"2019-08-24T14:15:22Z\",\"dbotCreatedBy\":\"string\",\"definitionId\":\"string\",\"dependsOn\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"deprecated\":true,\"detached\":true,\"dockerImage\":\"string\",\"enabled\":true,\"engine\":\"string\",\"engineGroup\":\"string\",\"fromServerVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"hasRole\":true,\"hidden\":true,\"highlight\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"id\":\"string\",\"important\":[{\"contextPath\":\"string\",\"description\":\"string\",\"related\":\"string\"}],\"indexName\":\"string\",\"itemVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"locked\":true,\"modified\":\"2019-08-24T14:15:22Z\",\"name\":\"string\",\"numericId\":0,\"outputs\":[{\"contentPath\":\"string\",\"contextPath\":\"string\",\"description\":{},\"type\":\"string\"}],\"packID\":\"string\",\"packName\":\"string\",\"packPropagationLabels\":[\"string\"],\"polling\":true,\"prevName\":\"string\",\"previousAllRead\":true,\"previousAllReadWrite\":true,\"previousRoles\":[\"string\"],\"primaryTerm\":0,\"private\":true,\"propagationLabels\":[\"string\"],\"pswd\":\"string\",\"rawTags\":[\"string\"],\"remote\":true,\"roles\":[\"string\"],\"runAs\":\"string\",\"runOnce\":true,\"script\":\"string\",\"scriptTarget\":0,\"searchableName\":\"string\",\"sensitive\":true,\"sequenceNumber\":0,\"shouldCommit\":true,\"sizeInBytes\":0,\"sortValues\":[\"string\"],\"sourceScripID\":\"string\",\"subtype\":\"string\",\"syncHash\":\"string\",\"system\":true,\"tags\":[\"string\"],\"timeout\":0,\"toServerVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"type\":\"string\",\"user\":\"string\",\"vcShouldIgnore\":true,\"vcShouldKeepItemLegacyProdMachine\":true,\"version\":0,\"visualScript\":\"string\",\"xsoarHasReadOnlyRole\":true,\"xsoarPreviousReadOnlyRoles\":[\"string\"],\"xsoarReadOnlyRoles\":[\"string\"]}}"
headers = {
'accept': "application/xml",
'Authorization': "REPLACE_KEY_VALUE",
'content-type': "application/json"
}
conn.request("POST", "/automation", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://hostname/automation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["accept"] = 'application/xml'
request["Authorization"] = 'REPLACE_KEY_VALUE'
request["content-type"] = 'application/json'
request.body = "{\"filter\":{\"Cache\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"ignoreWorkers\":true,\"page\":0,\"query\":\"string\",\"searchAfter\":[\"string\"],\"searchAfterElastic\":[\"string\"],\"searchAfterMap\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"searchAfterMapOrder\":{\"property1\":0,\"property2\":0},\"searchBefore\":[\"string\"],\"searchBeforeElastic\":[\"string\"],\"size\":0,\"sort\":[{\"asc\":true,\"field\":\"string\",\"fieldType\":\"string\"}]},\"savePassword\":true,\"script\":{\"MainEngineInfo\":{\"engine\":\"string\",\"engineGroup\":\"string\"},\"allRead\":true,\"allReadWrite\":true,\"arguments\":[{\"auto\":\"string\",\"default\":true,\"defaultValue\":\"string\",\"deprecated\":true,\"description\":\"string\",\"hidden\":true,\"isArray\":true,\"name\":\"string\",\"predefined\":[\"string\"],\"required\":true,\"secret\":true,\"type\":\"string\"}],\"cacheVersn\":0,\"comment\":\"string\",\"commitMessage\":\"string\",\"contextKeys\":[\"string\"],\"created\":\"2019-08-24T14:15:22Z\",\"dbotCreatedBy\":\"string\",\"definitionId\":\"string\",\"dependsOn\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"deprecated\":true,\"detached\":true,\"dockerImage\":\"string\",\"enabled\":true,\"engine\":\"string\",\"engineGroup\":\"string\",\"fromServerVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"hasRole\":true,\"hidden\":true,\"highlight\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"id\":\"string\",\"important\":[{\"contextPath\":\"string\",\"description\":\"string\",\"related\":\"string\"}],\"indexName\":\"string\",\"itemVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"locked\":true,\"modified\":\"2019-08-24T14:15:22Z\",\"name\":\"string\",\"numericId\":0,\"outputs\":[{\"contentPath\":\"string\",\"contextPath\":\"string\",\"description\":{},\"type\":\"string\"}],\"packID\":\"string\",\"packName\":\"string\",\"packPropagationLabels\":[\"string\"],\"polling\":true,\"prevName\":\"string\",\"previousAllRead\":true,\"previousAllReadWrite\":true,\"previousRoles\":[\"string\"],\"primaryTerm\":0,\"private\":true,\"propagationLabels\":[\"string\"],\"pswd\":\"string\",\"rawTags\":[\"string\"],\"remote\":true,\"roles\":[\"string\"],\"runAs\":\"string\",\"runOnce\":true,\"script\":\"string\",\"scriptTarget\":0,\"searchableName\":\"string\",\"sensitive\":true,\"sequenceNumber\":0,\"shouldCommit\":true,\"sizeInBytes\":0,\"sortValues\":[\"string\"],\"sourceScripID\":\"string\",\"subtype\":\"string\",\"syncHash\":\"string\",\"system\":true,\"tags\":[\"string\"],\"timeout\":0,\"toServerVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"type\":\"string\",\"user\":\"string\",\"vcShouldIgnore\":true,\"vcShouldKeepItemLegacyProdMachine\":true,\"version\":0,\"visualScript\":\"string\",\"xsoarHasReadOnlyRole\":true,\"xsoarPreviousReadOnlyRoles\":[\"string\"],\"xsoarReadOnlyRoles\":[\"string\"]}}"
response = http.request(request)
puts response.read_bodyconst data = JSON.stringify({
"filter": {
"Cache": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"ignoreWorkers": true,
"page": 0,
"query": "string",
"searchAfter": [
"string"
],
"searchAfterElastic": [
"string"
],
"searchAfterMap": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"searchAfterMapOrder": {
"property1": 0,
"property2": 0
},
"searchBefore": [
"string"
],
"searchBeforeElastic": [
"string"
],
"size": 0,
"sort": [
{
"asc": true,
"field": "string",
"fieldType": "string"
}
]
},
"savePassword": true,
"script": {
"MainEngineInfo": {
"engine": "string",
"engineGroup": "string"
},
"allRead": true,
"allReadWrite": true,
"arguments": [
{
"auto": "string",
"default": true,
"defaultValue": "string",
"deprecated": true,
"description": "string",
"hidden": true,
"isArray": true,
"name": "string",
"predefined": [
"string"
],
"required": true,
"secret": true,
"type": "string"
}
],
"cacheVersn": 0,
"comment": "string",
"commitMessage": "string",
"contextKeys": [
"string"
],
"created": "2019-08-24T14:15:22Z",
"dbotCreatedBy": "string",
"definitionId": "string",
"dependsOn": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"deprecated": true,
"detached": true,
"dockerImage": "string",
"enabled": true,
"engine": "string",
"engineGroup": "string",
"fromServerVersion": {
"Digits": [
0
],
"Label": "string"
},
"hasRole": true,
"hidden": true,
"highlight": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"id": "string",
"important": [
{
"contextPath": "string",
"description": "string",
"related": "string"
}
],
"indexName": "string",
"itemVersion": {
"Digits": [
0
],
"Label": "string"
},
"locked": true,
"modified": "2019-08-24T14:15:22Z",
"name": "string",
"numericId": 0,
"outputs": [
{
"contentPath": "string",
"contextPath": "string",
"description": {},
"type": "string"
}
],
"packID": "string",
"packName": "string",
"packPropagationLabels": [
"string"
],
"polling": true,
"prevName": "string",
"previousAllRead": true,
"previousAllReadWrite": true,
"previousRoles": [
"string"
],
"primaryTerm": 0,
"private": true,
"propagationLabels": [
"string"
],
"pswd": "string",
"rawTags": [
"string"
],
"remote": true,
"roles": [
"string"
],
"runAs": "string",
"runOnce": true,
"script": "string",
"scriptTarget": 0,
"searchableName": "string",
"sensitive": true,
"sequenceNumber": 0,
"shouldCommit": true,
"sizeInBytes": 0,
"sortValues": [
"string"
],
"sourceScripID": "string",
"subtype": "string",
"syncHash": "string",
"system": true,
"tags": [
"string"
],
"timeout": 0,
"toServerVersion": {
"Digits": [
0
],
"Label": "string"
},
"type": "string",
"user": "string",
"vcShouldIgnore": true,
"vcShouldKeepItemLegacyProdMachine": true,
"version": 0,
"visualScript": "string",
"xsoarHasReadOnlyRole": true,
"xsoarPreviousReadOnlyRoles": [
"string"
],
"xsoarReadOnlyRoles": [
"string"
]
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://hostname/automation");
xhr.setRequestHeader("accept", "application/xml");
xhr.setRequestHeader("Authorization", "REPLACE_KEY_VALUE");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);HttpResponse<String> response = Unirest.post("https://hostname/automation")
.header("accept", "application/xml")
.header("Authorization", "REPLACE_KEY_VALUE")
.header("content-type", "application/json")
.body("{\"filter\":{\"Cache\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"ignoreWorkers\":true,\"page\":0,\"query\":\"string\",\"searchAfter\":[\"string\"],\"searchAfterElastic\":[\"string\"],\"searchAfterMap\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"searchAfterMapOrder\":{\"property1\":0,\"property2\":0},\"searchBefore\":[\"string\"],\"searchBeforeElastic\":[\"string\"],\"size\":0,\"sort\":[{\"asc\":true,\"field\":\"string\",\"fieldType\":\"string\"}]},\"savePassword\":true,\"script\":{\"MainEngineInfo\":{\"engine\":\"string\",\"engineGroup\":\"string\"},\"allRead\":true,\"allReadWrite\":true,\"arguments\":[{\"auto\":\"string\",\"default\":true,\"defaultValue\":\"string\",\"deprecated\":true,\"description\":\"string\",\"hidden\":true,\"isArray\":true,\"name\":\"string\",\"predefined\":[\"string\"],\"required\":true,\"secret\":true,\"type\":\"string\"}],\"cacheVersn\":0,\"comment\":\"string\",\"commitMessage\":\"string\",\"contextKeys\":[\"string\"],\"created\":\"2019-08-24T14:15:22Z\",\"dbotCreatedBy\":\"string\",\"definitionId\":\"string\",\"dependsOn\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"deprecated\":true,\"detached\":true,\"dockerImage\":\"string\",\"enabled\":true,\"engine\":\"string\",\"engineGroup\":\"string\",\"fromServerVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"hasRole\":true,\"hidden\":true,\"highlight\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"id\":\"string\",\"important\":[{\"contextPath\":\"string\",\"description\":\"string\",\"related\":\"string\"}],\"indexName\":\"string\",\"itemVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"locked\":true,\"modified\":\"2019-08-24T14:15:22Z\",\"name\":\"string\",\"numericId\":0,\"outputs\":[{\"contentPath\":\"string\",\"contextPath\":\"string\",\"description\":{},\"type\":\"string\"}],\"packID\":\"string\",\"packName\":\"string\",\"packPropagationLabels\":[\"string\"],\"polling\":true,\"prevName\":\"string\",\"previousAllRead\":true,\"previousAllReadWrite\":true,\"previousRoles\":[\"string\"],\"primaryTerm\":0,\"private\":true,\"propagationLabels\":[\"string\"],\"pswd\":\"string\",\"rawTags\":[\"string\"],\"remote\":true,\"roles\":[\"string\"],\"runAs\":\"string\",\"runOnce\":true,\"script\":\"string\",\"scriptTarget\":0,\"searchableName\":\"string\",\"sensitive\":true,\"sequenceNumber\":0,\"shouldCommit\":true,\"sizeInBytes\":0,\"sortValues\":[\"string\"],\"sourceScripID\":\"string\",\"subtype\":\"string\",\"syncHash\":\"string\",\"system\":true,\"tags\":[\"string\"],\"timeout\":0,\"toServerVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"type\":\"string\",\"user\":\"string\",\"vcShouldIgnore\":true,\"vcShouldKeepItemLegacyProdMachine\":true,\"version\":0,\"visualScript\":\"string\",\"xsoarHasReadOnlyRole\":true,\"xsoarPreviousReadOnlyRoles\":[\"string\"],\"xsoarReadOnlyRoles\":[\"string\"]}}")
.asString();import Foundation
let headers = [
"accept": "application/xml",
"Authorization": "REPLACE_KEY_VALUE",
"content-type": "application/json"
]
let parameters = [
"filter": [
"Cache": [
"property1": ["string"],
"property2": ["string"]
],
"ignoreWorkers": true,
"page": 0,
"query": "string",
"searchAfter": ["string"],
"searchAfterElastic": ["string"],
"searchAfterMap": [
"property1": ["string"],
"property2": ["string"]
],
"searchAfterMapOrder": [
"property1": 0,
"property2": 0
],
"searchBefore": ["string"],
"searchBeforeElastic": ["string"],
"size": 0,
"sort": [
[
"asc": true,
"field": "string",
"fieldType": "string"
]
]
],
"savePassword": true,
"script": [
"MainEngineInfo": [
"engine": "string",
"engineGroup": "string"
],
"allRead": true,
"allReadWrite": true,
"arguments": [
[
"auto": "string",
"default": true,
"defaultValue": "string",
"deprecated": true,
"description": "string",
"hidden": true,
"isArray": true,
"name": "string",
"predefined": ["string"],
"required": true,
"secret": true,
"type": "string"
]
],
"cacheVersn": 0,
"comment": "string",
"commitMessage": "string",
"contextKeys": ["string"],
"created": "2019-08-24T14:15:22Z",
"dbotCreatedBy": "string",
"definitionId": "string",
"dependsOn": [
"property1": ["string"],
"property2": ["string"]
],
"deprecated": true,
"detached": true,
"dockerImage": "string",
"enabled": true,
"engine": "string",
"engineGroup": "string",
"fromServerVersion": [
"Digits": [0],
"Label": "string"
],
"hasRole": true,
"hidden": true,
"highlight": [
"property1": ["string"],
"property2": ["string"]
],
"id": "string",
"important": [
[
"contextPath": "string",
"description": "string",
"related": "string"
]
],
"indexName": "string",
"itemVersion": [
"Digits": [0],
"Label": "string"
],
"locked": true,
"modified": "2019-08-24T14:15:22Z",
"name": "string",
"numericId": 0,
"outputs": [
[
"contentPath": "string",
"contextPath": "string",
"description": [],
"type": "string"
]
],
"packID": "string",
"packName": "string",
"packPropagationLabels": ["string"],
"polling": true,
"prevName": "string",
"previousAllRead": true,
"previousAllReadWrite": true,
"previousRoles": ["string"],
"primaryTerm": 0,
"private": true,
"propagationLabels": ["string"],
"pswd": "string",
"rawTags": ["string"],
"remote": true,
"roles": ["string"],
"runAs": "string",
"runOnce": true,
"script": "string",
"scriptTarget": 0,
"searchableName": "string",
"sensitive": true,
"sequenceNumber": 0,
"shouldCommit": true,
"sizeInBytes": 0,
"sortValues": ["string"],
"sourceScripID": "string",
"subtype": "string",
"syncHash": "string",
"system": true,
"tags": ["string"],
"timeout": 0,
"toServerVersion": [
"Digits": [0],
"Label": "string"
],
"type": "string",
"user": "string",
"vcShouldIgnore": true,
"vcShouldKeepItemLegacyProdMachine": true,
"version": 0,
"visualScript": "string",
"xsoarHasReadOnlyRole": true,
"xsoarPreviousReadOnlyRoles": ["string"],
"xsoarReadOnlyRoles": ["string"]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://hostname/automation")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hostname/automation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"filter\":{\"Cache\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"ignoreWorkers\":true,\"page\":0,\"query\":\"string\",\"searchAfter\":[\"string\"],\"searchAfterElastic\":[\"string\"],\"searchAfterMap\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"searchAfterMapOrder\":{\"property1\":0,\"property2\":0},\"searchBefore\":[\"string\"],\"searchBeforeElastic\":[\"string\"],\"size\":0,\"sort\":[{\"asc\":true,\"field\":\"string\",\"fieldType\":\"string\"}]},\"savePassword\":true,\"script\":{\"MainEngineInfo\":{\"engine\":\"string\",\"engineGroup\":\"string\"},\"allRead\":true,\"allReadWrite\":true,\"arguments\":[{\"auto\":\"string\",\"default\":true,\"defaultValue\":\"string\",\"deprecated\":true,\"description\":\"string\",\"hidden\":true,\"isArray\":true,\"name\":\"string\",\"predefined\":[\"string\"],\"required\":true,\"secret\":true,\"type\":\"string\"}],\"cacheVersn\":0,\"comment\":\"string\",\"commitMessage\":\"string\",\"contextKeys\":[\"string\"],\"created\":\"2019-08-24T14:15:22Z\",\"dbotCreatedBy\":\"string\",\"definitionId\":\"string\",\"dependsOn\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"deprecated\":true,\"detached\":true,\"dockerImage\":\"string\",\"enabled\":true,\"engine\":\"string\",\"engineGroup\":\"string\",\"fromServerVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"hasRole\":true,\"hidden\":true,\"highlight\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"id\":\"string\",\"important\":[{\"contextPath\":\"string\",\"description\":\"string\",\"related\":\"string\"}],\"indexName\":\"string\",\"itemVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"locked\":true,\"modified\":\"2019-08-24T14:15:22Z\",\"name\":\"string\",\"numericId\":0,\"outputs\":[{\"contentPath\":\"string\",\"contextPath\":\"string\",\"description\":{},\"type\":\"string\"}],\"packID\":\"string\",\"packName\":\"string\",\"packPropagationLabels\":[\"string\"],\"polling\":true,\"prevName\":\"string\",\"previousAllRead\":true,\"previousAllReadWrite\":true,\"previousRoles\":[\"string\"],\"primaryTerm\":0,\"private\":true,\"propagationLabels\":[\"string\"],\"pswd\":\"string\",\"rawTags\":[\"string\"],\"remote\":true,\"roles\":[\"string\"],\"runAs\":\"string\",\"runOnce\":true,\"script\":\"string\",\"scriptTarget\":0,\"searchableName\":\"string\",\"sensitive\":true,\"sequenceNumber\":0,\"shouldCommit\":true,\"sizeInBytes\":0,\"sortValues\":[\"string\"],\"sourceScripID\":\"string\",\"subtype\":\"string\",\"syncHash\":\"string\",\"system\":true,\"tags\":[\"string\"],\"timeout\":0,\"toServerVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"type\":\"string\",\"user\":\"string\",\"vcShouldIgnore\":true,\"vcShouldKeepItemLegacyProdMachine\":true,\"version\":0,\"visualScript\":\"string\",\"xsoarHasReadOnlyRole\":true,\"xsoarPreviousReadOnlyRoles\":[\"string\"],\"xsoarReadOnlyRoles\":[\"string\"]}}",
CURLOPT_HTTPHEADER => [
"Authorization: REPLACE_KEY_VALUE",
"accept: application/xml",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://hostname/automation");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: application/xml");
headers = curl_slist_append(headers, "Authorization: REPLACE_KEY_VALUE");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"filter\":{\"Cache\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"ignoreWorkers\":true,\"page\":0,\"query\":\"string\",\"searchAfter\":[\"string\"],\"searchAfterElastic\":[\"string\"],\"searchAfterMap\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"searchAfterMapOrder\":{\"property1\":0,\"property2\":0},\"searchBefore\":[\"string\"],\"searchBeforeElastic\":[\"string\"],\"size\":0,\"sort\":[{\"asc\":true,\"field\":\"string\",\"fieldType\":\"string\"}]},\"savePassword\":true,\"script\":{\"MainEngineInfo\":{\"engine\":\"string\",\"engineGroup\":\"string\"},\"allRead\":true,\"allReadWrite\":true,\"arguments\":[{\"auto\":\"string\",\"default\":true,\"defaultValue\":\"string\",\"deprecated\":true,\"description\":\"string\",\"hidden\":true,\"isArray\":true,\"name\":\"string\",\"predefined\":[\"string\"],\"required\":true,\"secret\":true,\"type\":\"string\"}],\"cacheVersn\":0,\"comment\":\"string\",\"commitMessage\":\"string\",\"contextKeys\":[\"string\"],\"created\":\"2019-08-24T14:15:22Z\",\"dbotCreatedBy\":\"string\",\"definitionId\":\"string\",\"dependsOn\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"deprecated\":true,\"detached\":true,\"dockerImage\":\"string\",\"enabled\":true,\"engine\":\"string\",\"engineGroup\":\"string\",\"fromServerVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"hasRole\":true,\"hidden\":true,\"highlight\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"id\":\"string\",\"important\":[{\"contextPath\":\"string\",\"description\":\"string\",\"related\":\"string\"}],\"indexName\":\"string\",\"itemVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"locked\":true,\"modified\":\"2019-08-24T14:15:22Z\",\"name\":\"string\",\"numericId\":0,\"outputs\":[{\"contentPath\":\"string\",\"contextPath\":\"string\",\"description\":{},\"type\":\"string\"}],\"packID\":\"string\",\"packName\":\"string\",\"packPropagationLabels\":[\"string\"],\"polling\":true,\"prevName\":\"string\",\"previousAllRead\":true,\"previousAllReadWrite\":true,\"previousRoles\":[\"string\"],\"primaryTerm\":0,\"private\":true,\"propagationLabels\":[\"string\"],\"pswd\":\"string\",\"rawTags\":[\"string\"],\"remote\":true,\"roles\":[\"string\"],\"runAs\":\"string\",\"runOnce\":true,\"script\":\"string\",\"scriptTarget\":0,\"searchableName\":\"string\",\"sensitive\":true,\"sequenceNumber\":0,\"shouldCommit\":true,\"sizeInBytes\":0,\"sortValues\":[\"string\"],\"sourceScripID\":\"string\",\"subtype\":\"string\",\"syncHash\":\"string\",\"system\":true,\"tags\":[\"string\"],\"timeout\":0,\"toServerVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"type\":\"string\",\"user\":\"string\",\"vcShouldIgnore\":true,\"vcShouldKeepItemLegacyProdMachine\":true,\"version\":0,\"visualScript\":\"string\",\"xsoarHasReadOnlyRole\":true,\"xsoarPreviousReadOnlyRoles\":[\"string\"],\"xsoarReadOnlyRoles\":[\"string\"]}}");
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("https://hostname/automation");
var request = new RestRequest(Method.POST);
request.AddHeader("accept", "application/xml");
request.AddHeader("Authorization", "REPLACE_KEY_VALUE");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"filter\":{\"Cache\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"ignoreWorkers\":true,\"page\":0,\"query\":\"string\",\"searchAfter\":[\"string\"],\"searchAfterElastic\":[\"string\"],\"searchAfterMap\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"searchAfterMapOrder\":{\"property1\":0,\"property2\":0},\"searchBefore\":[\"string\"],\"searchBeforeElastic\":[\"string\"],\"size\":0,\"sort\":[{\"asc\":true,\"field\":\"string\",\"fieldType\":\"string\"}]},\"savePassword\":true,\"script\":{\"MainEngineInfo\":{\"engine\":\"string\",\"engineGroup\":\"string\"},\"allRead\":true,\"allReadWrite\":true,\"arguments\":[{\"auto\":\"string\",\"default\":true,\"defaultValue\":\"string\",\"deprecated\":true,\"description\":\"string\",\"hidden\":true,\"isArray\":true,\"name\":\"string\",\"predefined\":[\"string\"],\"required\":true,\"secret\":true,\"type\":\"string\"}],\"cacheVersn\":0,\"comment\":\"string\",\"commitMessage\":\"string\",\"contextKeys\":[\"string\"],\"created\":\"2019-08-24T14:15:22Z\",\"dbotCreatedBy\":\"string\",\"definitionId\":\"string\",\"dependsOn\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"deprecated\":true,\"detached\":true,\"dockerImage\":\"string\",\"enabled\":true,\"engine\":\"string\",\"engineGroup\":\"string\",\"fromServerVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"hasRole\":true,\"hidden\":true,\"highlight\":{\"property1\":[\"string\"],\"property2\":[\"string\"]},\"id\":\"string\",\"important\":[{\"contextPath\":\"string\",\"description\":\"string\",\"related\":\"string\"}],\"indexName\":\"string\",\"itemVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"locked\":true,\"modified\":\"2019-08-24T14:15:22Z\",\"name\":\"string\",\"numericId\":0,\"outputs\":[{\"contentPath\":\"string\",\"contextPath\":\"string\",\"description\":{},\"type\":\"string\"}],\"packID\":\"string\",\"packName\":\"string\",\"packPropagationLabels\":[\"string\"],\"polling\":true,\"prevName\":\"string\",\"previousAllRead\":true,\"previousAllReadWrite\":true,\"previousRoles\":[\"string\"],\"primaryTerm\":0,\"private\":true,\"propagationLabels\":[\"string\"],\"pswd\":\"string\",\"rawTags\":[\"string\"],\"remote\":true,\"roles\":[\"string\"],\"runAs\":\"string\",\"runOnce\":true,\"script\":\"string\",\"scriptTarget\":0,\"searchableName\":\"string\",\"sensitive\":true,\"sequenceNumber\":0,\"shouldCommit\":true,\"sizeInBytes\":0,\"sortValues\":[\"string\"],\"sourceScripID\":\"string\",\"subtype\":\"string\",\"syncHash\":\"string\",\"system\":true,\"tags\":[\"string\"],\"timeout\":0,\"toServerVersion\":{\"Digits\":[0],\"Label\":\"string\"},\"type\":\"string\",\"user\":\"string\",\"vcShouldIgnore\":true,\"vcShouldKeepItemLegacyProdMachine\":true,\"version\":0,\"visualScript\":\"string\",\"xsoarHasReadOnlyRole\":true,\"xsoarPreviousReadOnlyRoles\":[\"string\"],\"xsoarReadOnlyRoles\":[\"string\"]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);filterobjectGenericStringFilter is a general filter that will fetch entities using the Query value
GenericStringFilter is a general filter that will fetch entities using the Query value
CacheobjectCache of join functions
Cache of join functions
Additional propertiesarray[string]
ignoreWorkersbooleanDo not use workers mechanism while searching bleve
Do not use workers mechanism while searching bleve
pageintegerint640-based page
0-based page
querystring
searchAfterarray[string]Efficient next page, pass max sort value from previous page
Efficient next page, pass max sort value from previous page
searchAfterElasticarray[string]Efficient next page, pass max ES sort value from previous page
Efficient next page, pass max ES sort value from previous page
searchAfterMapobjectMap 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.
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.
Additional propertiesarray[string]
searchAfterMapOrderobject
Additional propertiesintegerint64
searchBeforearray[string]Efficient prev page, pass min sort value from next page
Efficient prev page, pass min sort value from next page
searchBeforeElasticarray[string]Efficient prev page, pass min ES sort value from next page
Efficient prev page, pass min ES sort value from next page
sizeintegerint64Size is limited to 1000, if not passed it defaults to 0, and no results will return
Size is limited to 1000, if not passed it defaults to 0, and no results will return
sortarrayThe sort order
The sort order
ascboolean
fieldstring
fieldTypestring
savePasswordboolean
scriptobjectAutomationScript represents a script that will run on the system
AutomationScript represents a script that will run on the system
MainEngineInfoobject
enginestringEngine that will run the script
Engine that will run the script
engineGroupstringEngineGroup that will run the script
EngineGroup that will run the script
allReadboolean
allReadWriteboolean
argumentsarray
autostring
defaultboolean
defaultValuestring
deprecatedboolean
descriptionstring
hiddenboolean
isArrayboolean
namestring
predefinedarray[string]
requiredboolean
secretboolean
typestring
cacheVersnintegerint64
commentstring
commitMessagestring
contextKeysarray[string]
createdstringdate-time
dbotCreatedBystringWho has created this event - relevant only for manual incidents
Who has created this event - relevant only for manual incidents
definitionIdstring
dependsOnobjectThis fields indicates which commands this script depends on
This fields indicates which commands this script depends on
Additional propertiesarray[string]
deprecatedboolean
detachedboolean
dockerImagestring
enabledboolean
enginestringEngine that will run the script
Engine that will run the script
engineGroupstringEngineGroup that will run the script
EngineGroup that will run the script
fromServerVersionobject
Digitsarray[integer]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.
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.
Labelstring
hasRolebooleanInternal field to make queries on role faster
Internal field to make queries on role faster
hiddenboolean
highlightobject
Additional propertiesarray[string]
idstring
importantarray
contextPathstring
descriptionstringDescription is either a string or a map from string to interface
Description is either a string or a map from string to interface
relatedstringTo what other context path this output is related
To what other context path this output is related
indexNamestring
itemVersionobject
Digitsarray[integer]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.
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.
Labelstring
lockedboolean
modifiedstringdate-time
namestring
numericIdintegerint64
outputsarray
contentPathstring
contextPathstring
descriptionobjectDescription is either a string or a map from string to interface
Description is either a string or a map from string to interface
typestring
packIDstring
packNamestring
packPropagationLabelsarray[string]
pollingboolean
prevNamestring
previousAllReadboolean
previousAllReadWriteboolean
previousRolesarray[string]Do not change this field manually
Do not change this field manually
primaryTermintegerint64
privateboolean
propagationLabelsarray[string]
pswdstring
rawTagsarray[string]
remoteboolean
rolesarray[string]The role assigned to this investigation
The role assigned to this investigation
runAsstring
runOnceboolean
scriptstring
scriptTargetintegerint64ScriptTarget represents the module where this script should run
ScriptTarget represents the module where this script should run
searchableNamestring
sensitiveboolean
sequenceNumberintegerint64
shouldCommitboolean
sizeInBytesintegerint64
sortValuesarray[string]
sourceScripIDstring
subtypestringScriptSubType holds the script type version
ScriptSubType holds the script type version
syncHashstring
systemboolean
tagsarray[string]
timeoutintegerint64A Duration represents the elapsed time between two instants
as an int64 nanosecond count. The representation limits the
largest representable duration to approximately 290 years.
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.
toServerVersionobject
Digitsarray[integer]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.
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.
Labelstring
typestringScriptType holds the type of a script
ScriptType holds the type of a script
userstring
vcShouldIgnoreboolean
vcShouldKeepItemLegacyProdMachineboolean
versionintegerint64
visualScriptstring
xsoarHasReadOnlyRoleboolean
xsoarPreviousReadOnlyRolesarray[string]
xsoarReadOnlyRolesarray[string]
{
"filter": {
"Cache": {
"additionalProperties": [
"example"
]
},
"ignoreWorkers": false,
"page": 0,
"query": "example",
"searchAfter": [
"example"
],
"searchAfterElastic": [
"example"
],
"searchAfterMap": {
"additionalProperties": [
"example"
]
},
"searchAfterMapOrder": {
"additionalProperties": 0
},
"searchBefore": [
"example"
],
"searchBeforeElastic": [
"example"
],
"size": 0,
"sort": [
{
"asc": false,
"field": "example",
"fieldType": "example"
}
]
},
"savePassword": false,
"script": {
"MainEngineInfo": {
"engine": "example",
"engineGroup": "example"
},
"allRead": false,
"allReadWrite": false,
"arguments": [
{
"auto": "example",
"default": false,
"defaultValue": "example",
"deprecated": false,
"description": "example",
"hidden": false,
"isArray": false,
"name": "example",
"predefined": [
"example"
],
"required": false,
"secret": false,
"type": "example"
}
],
"cacheVersn": 0,
"comment": "example",
"commitMessage": "example",
"contextKeys": [
"example"
],
"created": "2020-01-01T12:00:00Z",
"dbotCreatedBy": "example",
"definitionId": "example",
"dependsOn": {
"additionalProperties": [
"example"
]
},
"deprecated": false,
"detached": false,
"dockerImage": "example",
"enabled": false,
"engine": "example",
"engineGroup": "example",
"fromServerVersion": {
"Digits": [
0
],
"Label": "example"
},
"hasRole": false,
"hidden": false,
"highlight": {
"additionalProperties": [
"example"
]
},
"id": "example",
"important": [
{
"contextPath": "example",
"description": "example",
"related": "example"
}
],
"indexName": "example",
"itemVersion": {
"Digits": [
0
],
"Label": "example"
},
"locked": false,
"modified": "2020-01-01T12:00:00Z",
"name": "example",
"numericId": 0,
"outputs": [
{
"contentPath": "example",
"contextPath": "example",
"description": {},
"type": "example"
}
],
"packID": "example",
"packName": "example",
"packPropagationLabels": [
"example"
],
"polling": false,
"prevName": "example",
"previousAllRead": false,
"previousAllReadWrite": false,
"previousRoles": [
"example"
],
"primaryTerm": 0,
"private": false,
"propagationLabels": [
"example"
],
"pswd": "example",
"rawTags": [
"example"
],
"remote": false,
"roles": [
"example"
],
"runAs": "example",
"runOnce": false,
"script": "example",
"scriptTarget": 0,
"searchableName": "example",
"sensitive": false,
"sequenceNumber": 0,
"shouldCommit": false,
"sizeInBytes": 0,
"sortValues": [
"example"
],
"sourceScripID": "example",
"subtype": "example",
"syncHash": "example",
"system": false,
"tags": [
"example"
],
"timeout": 0,
"toServerVersion": {
"Digits": [
0
],
"Label": "example"
},
"type": "example",
"user": "example",
"vcShouldIgnore": false,
"vcShouldKeepItemLegacyProdMachine": false,
"version": 0,
"visualScript": "example",
"xsoarHasReadOnlyRole": false,
"xsoarPreviousReadOnlyRoles": [
"example"
],
"xsoarReadOnlyRoles": [
"example"
]
}
}<root>
<filter>
<Cache/>
<ignoreWorkers>false</ignoreWorkers>
<page>0</page>
<query>example</query>
<searchAfter>
<searchAfter>example</searchAfter>
<searchAfter>example</searchAfter>
</searchAfter>
<searchAfterElastic>
<searchAfterElastic>example</searchAfterElastic>
<searchAfterElastic>example</searchAfterElastic>
</searchAfterElastic>
<searchAfterMap/>
<searchAfterMapOrder/>
<searchBefore>
<searchBefore>example</searchBefore>
<searchBefore>example</searchBefore>
</searchBefore>
<searchBeforeElastic>
<searchBeforeElastic>example</searchBeforeElastic>
<searchBeforeElastic>example</searchBeforeElastic>
</searchBeforeElastic>
<size>0</size>
<sort>
<sort>
<asc>false</asc>
<field>example</field>
<fieldType>example</fieldType>
</sort>
<sort>
<asc>false</asc>
<field>example</field>
<fieldType>example</fieldType>
</sort>
</sort>
</filter>
<savePassword>false</savePassword>
<script>
<MainEngineInfo>
<engine>example</engine>
<engineGroup>example</engineGroup>
</MainEngineInfo>
<allRead>false</allRead>
<allReadWrite>false</allReadWrite>
<arguments>
<arguments>
<auto>example</auto>
<default>false</default>
<defaultValue>example</defaultValue>
<deprecated>false</deprecated>
<description>example</description>
<hidden>false</hidden>
<isArray>false</isArray>
<name>example</name>
<predefined>
<predefined>example</predefined>
<predefined>example</predefined>
</predefined>
<required>false</required>
<secret>false</secret>
<type>example</type>
</arguments>
<arguments>
<auto>example</auto>
<default>false</default>
<defaultValue>example</defaultValue>
<deprecated>false</deprecated>
<description>example</description>
<hidden>false</hidden>
<isArray>false</isArray>
<name>example</name>
<predefined>
<predefined>example</predefined>
<predefined>example</predefined>
</predefined>
<required>false</required>
<secret>false</secret>
<type>example</type>
</arguments>
</arguments>
<cacheVersn>0</cacheVersn>
<comment>example</comment>
<commitMessage>example</commitMessage>
<contextKeys>
<contextKeys>example</contextKeys>
<contextKeys>example</contextKeys>
</contextKeys>
<created>2020-01-01t12:00:00z</created>
<dbotCreatedBy>example</dbotCreatedBy>
<definitionId>example</definitionId>
<dependsOn/>
<deprecated>false</deprecated>
<detached>false</detached>
<dockerImage>example</dockerImage>
<enabled>false</enabled>
<engine>example</engine>
<engineGroup>example</engineGroup>
<fromServerVersion>
<Digits>
<Digits>0</Digits>
<Digits>0</Digits>
</Digits>
<Label>example</Label>
</fromServerVersion>
<hasRole>false</hasRole>
<hidden>false</hidden>
<highlight/>
<id>example</id>
<important>
<important>
<contextPath>example</contextPath>
<description>example</description>
<related>example</related>
</important>
<important>
<contextPath>example</contextPath>
<description>example</description>
<related>example</related>
</important>
</important>
<indexName>example</indexName>
<itemVersion>
<Digits>
<Digits>0</Digits>
<Digits>0</Digits>
</Digits>
<Label>example</Label>
</itemVersion>
<locked>false</locked>
<modified>2020-01-01t12:00:00z</modified>
<name>example</name>
<numericId>0</numericId>
<outputs>
<outputs>
<contentPath>example</contentPath>
<contextPath>example</contextPath>
<description/>
<type>example</type>
</outputs>
<outputs>
<contentPath>example</contentPath>
<contextPath>example</contextPath>
<description/>
<type>example</type>
</outputs>
</outputs>
<packID>example</packID>
<packName>example</packName>
<packPropagationLabels>
<packPropagationLabels>example</packPropagationLabels>
<packPropagationLabels>example</packPropagationLabels>
</packPropagationLabels>
<polling>false</polling>
<prevName>example</prevName>
<previousAllRead>false</previousAllRead>
<previousAllReadWrite>false</previousAllReadWrite>
<previousRoles>
<previousRoles>example</previousRoles>
<previousRoles>example</previousRoles>
</previousRoles>
<primaryTerm>0</primaryTerm>
<private>false</private>
<propagationLabels>
<propagationLabels>example</propagationLabels>
<propagationLabels>example</propagationLabels>
</propagationLabels>
<pswd>example</pswd>
<rawTags>
<rawTags>example</rawTags>
<rawTags>example</rawTags>
</rawTags>
<remote>false</remote>
<roles>
<roles>example</roles>
<roles>example</roles>
</roles>
<runAs>example</runAs>
<runOnce>false</runOnce>
<script>example</script>
<scriptTarget>0</scriptTarget>
<searchableName>example</searchableName>
<sensitive>false</sensitive>
<sequenceNumber>0</sequenceNumber>
<shouldCommit>false</shouldCommit>
<sizeInBytes>0</sizeInBytes>
<sortValues>
<sortValues>example</sortValues>
<sortValues>example</sortValues>
</sortValues>
<sourceScripID>example</sourceScripID>
<subtype>example</subtype>
<syncHash>example</syncHash>
<system>false</system>
<tags>
<tags>example</tags>
<tags>example</tags>
</tags>
<timeout>0</timeout>
<toServerVersion>
<Digits>
<Digits>0</Digits>
<Digits>0</Digits>
</Digits>
<Label>example</Label>
</toServerVersion>
<type>example</type>
<user>example</user>
<vcShouldIgnore>false</vcShouldIgnore>
<vcShouldKeepItemLegacyProdMachine>false</vcShouldKeepItemLegacyProdMachine>
<version>0</version>
<visualScript>example</visualScript>
<xsoarHasReadOnlyRole>false</xsoarHasReadOnlyRole>
<xsoarPreviousReadOnlyRoles>
<xsoarPreviousReadOnlyRoles>example</xsoarPreviousReadOnlyRoles>
<xsoarPreviousReadOnlyRoles>example</xsoarPreviousReadOnlyRoles>
</xsoarPreviousReadOnlyRoles>
<xsoarReadOnlyRoles>
<xsoarReadOnlyRoles>example</xsoarReadOnlyRoles>
<xsoarReadOnlyRoles>example</xsoarReadOnlyRoles>
</xsoarReadOnlyRoles>
</script>
</root>