DemistoLinkIncidents Deprecated

Deprecated. No available replacement.

javascript · Cortex REST API

Source

var body = {
    id: args.masterID,
    otherIncidentsIDs: args.otherIDs.split(','),
    removeLink: (args.unlink === 'yes')
};

var res = executeCommand('core-api-post', {uri: '/incident/links', body: body});

if (isError(res[0])) {
    throw res[0].Contents;
}

var response = res[0].Contents.response;
var md = tableToMarkdown('Demisto link incidents', response);

return {
    ContentsFormat: formats.json,
    Type: entryTypes.note,
    Contents: response,
    HumanReadable: md
};

README

Links two or more incidents.

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
masterID The incident ID used to link to other incidents.
otherIDs The incident IDs to link.
unlink Whether to unlink incidents. The default is “no”.

Outputs


There are no outputs for this script.