Add or update a widget

Cortex XSOAR API

post /widgets Show code example
CURL
curl -X POST \ -H "Authorization: [[apiKey]]" \ -H "Accept: application/json" \ -H "Content-Type: application/json,application/xml" \ "https://hostname:443/widgets" \ -d '{ "sizeInBytes" : 7, "syncHash" : "syncHash", "remote" : true, "searchAfterElastic" : [ "searchAfterElastic", "searchAfterElastic" ], "searchBefore" : [ "searchBefore", "searchBefore" ], "toServerVersion" : { "Digits" : [ 5, 5 ], "Label" : "Label" }, "modified" : "2000-01-23T04:56:07.000+00:00", "id" : "id", "locked" : true, "numericId" : 4, "sequenceNumber" : 1, "isPredefined" : true, "searchAfterMapOrder" : { "key" : 1 }, "created" : "2000-01-23T04:56:07.000+00:00", "indexName" : "indexName", "dataType" : "dataType", "query" : "query", "sort" : [ { "asc" : true, "field" : "field", "fieldType" : "fieldType" }, { "asc" : true, "field" : "field", "fieldType" : "fieldType" } ], "params" : { "key" : "{}" }, "shouldCommit" : true, "version" : 1, "widgetType" : "widgetType", "size" : 6, "name" : "name", "searchAfter" : [ "searchAfter", "searchAfter" ], "page" : 7, "propagationLabels" : [ "propagationLabels", "propagationLabels" ], "Cache" : { "key" : [ "Cache", "Cache" ] }, "commitMessage" : "commitMessage", "dateRange" : { "fromDate" : "2000-01-23T04:56:07.000+00:00", "fromDateLicense" : "2000-01-23T04:56:07.000+00:00", "period" : { "fromValue" : "fromValue", "toValue" : "toValue", "byFrom" : "byFrom", "field" : "field", "by" : "by", "byTo" : "byTo" }, "toDate" : "2000-01-23T04:56:07.000+00:00" }, "ignoreWorkers" : true, "primaryTerm" : 1, "description" : "description", "packID" : "packID", "highlight" : { "key" : [ "highlight", "highlight" ] }, "vcShouldIgnore" : true, "prevName" : "prevName", "definition" : { "sizeInBytes" : 3, "commitMessage" : "commitMessage", "primaryTerm" : 7, "partitioned" : true, "syncHash" : "syncHash", "remote" : true, "packID" : "packID", "highlight" : { "key" : [ "highlight", "highlight" ] }, "toServerVersion" : { "Digits" : [ 5, 5 ], "Label" : "Label" }, "vcShouldIgnore" : true, "modified" : "2000-01-23T04:56:07.000+00:00", "prevName" : "prevName", "id" : "id", "locked" : true, "definitionId" : "definitionId", "fromServerVersion" : { "Digits" : [ 5, 5 ], "Label" : "Label" }, "numericId" : 2, "sequenceNumber" : 9, "pluralName" : "pluralName", "created" : "2000-01-23T04:56:07.000+00:00", "indexName" : "indexName", "itemVersion" : { "Digits" : [ 5, 5 ], "Label" : "Label" }, "packPropagationLabels" : [ "packPropagationLabels", "packPropagationLabels" ], "cacheVersn" : 5, "shouldCommit" : true, "sortValues" : [ "sortValues", "sortValues" ], "vcShouldKeepItemLegacyProdMachine" : true, "version" : 2, "system" : true, "auditable" : true, "name" : "name", "packName" : "packName", "propagationLabels" : [ "propagationLabels", "propagationLabels" ], "rbacSupport" : true }, "definitionId" : "definitionId", "fromServerVersion" : { "Digits" : [ 5, 5 ], "Label" : "Label" }, "searchAfterMap" : { "key" : [ "searchAfterMap", "searchAfterMap" ] }, "itemVersion" : { "Digits" : [ 5, 5 ], "Label" : "Label" }, "packPropagationLabels" : [ "packPropagationLabels", "packPropagationLabels" ], "searchBeforeElastic" : [ "searchBeforeElastic", "searchBeforeElastic" ], "cacheVersn" : 5, "sortValues" : [ "sortValues", "sortValues" ], "vcShouldKeepItemLegacyProdMachine" : true, "skipAggregateAccounts" : true, "accounts" : { "key" : "{}" }, "category" : "category", "packName" : "packName" }' \ -d ' UNDEFINED_EXAMPLE_VALUE UNDEFINED_EXAMPLE_VALUE 123456789 aeiou aeiou 2000-01-23T04:56:07.000Z aeiou aeiou aeiou UNDEFINED_EXAMPLE_VALUE aeiou true aeiou true true 2000-01-23T04:56:07.000Z aeiou 123456789 aeiou aeiou aeiou 123456789 UNDEFINED_EXAMPLE_VALUE aeiou 123456789 aeiou aeiou true aeiou aeiou UNDEFINED_EXAMPLE_VALUE UNDEFINED_EXAMPLE_VALUE aeiou aeiou 123456789 true 123456789 123456789 true aeiou aeiou true true 123456789 aeiou '
Add or update a given widget based on Id.