DemistoCreateList
Create a new list.
- Type
- javascript
- Pack
- DemistoRESTAPI
Source
var body = {
name: args.listName,
data: args.listData,
};
var res = executeCommand('core-api-post', {uri: '/lists/save', body: body});
if (isError(res[0])) {
throw res[0].Contents;
}
var response = res[0].Contents.response;
var md = tableToMarkdown('Demisto create list', response);
return {
ContentsFormat: formats.json,
Type: entryTypes.note,
Contents: response,
HumanReadable: md
};
README
Creates a new list.
Script Data
| Name | Description |
|---|---|
| Script Type | javascript |
| Tags | DemistoAPI |
Dependencies
This script uses the following commands and scripts.
- core-api-post
Inputs
| Argument Name | Description |
|---|---|
| listName | The name of the list to create. |
| listData | The initial data of the list. |
Outputs
There are no outputs for this script.