Skip to main content

GetIncidentTasks

This Script is part of the Cortex REST API Pack.#

Supported versions

Supported Cortex XSOAR versions: 6.10.0 and later.

Get all tasks for a specific incident by the given state, name and/or tag.

Script Data#


NameDescription
Script Typepython3
TagsUtility
Cortex XSOAR Version6.10.0

Inputs#


Argument NameDescription
inc_idIncident ID to get tasks from.
statesComma-separated list of states. Possible values: New, InProgress, Completed, Waiting, Error, LoopError, Skipped, Blocked. (Leave empty to get all tasks).
nameThe name of the task to search.
tagThe tag to search.

Outputs#


PathDescriptionType
TasksThe entire task object.Unknown
Tasks.idTask ID.string
Tasks.nameTask name.string
Tasks.typeThe type of the task (regular, condition, title, playbook, start).string
Tasks.ownerTask owner.string
Tasks.stateTask state (inprogress, Completed, WillNotBeExecuted, Error, LoopError, Waiting, Blocked, and empty string for not started).string
Tasks.scriptIdTask related script (empty if manual).string
Tasks.startDateTask start date.unknown
Tasks.completedDateTask completed date.unknown
Tasks.dueDateTask due date (SLA).unknown
Tasks.parentPlaybookIDTask parent playbook ID (in case the task is part of a sub-playbook).unknown
Tasks.completedByTask completed by (username).string

Script Examples#

Example command#

!GetIncidentTasks inc_id=10 name="Email Campaign Search"

Context Example#

{
"Tasks": {
"completedBy": "DBot",
"completedDate": "2024-01-09T12:26:33.75641877Z",
"dueDate": "0001-01-01T00:00:00Z",
"id": "101",
"name": "Email Campaign Search",
"owner": "Dummy",
"parentPlaybookID": null,
"scriptId": null,
"startDate": "0001-01-01T00:00:00Z",
"state": "Completed",
"type": "title"
}
}

Human Readable Output#

Incident #10 Playbook Tasks#

idnamestateownerscriptId
101Email Campaign SearchCompletedDummy