Import a widget

Cortex XSOAR 6 API

post /widgets/import

Import a widget to the system, ignoring ID or version, used to import new widgets.

CURL
curl -X POST \ -H "Authorization: [[apiKey]]" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ "https://hostname:443/widgets/import"
Authentication: api_key Api Key "Authorization"
Form parameters
file
required
Object format: binary
The JSON file of the widget to import. format: binary
Example: BINARY_DATA_HERE
Responses

The saved widget

Body
Widget describe a widget component used to get statistics requests, based on parameters such as dataType and widgetType. A widget can be a part of widgets collection inside a dashboard.
Cache
optional
Map
Cache of join functions
accounts
optional
Map of objects
Accounts list of accounts to query the widget data from
cacheVersn
optional
Number (Long)
format: int64
category
optional
String
Category the widget is related to. Used to display in widget library under category or dataType if empty.
commitMessage
optional
String
created
optional
Object
format: date-time
dataType
optional
String
Data type of the widget. Describes what data does the widget query. supporting data types "incidents","messages","system","entries","tasks", "audit".
dateRange
optional
DateRange provides common fields for date filtering
fromDate
optional
Object
format: date-time
fromDateLicense
optional
Object
format: date-time
period
optional
by
optional
String
By is used for legacty, and if exists it will override ByTo and ByFrom
byFrom
optional
String
byTo
optional
String
field
optional
String
fromValue
optional
String
format: duration
toValue
optional
String
format: duration
toDate
optional
Object
format: date-time
definition
optional
auditable
optional
Boolean
cacheVersn
optional
Number (Long)
format: int64
commitMessage
optional
String
created
optional
Object
format: date-time
definitionId
optional
String
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
highlight
optional
Map
id
optional
String
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
packID
optional
String
packName
optional
String
packPropagationLabels
optional
Array of strings
partitioned
optional
Boolean
pluralName
optional
String
prevName
optional
String
primaryTerm
optional
Number (Long)
format: int64
propagationLabels
optional
Array of strings
rbacSupport
optional
Boolean
remote
optional
Boolean
sequenceNumber
optional
Number (Long)
format: int64
shouldCommit
optional
Boolean
sizeInBytes
optional
Number (Long)
format: int64
sortValues
optional
Array of strings
syncHash
optional
String
system
optional
Boolean
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
vcShouldIgnore
optional
Boolean
vcShouldKeepItemLegacyProdMachine
optional
Boolean
version
optional
Number (Long)
format: int64
definitionId
optional
String
description
optional
String
The description of the widget's usage and data representation.
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
highlight
optional
Map
id
optional
String
ignoreWorkers
optional
Boolean
Do not use workers mechanism while searching bleve
indexName
optional
String
isPredefined
optional
Boolean
Is the widget a system widget.
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
Is the widget locked for editing.
modified
optional
Object
format: date-time
name
required
String
Default name of the widget.
numericId
optional
Number (Long)
format: int64
packID
optional
String
packName
optional
String
packPropagationLabels
optional
Array of strings
page
optional
Number (Long)
0-based page format: int64
params
optional
Map of objects
Additional parameters for this widget, depends on widget type and data.
prevName
optional
String
The previous name of the widget.
primaryTerm
optional
Number (Long)
format: int64
propagationLabels
optional
Array of strings
query
optional
String
Query to search on the dataType.
remote
optional
Boolean
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
sequenceNumber
optional
Number (Long)
format: int64
shouldCommit
optional
Boolean
size
optional
Number (Long)
Size is limited to 1000, if not passed it defaults to 0, and no results will return format: int64
sizeInBytes
optional
Number (Long)
format: int64
skipAggregateAccounts
optional
Boolean
SkipAggregateAccounts flag that indicates whether to skip aggregate accounts results
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
sortValues
optional
Array of strings
syncHash
optional
String
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
vcShouldIgnore
optional
Boolean
vcShouldKeepItemLegacyProdMachine
optional
Boolean
version
optional
Number (Long)
format: int64
widgetType
required
String
Widget type describes how does the widget should recieve the data, and display it. Supporting types: "bar", "column", "pie", "list", "number", "trend", "text", "duration", "image", "line", and "table".