> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xsoar-6-api/cortex-xsoar-6.x-apis/playbooks.md).

# Playbooks

APIs for managing playbooks

## Add ad-hoc task

> Add an ad-hoc task to a running playbook

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"requestBodies":{"InvPlaybookTaskData":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvPlaybookTaskData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InvPlaybookTaskData"}}}}},"schemas":{"InvPlaybookTaskData":{"type":"object","title":"InvPlaybookTaskData ...","properties":{"addAfter":{"type":"boolean"},"addToSeparateBranch":{"type":"boolean"},"automationScript":{"type":"string"},"description":{"type":"string"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"name":{"type":"string"},"neighborInvPBTaskId":{"type":"string"},"playbookId":{"type":"string"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"}}},"TaskLoop":{"type":"object","description":"TaskLoop contains loop details","properties":{"brand":{"type":"string"},"builtinCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"exitCondition":{"type":"string"},"forEach":{"type":"boolean"},"isCommand":{"type":"boolean"},"max":{"type":"integer","format":"int64"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"scriptId":{"type":"string"},"scriptName":{"type":"string"},"wait":{"type":"integer","format":"int64"}}},"ArgFilter":{"type":"array","description":"ArgFilter - represent a slice of atomic filters with OR condition between them (e.i. - atomic1 OR atomic2 OR ...)","items":{"$ref":"#/components/schemas/ArgAtomicFilter"}},"ArgAtomicFilter":{"type":"object","description":"ArgAtomicFilter - operator with two sides that return true/false","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}}},"OperatorArgument":{"type":"object","title":"OperatorArgument ...","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"AdvanceArg":{"type":"object","title":"AdvanceArg - advance argument can be one of the following:","description":"Simple: plain text such as \"hello\" (constant) or ${File.ID} (DT expression)\nComplex: struct with all info that is necessary to compute argument value from context (Root, Filters, Accessor & Transformers)]\nKeyValue: list of key-value","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}}},"ComplexArg":{"type":"object","description":"ComplexArg - all info that is necessary to compute argument value from context\nRoot - the root slice (or object) from to work against\nFilters - a slice of filters to apply to the root object, one after another (e.i. with AND condition between each one)\nAccessor - the key to access to each result after filter\nTransformers - a slice to transformers to apply on the result of the accessed key from each result\ne.g. if user want to take from context all File.DisplayName where File.Extension is 'EXE', and the result in uppercase than:\nRoot: is \"File\"\nFilters: will hold the \"File.DisplayName where File.Extension is 'EXE'\" query\nAccessor: is \"DisplayName\"\nTransformers: will hold the uppercase transformation","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}}},"ArgTransformer":{"type":"object","title":"ArgTransformer ...","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"type":"string","title":"TransformerOperatorID ..."},"KeyValueArg":{"type":"object","title":"KeyValueArg ...","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"type":"string","title":"FilterOperatorID ..."},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"InvestigationPlaybook":{"type":"object","description":"InvestigationPlaybook is a wrapper for a linked list of Playbook tasks","properties":{"Dirty":{"type":"boolean"},"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"ReplacedPlaybook":{"type":"boolean","description":"Indicate whether this playbook has new history during this session"},"ShardID":{"type":"integer","format":"int64"},"UpdatedOperatorIDs":{"type":"boolean"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"autoExtracting":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"comment":{"type":"string"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentCreateDate":{"type":"string","description":"Incident create date","format":"date-time"},"indexName":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"invPBDebugInfo":{"$ref":"#/components/schemas/InvPlaybookDebugInfo"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pbHistory":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/InvestigationPlaybookData"}},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"quiet":{"type":"boolean"},"recoveryAttempts":{"type":"integer","format":"int64"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"serverId":{"type":"string","description":"Holds the ID of the responsible cluster app server"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"syncHash":{"type":"string"},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"version":{"type":"integer","format":"int64"},"view":{"$ref":"#/components/schemas/PlaybookView"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","description":"PlaybookInput represents the playbook input","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"PlaybookInputQuery":{"type":"object","description":"PlaybookInputQuery represents the playbook query input","properties":{"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string"},"queryEntity":{"type":"string"},"queryState":{"$ref":"#/components/schemas/QueryState"},"results":{"type":"object"},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}}},"Period":{"type":"object","title":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now.","properties":{"by":{"type":"string","description":"By is used for legacty, and if exists it will override ByTo and ByFrom"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}}},"QueryState":{"type":"object","description":"QueryState represents the playbook query state","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}}},"InvPlaybookDebugInfo":{"type":"object","title":"InvPlaybookDebugInfo ...","properties":{"originalInvPBId":{"type":"string"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","description":"PlaybookOutput represents the playbook output","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}}},"OutputType":{"type":"string","title":"OutputType ..."},"InvestigationPlaybookData":{"type":"object","description":"InvestigationPlaybookData returns all data of an investigation playbook, not including history","properties":{"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"autoExtracting":{"type":"boolean"},"comment":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"name":{"type":"string"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"quiet":{"type":"boolean"},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"view":{"$ref":"#/components/schemas/PlaybookView"}}},"InvestigationPlaybookState":{"type":"string","description":"InvestigationPlaybookState indicates the state of the running playbook"},"InvestigationPlaybookTask":{"type":"object","description":"InvestigationPlaybookTask is the Task in the playbook context as a node","properties":{"Reopen":{"type":"boolean"},"arguments":{"type":"object","additionalProperties":{"type":"object"}},"assignee":{"type":"string"},"assigneeSet":{"type":"boolean"},"blockingTasks":{"type":"array","items":{"type":"string"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"comments":{"type":"boolean","description":"Whether this task had any comments or not"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"conditions":{"type":"array","description":"Conditions - optional list of conditions to run when task is conditional. we check conditions by their order (e.i. - considering the first one that satisfied)","items":{"$ref":"#/components/schemas/TaskCondition"}},"continueOnError":{"type":"boolean"},"continueOnErrorType":{"$ref":"#/components/schemas/ContinueOnErrorType"},"defaultAssignee":{"type":"string"},"defaultAssigneeComplex":{"$ref":"#/components/schemas/AdvanceArg"},"defaultReminder":{"type":"integer","format":"int64"},"doNotSaveTaskHistory":{"type":"boolean"},"dueDate":{"type":"string","format":"date-time"},"dueDateDuration":{"type":"integer","format":"int64"},"dueDateDurationUnit":{"$ref":"#/components/schemas/SLADurationUnit"},"dueDateSet":{"type":"boolean"},"entries":{"type":"array","items":{"type":"string"}},"evidenceData":{"$ref":"#/components/schemas/EvidenceData"},"executionCount":{"type":"integer","format":"int64"},"externalFormUseAuth":{"type":"boolean"},"fieldMapping":{"type":"array","items":{"$ref":"#/components/schemas/FieldMapping"}},"forEachIndex":{"type":"integer","description":"Parameters needed for loops","format":"int64"},"forEachInputs":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object"}}},"form":{"$ref":"#/components/schemas/DataCollectionForm"},"formDisplay":{"$ref":"#/components/schemas/FormDisplay"},"hasErrorEntries":{"type":"boolean"},"id":{"type":"string"},"ignoreWorker":{"type":"boolean","description":"Do not run this task in a worker"},"indent":{"type":"integer","format":"int64"},"input":{"type":"string"},"isAutoSwitchedToQuietMode":{"type":"boolean"},"isOverSize":{"type":"boolean"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"message":{"$ref":"#/components/schemas/NotifiableItem"},"missingContentItem":{"type":"string","description":"content item which caused task to skip"},"nextPollingTime":{"type":"string","description":"NextPollTime Time of the next scheduled command execution","format":"date-time"},"nextTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"note":{"type":"boolean"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"parentBlockCount":{"type":"integer","description":"the number of tasks that are waiting on blocked in subplaybooks of this task","format":"int64"},"parentPlaybookID":{"type":"string"},"patched":{"type":"boolean","description":"Indicates whether this task was patched to InvPB and did not originally belong to the playbook"},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"pollingEntries":{"type":"array","description":"PollingEntryIDs IDs of entries that are still polling","items":{"type":"string"}},"pollingTimeoutTime":{"type":"string","format":"date-time"},"previousTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"quietMode":{"$ref":"#/components/schemas/QuietMode"},"reminder":{"type":"integer","description":"Duration in minutes, this field is not persisted here","format":"int64"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"restrictedCompletion":{"type":"boolean"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"skip":{"type":"boolean","description":"Skip - if true then this task will be skipped and all the tasks which comes after this task and depend on it\nwill skip (WillNotExecute)"},"skipUnavailable":{"type":"boolean","description":"SkipUnavailable if true then will check if automation exists, integration of that command is installed and\nactive or sub playbook exists in Demisto"},"sla":{"$ref":"#/components/schemas/SLA"},"slaReminder":{"$ref":"#/components/schemas/SLA"},"startDate":{"type":"string","format":"date-time"},"startedExecutingHarmfulScript":{"type":"boolean"},"state":{"$ref":"#/components/schemas/TaskState"},"subPlaybook":{"$ref":"#/components/schemas/InvestigationPlaybook"},"task":{"$ref":"#/components/schemas/Task"},"taskCompleteData":{"type":"array","description":"History complete data","items":{"$ref":"#/components/schemas/InvPlaybookTaskCompleteData"}},"taskDebug":{"$ref":"#/components/schemas/InvTaskDebug"},"taskId":{"type":"string"},"taskSize":{"type":"integer","format":"int64"},"timerTriggers":{"type":"array","description":"SLA fields","items":{"$ref":"#/components/schemas/TimerTrigger"}},"timesPolled":{"type":"integer","format":"int64"},"type":{"$ref":"#/components/schemas/TaskType"},"view":{"$ref":"#/components/schemas/TaskView"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"TaskCondition":{"type":"object","description":"TaskCondition - contains a condition and a corresponding label\nif the condition satisfied - its label is taken as the next task(s) input (e.i. the label on the edge)","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}}},"ContinueOnErrorType":{"type":"string","title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path."},"SLADurationUnit":{"type":"integer","description":"SLADurationUnit is a helper to calculate if SLA in hours or minutes","format":"int64"},"EvidenceData":{"type":"object","description":"EvidenceData - all evidence properties to evaluate in task process","properties":{"customFields":{"type":"object","description":"This field must have empty json key","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}}},"FieldMapping":{"type":"object","description":"FieldMapping - Map a task output (complex or simple value) to an incident field","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}}},"DataCollectionForm":{"type":"object","title":"DataCollectionForm - a data collection form with questions.","properties":{"description":{"type":"string"},"expired":{"type":"boolean"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"sender":{"type":"string"},"title":{"type":"string"},"totalAnswers":{"type":"integer","format":"uint64"}}},"Question":{"type":"object","title":"Question - question for a form with a given type.","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"fieldAssociated":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"labelArg":{"$ref":"#/components/schemas/AdvanceArg"},"options":{"type":"array","items":{"type":"string"}},"optionsArg":{"type":"array","items":{"$ref":"#/components/schemas/AdvanceArg"}},"placeholder":{"type":"string"},"readOnly":{"type":"boolean"},"required":{"type":"boolean"},"tooltip":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"FormDisplay":{"type":"object","title":"FormDisplay - display options for communication/ask task (for both email and web forms).","properties":{"bodyBackgroundColor":{"type":"string"},"bodyFontColor":{"type":"string"},"headerBackgroundColor":{"type":"string"},"headerFontColor":{"type":"string"},"isExternalRtl":{"type":"boolean"},"sender":{"type":"string"},"submitButtonBackgroundColor":{"type":"string"},"submitButtonFontColor":{"type":"string"},"submitText":{"type":"string"}}},"NotifiableItem":{"type":"object","title":"NotifiableItem ...","properties":{"bcc":{"$ref":"#/components/schemas/AdvanceArg"},"body":{"$ref":"#/components/schemas/AdvanceArg"},"cc":{"$ref":"#/components/schemas/AdvanceArg"},"defaultOption":{"type":"string"},"format":{"type":"string"},"methods":{"type":"array","items":{"type":"string"}},"replyOptions":{"type":"array","items":{"type":"string"}},"subject":{"$ref":"#/components/schemas/AdvanceArg"},"timings":{"$ref":"#/components/schemas/NotifyTimings"},"to":{"$ref":"#/components/schemas/AdvanceArg"}}},"NotifyTimings":{"type":"object","title":"NotifyTimings - time control on notify items - retries max count and intervals.","properties":{"completeAfterReplies":{"type":"integer","format":"uint64"},"completeAfterSLA":{"type":"boolean"},"completeAfterV2":{"type":"boolean"},"retriesCount":{"type":"integer","format":"uint64"},"retriesInterval":{"type":"integer","format":"uint64"}}},"QuietMode":{"type":"integer","description":"QuietMode quiet mode for playbook task","format":"int64"},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"},"SLA":{"type":"object","title":"SLA ...","properties":{"days":{"type":"integer","format":"int64"},"hours":{"type":"integer","format":"int64"},"minutes":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"}}},"TaskState":{"type":"string","description":"TaskState indicates the state of the task during the incident/investigation execution"},"Task":{"type":"object","description":"Task is the basic task in the task repository that can be associated to an incident via playbook","properties":{"brand":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"clonedFrom":{"type":"string"},"comment":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"created":{"type":"string","format":"date-time"},"description":{"type":"string"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isCommand":{"type":"boolean"},"isLocked":{"type":"boolean"},"isTitleTask":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"playbookId":{"type":"string"},"playbookName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"scriptId":{"type":"string"},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"},"version":{"type":"integer","format":"int64"}}},"InvPlaybookTaskCompleteData":{"type":"object","title":"InvPlaybookTaskCompleteData ...","properties":{"arguments":{"type":"object","additionalProperties":{"type":"object"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"entries":{"type":"array","items":{"type":"string"}},"hasErrorEntries":{"type":"boolean"},"input":{"type":"string"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"startDate":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/TaskState"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"InvTaskDebug":{"type":"object","title":"InvTaskDebug ...","properties":{"breakpointCondition":{"$ref":"#/components/schemas/ArgFilter"},"inputOverrides":{"type":"object","additionalProperties":{"type":"string"}},"isMarkedWithBreakpoint":{"type":"boolean"},"isMarkedWithSkip":{"type":"boolean"},"outputOverrides":{"type":"object","additionalProperties":{"type":"object"}},"shouldOverrideDebugInfo":{"type":"boolean"},"skipConditionOverrideTo":{"type":"string"},"taskOriginalId":{"type":"string"}}},"TimerTrigger":{"type":"object","title":"TimerTrigger ...","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"type":"string","title":"TimerAction ..."},"TaskView":{"type":"object","description":"TaskView represents the view in client of the tasks graph"},"PlaybookView":{"type":"object","description":"PlaybookView represents the view in client of playbook graph"}}},"paths":{"/inv-playbook/task/add/{investigationId}":{"post":{"summary":"Add ad-hoc task","description":"Add an ad-hoc task to a running playbook","operationId":"addAdHocTask","parameters":[{"name":"investigationId","in":"path","description":"investigation ID","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/InvPlaybookTaskData"},"responses":{"200":{"description":"InvestigationPlaybook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}},"tags":["Playbooks"]}}}}
```

## Assign task

> Assign a task to an owner

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"invPlaybookAssignee":{"type":"object","properties":{"assignee":{"type":"string"},"inTaskID":{"type":"string"},"invId":{"type":"string"},"version":{"type":"integer","format":"int64"}}},"InvestigationPlaybook":{"type":"object","description":"InvestigationPlaybook is a wrapper for a linked list of Playbook tasks","properties":{"Dirty":{"type":"boolean"},"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"ReplacedPlaybook":{"type":"boolean","description":"Indicate whether this playbook has new history during this session"},"ShardID":{"type":"integer","format":"int64"},"UpdatedOperatorIDs":{"type":"boolean"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"autoExtracting":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"comment":{"type":"string"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentCreateDate":{"type":"string","description":"Incident create date","format":"date-time"},"indexName":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"invPBDebugInfo":{"$ref":"#/components/schemas/InvPlaybookDebugInfo"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pbHistory":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/InvestigationPlaybookData"}},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"quiet":{"type":"boolean"},"recoveryAttempts":{"type":"integer","format":"int64"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"serverId":{"type":"string","description":"Holds the ID of the responsible cluster app server"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"syncHash":{"type":"string"},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"version":{"type":"integer","format":"int64"},"view":{"$ref":"#/components/schemas/PlaybookView"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","description":"PlaybookInput represents the playbook input","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"PlaybookInputQuery":{"type":"object","description":"PlaybookInputQuery represents the playbook query input","properties":{"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string"},"queryEntity":{"type":"string"},"queryState":{"$ref":"#/components/schemas/QueryState"},"results":{"type":"object"},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}}},"Period":{"type":"object","title":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now.","properties":{"by":{"type":"string","description":"By is used for legacty, and if exists it will override ByTo and ByFrom"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}}},"QueryState":{"type":"object","description":"QueryState represents the playbook query state","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}}},"AdvanceArg":{"type":"object","title":"AdvanceArg - advance argument can be one of the following:","description":"Simple: plain text such as \"hello\" (constant) or ${File.ID} (DT expression)\nComplex: struct with all info that is necessary to compute argument value from context (Root, Filters, Accessor & Transformers)]\nKeyValue: list of key-value","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}}},"ComplexArg":{"type":"object","description":"ComplexArg - all info that is necessary to compute argument value from context\nRoot - the root slice (or object) from to work against\nFilters - a slice of filters to apply to the root object, one after another (e.i. with AND condition between each one)\nAccessor - the key to access to each result after filter\nTransformers - a slice to transformers to apply on the result of the accessed key from each result\ne.g. if user want to take from context all File.DisplayName where File.Extension is 'EXE', and the result in uppercase than:\nRoot: is \"File\"\nFilters: will hold the \"File.DisplayName where File.Extension is 'EXE'\" query\nAccessor: is \"DisplayName\"\nTransformers: will hold the uppercase transformation","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}}},"ArgFilter":{"type":"array","description":"ArgFilter - represent a slice of atomic filters with OR condition between them (e.i. - atomic1 OR atomic2 OR ...)","items":{"$ref":"#/components/schemas/ArgAtomicFilter"}},"ArgAtomicFilter":{"type":"object","description":"ArgAtomicFilter - operator with two sides that return true/false","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}}},"OperatorArgument":{"type":"object","title":"OperatorArgument ...","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"type":"string","title":"FilterOperatorID ..."},"ArgTransformer":{"type":"object","title":"ArgTransformer ...","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"type":"string","title":"TransformerOperatorID ..."},"KeyValueArg":{"type":"object","title":"KeyValueArg ...","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"InvPlaybookDebugInfo":{"type":"object","title":"InvPlaybookDebugInfo ...","properties":{"originalInvPBId":{"type":"string"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","description":"PlaybookOutput represents the playbook output","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}}},"OutputType":{"type":"string","title":"OutputType ..."},"InvestigationPlaybookData":{"type":"object","description":"InvestigationPlaybookData returns all data of an investigation playbook, not including history","properties":{"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"autoExtracting":{"type":"boolean"},"comment":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"name":{"type":"string"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"quiet":{"type":"boolean"},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"view":{"$ref":"#/components/schemas/PlaybookView"}}},"InvestigationPlaybookState":{"type":"string","description":"InvestigationPlaybookState indicates the state of the running playbook"},"InvestigationPlaybookTask":{"type":"object","description":"InvestigationPlaybookTask is the Task in the playbook context as a node","properties":{"Reopen":{"type":"boolean"},"arguments":{"type":"object","additionalProperties":{"type":"object"}},"assignee":{"type":"string"},"assigneeSet":{"type":"boolean"},"blockingTasks":{"type":"array","items":{"type":"string"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"comments":{"type":"boolean","description":"Whether this task had any comments or not"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"conditions":{"type":"array","description":"Conditions - optional list of conditions to run when task is conditional. we check conditions by their order (e.i. - considering the first one that satisfied)","items":{"$ref":"#/components/schemas/TaskCondition"}},"continueOnError":{"type":"boolean"},"continueOnErrorType":{"$ref":"#/components/schemas/ContinueOnErrorType"},"defaultAssignee":{"type":"string"},"defaultAssigneeComplex":{"$ref":"#/components/schemas/AdvanceArg"},"defaultReminder":{"type":"integer","format":"int64"},"doNotSaveTaskHistory":{"type":"boolean"},"dueDate":{"type":"string","format":"date-time"},"dueDateDuration":{"type":"integer","format":"int64"},"dueDateDurationUnit":{"$ref":"#/components/schemas/SLADurationUnit"},"dueDateSet":{"type":"boolean"},"entries":{"type":"array","items":{"type":"string"}},"evidenceData":{"$ref":"#/components/schemas/EvidenceData"},"executionCount":{"type":"integer","format":"int64"},"externalFormUseAuth":{"type":"boolean"},"fieldMapping":{"type":"array","items":{"$ref":"#/components/schemas/FieldMapping"}},"forEachIndex":{"type":"integer","description":"Parameters needed for loops","format":"int64"},"forEachInputs":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object"}}},"form":{"$ref":"#/components/schemas/DataCollectionForm"},"formDisplay":{"$ref":"#/components/schemas/FormDisplay"},"hasErrorEntries":{"type":"boolean"},"id":{"type":"string"},"ignoreWorker":{"type":"boolean","description":"Do not run this task in a worker"},"indent":{"type":"integer","format":"int64"},"input":{"type":"string"},"isAutoSwitchedToQuietMode":{"type":"boolean"},"isOverSize":{"type":"boolean"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"message":{"$ref":"#/components/schemas/NotifiableItem"},"missingContentItem":{"type":"string","description":"content item which caused task to skip"},"nextPollingTime":{"type":"string","description":"NextPollTime Time of the next scheduled command execution","format":"date-time"},"nextTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"note":{"type":"boolean"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"parentBlockCount":{"type":"integer","description":"the number of tasks that are waiting on blocked in subplaybooks of this task","format":"int64"},"parentPlaybookID":{"type":"string"},"patched":{"type":"boolean","description":"Indicates whether this task was patched to InvPB and did not originally belong to the playbook"},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"pollingEntries":{"type":"array","description":"PollingEntryIDs IDs of entries that are still polling","items":{"type":"string"}},"pollingTimeoutTime":{"type":"string","format":"date-time"},"previousTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"quietMode":{"$ref":"#/components/schemas/QuietMode"},"reminder":{"type":"integer","description":"Duration in minutes, this field is not persisted here","format":"int64"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"restrictedCompletion":{"type":"boolean"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"skip":{"type":"boolean","description":"Skip - if true then this task will be skipped and all the tasks which comes after this task and depend on it\nwill skip (WillNotExecute)"},"skipUnavailable":{"type":"boolean","description":"SkipUnavailable if true then will check if automation exists, integration of that command is installed and\nactive or sub playbook exists in Demisto"},"sla":{"$ref":"#/components/schemas/SLA"},"slaReminder":{"$ref":"#/components/schemas/SLA"},"startDate":{"type":"string","format":"date-time"},"startedExecutingHarmfulScript":{"type":"boolean"},"state":{"$ref":"#/components/schemas/TaskState"},"subPlaybook":{"$ref":"#/components/schemas/InvestigationPlaybook"},"task":{"$ref":"#/components/schemas/Task"},"taskCompleteData":{"type":"array","description":"History complete data","items":{"$ref":"#/components/schemas/InvPlaybookTaskCompleteData"}},"taskDebug":{"$ref":"#/components/schemas/InvTaskDebug"},"taskId":{"type":"string"},"taskSize":{"type":"integer","format":"int64"},"timerTriggers":{"type":"array","description":"SLA fields","items":{"$ref":"#/components/schemas/TimerTrigger"}},"timesPolled":{"type":"integer","format":"int64"},"type":{"$ref":"#/components/schemas/TaskType"},"view":{"$ref":"#/components/schemas/TaskView"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"TaskCondition":{"type":"object","description":"TaskCondition - contains a condition and a corresponding label\nif the condition satisfied - its label is taken as the next task(s) input (e.i. the label on the edge)","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}}},"ContinueOnErrorType":{"type":"string","title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path."},"SLADurationUnit":{"type":"integer","description":"SLADurationUnit is a helper to calculate if SLA in hours or minutes","format":"int64"},"EvidenceData":{"type":"object","description":"EvidenceData - all evidence properties to evaluate in task process","properties":{"customFields":{"type":"object","description":"This field must have empty json key","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}}},"FieldMapping":{"type":"object","description":"FieldMapping - Map a task output (complex or simple value) to an incident field","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}}},"DataCollectionForm":{"type":"object","title":"DataCollectionForm - a data collection form with questions.","properties":{"description":{"type":"string"},"expired":{"type":"boolean"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"sender":{"type":"string"},"title":{"type":"string"},"totalAnswers":{"type":"integer","format":"uint64"}}},"Question":{"type":"object","title":"Question - question for a form with a given type.","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"fieldAssociated":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"labelArg":{"$ref":"#/components/schemas/AdvanceArg"},"options":{"type":"array","items":{"type":"string"}},"optionsArg":{"type":"array","items":{"$ref":"#/components/schemas/AdvanceArg"}},"placeholder":{"type":"string"},"readOnly":{"type":"boolean"},"required":{"type":"boolean"},"tooltip":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"FormDisplay":{"type":"object","title":"FormDisplay - display options for communication/ask task (for both email and web forms).","properties":{"bodyBackgroundColor":{"type":"string"},"bodyFontColor":{"type":"string"},"headerBackgroundColor":{"type":"string"},"headerFontColor":{"type":"string"},"isExternalRtl":{"type":"boolean"},"sender":{"type":"string"},"submitButtonBackgroundColor":{"type":"string"},"submitButtonFontColor":{"type":"string"},"submitText":{"type":"string"}}},"TaskLoop":{"type":"object","description":"TaskLoop contains loop details","properties":{"brand":{"type":"string"},"builtinCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"exitCondition":{"type":"string"},"forEach":{"type":"boolean"},"isCommand":{"type":"boolean"},"max":{"type":"integer","format":"int64"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"scriptId":{"type":"string"},"scriptName":{"type":"string"},"wait":{"type":"integer","format":"int64"}}},"NotifiableItem":{"type":"object","title":"NotifiableItem ...","properties":{"bcc":{"$ref":"#/components/schemas/AdvanceArg"},"body":{"$ref":"#/components/schemas/AdvanceArg"},"cc":{"$ref":"#/components/schemas/AdvanceArg"},"defaultOption":{"type":"string"},"format":{"type":"string"},"methods":{"type":"array","items":{"type":"string"}},"replyOptions":{"type":"array","items":{"type":"string"}},"subject":{"$ref":"#/components/schemas/AdvanceArg"},"timings":{"$ref":"#/components/schemas/NotifyTimings"},"to":{"$ref":"#/components/schemas/AdvanceArg"}}},"NotifyTimings":{"type":"object","title":"NotifyTimings - time control on notify items - retries max count and intervals.","properties":{"completeAfterReplies":{"type":"integer","format":"uint64"},"completeAfterSLA":{"type":"boolean"},"completeAfterV2":{"type":"boolean"},"retriesCount":{"type":"integer","format":"uint64"},"retriesInterval":{"type":"integer","format":"uint64"}}},"QuietMode":{"type":"integer","description":"QuietMode quiet mode for playbook task","format":"int64"},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"},"SLA":{"type":"object","title":"SLA ...","properties":{"days":{"type":"integer","format":"int64"},"hours":{"type":"integer","format":"int64"},"minutes":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"}}},"TaskState":{"type":"string","description":"TaskState indicates the state of the task during the incident/investigation execution"},"Task":{"type":"object","description":"Task is the basic task in the task repository that can be associated to an incident via playbook","properties":{"brand":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"clonedFrom":{"type":"string"},"comment":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"created":{"type":"string","format":"date-time"},"description":{"type":"string"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isCommand":{"type":"boolean"},"isLocked":{"type":"boolean"},"isTitleTask":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"playbookId":{"type":"string"},"playbookName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"scriptId":{"type":"string"},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"},"version":{"type":"integer","format":"int64"}}},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"InvPlaybookTaskCompleteData":{"type":"object","title":"InvPlaybookTaskCompleteData ...","properties":{"arguments":{"type":"object","additionalProperties":{"type":"object"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"entries":{"type":"array","items":{"type":"string"}},"hasErrorEntries":{"type":"boolean"},"input":{"type":"string"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"startDate":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/TaskState"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"InvTaskDebug":{"type":"object","title":"InvTaskDebug ...","properties":{"breakpointCondition":{"$ref":"#/components/schemas/ArgFilter"},"inputOverrides":{"type":"object","additionalProperties":{"type":"string"}},"isMarkedWithBreakpoint":{"type":"boolean"},"isMarkedWithSkip":{"type":"boolean"},"outputOverrides":{"type":"object","additionalProperties":{"type":"object"}},"shouldOverrideDebugInfo":{"type":"boolean"},"skipConditionOverrideTo":{"type":"string"},"taskOriginalId":{"type":"string"}}},"TimerTrigger":{"type":"object","title":"TimerTrigger ...","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"type":"string","title":"TimerAction ..."},"TaskView":{"type":"object","description":"TaskView represents the view in client of the tasks graph"},"PlaybookView":{"type":"object","description":"PlaybookView represents the view in client of playbook graph"}}},"paths":{"/inv-playbook/task/assign":{"post":{"summary":"Assign task","description":"Assign a task to an owner","operationId":"taskAssign","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invPlaybookAssignee"}},"application/xml":{"schema":{"$ref":"#/components/schemas/invPlaybookAssignee"}}}},"responses":{"200":{"description":"InvestigationPlaybook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}},"tags":["Playbooks"]}}}}
```

## \[Deprecated] Complete a task

> Complete a task with a file attachment\
> Deprecated - use "/v2/inv-playbook/task/complete"

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"InvestigationPlaybook":{"type":"object","description":"InvestigationPlaybook is a wrapper for a linked list of Playbook tasks","properties":{"Dirty":{"type":"boolean"},"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"ReplacedPlaybook":{"type":"boolean","description":"Indicate whether this playbook has new history during this session"},"ShardID":{"type":"integer","format":"int64"},"UpdatedOperatorIDs":{"type":"boolean"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"autoExtracting":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"comment":{"type":"string"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentCreateDate":{"type":"string","description":"Incident create date","format":"date-time"},"indexName":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"invPBDebugInfo":{"$ref":"#/components/schemas/InvPlaybookDebugInfo"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pbHistory":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/InvestigationPlaybookData"}},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"quiet":{"type":"boolean"},"recoveryAttempts":{"type":"integer","format":"int64"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"serverId":{"type":"string","description":"Holds the ID of the responsible cluster app server"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"syncHash":{"type":"string"},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"version":{"type":"integer","format":"int64"},"view":{"$ref":"#/components/schemas/PlaybookView"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","description":"PlaybookInput represents the playbook input","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"PlaybookInputQuery":{"type":"object","description":"PlaybookInputQuery represents the playbook query input","properties":{"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string"},"queryEntity":{"type":"string"},"queryState":{"$ref":"#/components/schemas/QueryState"},"results":{"type":"object"},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}}},"Period":{"type":"object","title":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now.","properties":{"by":{"type":"string","description":"By is used for legacty, and if exists it will override ByTo and ByFrom"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}}},"QueryState":{"type":"object","description":"QueryState represents the playbook query state","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}}},"AdvanceArg":{"type":"object","title":"AdvanceArg - advance argument can be one of the following:","description":"Simple: plain text such as \"hello\" (constant) or ${File.ID} (DT expression)\nComplex: struct with all info that is necessary to compute argument value from context (Root, Filters, Accessor & Transformers)]\nKeyValue: list of key-value","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}}},"ComplexArg":{"type":"object","description":"ComplexArg - all info that is necessary to compute argument value from context\nRoot - the root slice (or object) from to work against\nFilters - a slice of filters to apply to the root object, one after another (e.i. with AND condition between each one)\nAccessor - the key to access to each result after filter\nTransformers - a slice to transformers to apply on the result of the accessed key from each result\ne.g. if user want to take from context all File.DisplayName where File.Extension is 'EXE', and the result in uppercase than:\nRoot: is \"File\"\nFilters: will hold the \"File.DisplayName where File.Extension is 'EXE'\" query\nAccessor: is \"DisplayName\"\nTransformers: will hold the uppercase transformation","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}}},"ArgFilter":{"type":"array","description":"ArgFilter - represent a slice of atomic filters with OR condition between them (e.i. - atomic1 OR atomic2 OR ...)","items":{"$ref":"#/components/schemas/ArgAtomicFilter"}},"ArgAtomicFilter":{"type":"object","description":"ArgAtomicFilter - operator with two sides that return true/false","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}}},"OperatorArgument":{"type":"object","title":"OperatorArgument ...","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"type":"string","title":"FilterOperatorID ..."},"ArgTransformer":{"type":"object","title":"ArgTransformer ...","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"type":"string","title":"TransformerOperatorID ..."},"KeyValueArg":{"type":"object","title":"KeyValueArg ...","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"InvPlaybookDebugInfo":{"type":"object","title":"InvPlaybookDebugInfo ...","properties":{"originalInvPBId":{"type":"string"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","description":"PlaybookOutput represents the playbook output","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}}},"OutputType":{"type":"string","title":"OutputType ..."},"InvestigationPlaybookData":{"type":"object","description":"InvestigationPlaybookData returns all data of an investigation playbook, not including history","properties":{"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"autoExtracting":{"type":"boolean"},"comment":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"name":{"type":"string"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"quiet":{"type":"boolean"},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"view":{"$ref":"#/components/schemas/PlaybookView"}}},"InvestigationPlaybookState":{"type":"string","description":"InvestigationPlaybookState indicates the state of the running playbook"},"InvestigationPlaybookTask":{"type":"object","description":"InvestigationPlaybookTask is the Task in the playbook context as a node","properties":{"Reopen":{"type":"boolean"},"arguments":{"type":"object","additionalProperties":{"type":"object"}},"assignee":{"type":"string"},"assigneeSet":{"type":"boolean"},"blockingTasks":{"type":"array","items":{"type":"string"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"comments":{"type":"boolean","description":"Whether this task had any comments or not"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"conditions":{"type":"array","description":"Conditions - optional list of conditions to run when task is conditional. we check conditions by their order (e.i. - considering the first one that satisfied)","items":{"$ref":"#/components/schemas/TaskCondition"}},"continueOnError":{"type":"boolean"},"continueOnErrorType":{"$ref":"#/components/schemas/ContinueOnErrorType"},"defaultAssignee":{"type":"string"},"defaultAssigneeComplex":{"$ref":"#/components/schemas/AdvanceArg"},"defaultReminder":{"type":"integer","format":"int64"},"doNotSaveTaskHistory":{"type":"boolean"},"dueDate":{"type":"string","format":"date-time"},"dueDateDuration":{"type":"integer","format":"int64"},"dueDateDurationUnit":{"$ref":"#/components/schemas/SLADurationUnit"},"dueDateSet":{"type":"boolean"},"entries":{"type":"array","items":{"type":"string"}},"evidenceData":{"$ref":"#/components/schemas/EvidenceData"},"executionCount":{"type":"integer","format":"int64"},"externalFormUseAuth":{"type":"boolean"},"fieldMapping":{"type":"array","items":{"$ref":"#/components/schemas/FieldMapping"}},"forEachIndex":{"type":"integer","description":"Parameters needed for loops","format":"int64"},"forEachInputs":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object"}}},"form":{"$ref":"#/components/schemas/DataCollectionForm"},"formDisplay":{"$ref":"#/components/schemas/FormDisplay"},"hasErrorEntries":{"type":"boolean"},"id":{"type":"string"},"ignoreWorker":{"type":"boolean","description":"Do not run this task in a worker"},"indent":{"type":"integer","format":"int64"},"input":{"type":"string"},"isAutoSwitchedToQuietMode":{"type":"boolean"},"isOverSize":{"type":"boolean"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"message":{"$ref":"#/components/schemas/NotifiableItem"},"missingContentItem":{"type":"string","description":"content item which caused task to skip"},"nextPollingTime":{"type":"string","description":"NextPollTime Time of the next scheduled command execution","format":"date-time"},"nextTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"note":{"type":"boolean"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"parentBlockCount":{"type":"integer","description":"the number of tasks that are waiting on blocked in subplaybooks of this task","format":"int64"},"parentPlaybookID":{"type":"string"},"patched":{"type":"boolean","description":"Indicates whether this task was patched to InvPB and did not originally belong to the playbook"},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"pollingEntries":{"type":"array","description":"PollingEntryIDs IDs of entries that are still polling","items":{"type":"string"}},"pollingTimeoutTime":{"type":"string","format":"date-time"},"previousTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"quietMode":{"$ref":"#/components/schemas/QuietMode"},"reminder":{"type":"integer","description":"Duration in minutes, this field is not persisted here","format":"int64"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"restrictedCompletion":{"type":"boolean"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"skip":{"type":"boolean","description":"Skip - if true then this task will be skipped and all the tasks which comes after this task and depend on it\nwill skip (WillNotExecute)"},"skipUnavailable":{"type":"boolean","description":"SkipUnavailable if true then will check if automation exists, integration of that command is installed and\nactive or sub playbook exists in Demisto"},"sla":{"$ref":"#/components/schemas/SLA"},"slaReminder":{"$ref":"#/components/schemas/SLA"},"startDate":{"type":"string","format":"date-time"},"startedExecutingHarmfulScript":{"type":"boolean"},"state":{"$ref":"#/components/schemas/TaskState"},"subPlaybook":{"$ref":"#/components/schemas/InvestigationPlaybook"},"task":{"$ref":"#/components/schemas/Task"},"taskCompleteData":{"type":"array","description":"History complete data","items":{"$ref":"#/components/schemas/InvPlaybookTaskCompleteData"}},"taskDebug":{"$ref":"#/components/schemas/InvTaskDebug"},"taskId":{"type":"string"},"taskSize":{"type":"integer","format":"int64"},"timerTriggers":{"type":"array","description":"SLA fields","items":{"$ref":"#/components/schemas/TimerTrigger"}},"timesPolled":{"type":"integer","format":"int64"},"type":{"$ref":"#/components/schemas/TaskType"},"view":{"$ref":"#/components/schemas/TaskView"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"TaskCondition":{"type":"object","description":"TaskCondition - contains a condition and a corresponding label\nif the condition satisfied - its label is taken as the next task(s) input (e.i. the label on the edge)","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}}},"ContinueOnErrorType":{"type":"string","title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path."},"SLADurationUnit":{"type":"integer","description":"SLADurationUnit is a helper to calculate if SLA in hours or minutes","format":"int64"},"EvidenceData":{"type":"object","description":"EvidenceData - all evidence properties to evaluate in task process","properties":{"customFields":{"type":"object","description":"This field must have empty json key","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}}},"FieldMapping":{"type":"object","description":"FieldMapping - Map a task output (complex or simple value) to an incident field","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}}},"DataCollectionForm":{"type":"object","title":"DataCollectionForm - a data collection form with questions.","properties":{"description":{"type":"string"},"expired":{"type":"boolean"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"sender":{"type":"string"},"title":{"type":"string"},"totalAnswers":{"type":"integer","format":"uint64"}}},"Question":{"type":"object","title":"Question - question for a form with a given type.","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"fieldAssociated":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"labelArg":{"$ref":"#/components/schemas/AdvanceArg"},"options":{"type":"array","items":{"type":"string"}},"optionsArg":{"type":"array","items":{"$ref":"#/components/schemas/AdvanceArg"}},"placeholder":{"type":"string"},"readOnly":{"type":"boolean"},"required":{"type":"boolean"},"tooltip":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"FormDisplay":{"type":"object","title":"FormDisplay - display options for communication/ask task (for both email and web forms).","properties":{"bodyBackgroundColor":{"type":"string"},"bodyFontColor":{"type":"string"},"headerBackgroundColor":{"type":"string"},"headerFontColor":{"type":"string"},"isExternalRtl":{"type":"boolean"},"sender":{"type":"string"},"submitButtonBackgroundColor":{"type":"string"},"submitButtonFontColor":{"type":"string"},"submitText":{"type":"string"}}},"TaskLoop":{"type":"object","description":"TaskLoop contains loop details","properties":{"brand":{"type":"string"},"builtinCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"exitCondition":{"type":"string"},"forEach":{"type":"boolean"},"isCommand":{"type":"boolean"},"max":{"type":"integer","format":"int64"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"scriptId":{"type":"string"},"scriptName":{"type":"string"},"wait":{"type":"integer","format":"int64"}}},"NotifiableItem":{"type":"object","title":"NotifiableItem ...","properties":{"bcc":{"$ref":"#/components/schemas/AdvanceArg"},"body":{"$ref":"#/components/schemas/AdvanceArg"},"cc":{"$ref":"#/components/schemas/AdvanceArg"},"defaultOption":{"type":"string"},"format":{"type":"string"},"methods":{"type":"array","items":{"type":"string"}},"replyOptions":{"type":"array","items":{"type":"string"}},"subject":{"$ref":"#/components/schemas/AdvanceArg"},"timings":{"$ref":"#/components/schemas/NotifyTimings"},"to":{"$ref":"#/components/schemas/AdvanceArg"}}},"NotifyTimings":{"type":"object","title":"NotifyTimings - time control on notify items - retries max count and intervals.","properties":{"completeAfterReplies":{"type":"integer","format":"uint64"},"completeAfterSLA":{"type":"boolean"},"completeAfterV2":{"type":"boolean"},"retriesCount":{"type":"integer","format":"uint64"},"retriesInterval":{"type":"integer","format":"uint64"}}},"QuietMode":{"type":"integer","description":"QuietMode quiet mode for playbook task","format":"int64"},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"},"SLA":{"type":"object","title":"SLA ...","properties":{"days":{"type":"integer","format":"int64"},"hours":{"type":"integer","format":"int64"},"minutes":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"}}},"TaskState":{"type":"string","description":"TaskState indicates the state of the task during the incident/investigation execution"},"Task":{"type":"object","description":"Task is the basic task in the task repository that can be associated to an incident via playbook","properties":{"brand":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"clonedFrom":{"type":"string"},"comment":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"created":{"type":"string","format":"date-time"},"description":{"type":"string"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isCommand":{"type":"boolean"},"isLocked":{"type":"boolean"},"isTitleTask":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"playbookId":{"type":"string"},"playbookName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"scriptId":{"type":"string"},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"},"version":{"type":"integer","format":"int64"}}},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"InvPlaybookTaskCompleteData":{"type":"object","title":"InvPlaybookTaskCompleteData ...","properties":{"arguments":{"type":"object","additionalProperties":{"type":"object"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"entries":{"type":"array","items":{"type":"string"}},"hasErrorEntries":{"type":"boolean"},"input":{"type":"string"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"startDate":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/TaskState"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"InvTaskDebug":{"type":"object","title":"InvTaskDebug ...","properties":{"breakpointCondition":{"$ref":"#/components/schemas/ArgFilter"},"inputOverrides":{"type":"object","additionalProperties":{"type":"string"}},"isMarkedWithBreakpoint":{"type":"boolean"},"isMarkedWithSkip":{"type":"boolean"},"outputOverrides":{"type":"object","additionalProperties":{"type":"object"}},"shouldOverrideDebugInfo":{"type":"boolean"},"skipConditionOverrideTo":{"type":"string"},"taskOriginalId":{"type":"string"}}},"TimerTrigger":{"type":"object","title":"TimerTrigger ...","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"type":"string","title":"TimerAction ..."},"TaskView":{"type":"object","description":"TaskView represents the view in client of the tasks graph"},"PlaybookView":{"type":"object","description":"PlaybookView represents the view in client of playbook graph"}}},"paths":{"/inv-playbook/task/complete":{"post":{"summary":"[Deprecated] Complete a task","description":"Complete a task with a file attachment\nDeprecated - use \"/v2/inv-playbook/task/complete\"","operationId":"completeTask","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"investigationId":{"description":"investigation ID","type":"string"},"fileName":{"description":"file name","type":"string"},"fileComment":{"description":"file comment","type":"string"},"taskId":{"description":"Task Id","type":"string"},"taskInput":{"description":"task input","type":"string"},"version":{"description":"Version","type":"string"},"file":{"description":"file","type":"string"}}}}}},"responses":{"200":{"description":"InvestigationPlaybook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}},"tags":["Playbooks"]}}}}
```

## Complete task simple (no file)

> Complete a task without a file attachment

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"requestBodies":{"invTaskInfo":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invTaskInfo"}},"application/xml":{"schema":{"$ref":"#/components/schemas/invTaskInfo"}}}}},"schemas":{"invTaskInfo":{"type":"object","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"comment":{"type":"string"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/TaskCondition"}},"inTaskID":{"type":"string"},"input":{"type":"string"},"invId":{"type":"string"},"loopArgs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"loopCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"version":{"type":"integer","format":"int64"}}},"AdvanceArg":{"type":"object","title":"AdvanceArg - advance argument can be one of the following:","description":"Simple: plain text such as \"hello\" (constant) or ${File.ID} (DT expression)\nComplex: struct with all info that is necessary to compute argument value from context (Root, Filters, Accessor & Transformers)]\nKeyValue: list of key-value","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}}},"ComplexArg":{"type":"object","description":"ComplexArg - all info that is necessary to compute argument value from context\nRoot - the root slice (or object) from to work against\nFilters - a slice of filters to apply to the root object, one after another (e.i. with AND condition between each one)\nAccessor - the key to access to each result after filter\nTransformers - a slice to transformers to apply on the result of the accessed key from each result\ne.g. if user want to take from context all File.DisplayName where File.Extension is 'EXE', and the result in uppercase than:\nRoot: is \"File\"\nFilters: will hold the \"File.DisplayName where File.Extension is 'EXE'\" query\nAccessor: is \"DisplayName\"\nTransformers: will hold the uppercase transformation","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}}},"ArgFilter":{"type":"array","description":"ArgFilter - represent a slice of atomic filters with OR condition between them (e.i. - atomic1 OR atomic2 OR ...)","items":{"$ref":"#/components/schemas/ArgAtomicFilter"}},"ArgAtomicFilter":{"type":"object","description":"ArgAtomicFilter - operator with two sides that return true/false","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}}},"OperatorArgument":{"type":"object","title":"OperatorArgument ...","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"type":"string","title":"FilterOperatorID ..."},"ArgTransformer":{"type":"object","title":"ArgTransformer ...","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"type":"string","title":"TransformerOperatorID ..."},"KeyValueArg":{"type":"object","title":"KeyValueArg ...","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"TaskCondition":{"type":"object","description":"TaskCondition - contains a condition and a corresponding label\nif the condition satisfied - its label is taken as the next task(s) input (e.i. the label on the edge)","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}}},"InvestigationPlaybook":{"type":"object","description":"InvestigationPlaybook is a wrapper for a linked list of Playbook tasks","properties":{"Dirty":{"type":"boolean"},"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"ReplacedPlaybook":{"type":"boolean","description":"Indicate whether this playbook has new history during this session"},"ShardID":{"type":"integer","format":"int64"},"UpdatedOperatorIDs":{"type":"boolean"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"autoExtracting":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"comment":{"type":"string"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentCreateDate":{"type":"string","description":"Incident create date","format":"date-time"},"indexName":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"invPBDebugInfo":{"$ref":"#/components/schemas/InvPlaybookDebugInfo"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pbHistory":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/InvestigationPlaybookData"}},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"quiet":{"type":"boolean"},"recoveryAttempts":{"type":"integer","format":"int64"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"serverId":{"type":"string","description":"Holds the ID of the responsible cluster app server"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"syncHash":{"type":"string"},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"version":{"type":"integer","format":"int64"},"view":{"$ref":"#/components/schemas/PlaybookView"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","description":"PlaybookInput represents the playbook input","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"PlaybookInputQuery":{"type":"object","description":"PlaybookInputQuery represents the playbook query input","properties":{"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string"},"queryEntity":{"type":"string"},"queryState":{"$ref":"#/components/schemas/QueryState"},"results":{"type":"object"},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}}},"Period":{"type":"object","title":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now.","properties":{"by":{"type":"string","description":"By is used for legacty, and if exists it will override ByTo and ByFrom"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}}},"QueryState":{"type":"object","description":"QueryState represents the playbook query state","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}}},"InvPlaybookDebugInfo":{"type":"object","title":"InvPlaybookDebugInfo ...","properties":{"originalInvPBId":{"type":"string"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","description":"PlaybookOutput represents the playbook output","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}}},"OutputType":{"type":"string","title":"OutputType ..."},"InvestigationPlaybookData":{"type":"object","description":"InvestigationPlaybookData returns all data of an investigation playbook, not including history","properties":{"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"autoExtracting":{"type":"boolean"},"comment":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"name":{"type":"string"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"quiet":{"type":"boolean"},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"view":{"$ref":"#/components/schemas/PlaybookView"}}},"InvestigationPlaybookState":{"type":"string","description":"InvestigationPlaybookState indicates the state of the running playbook"},"InvestigationPlaybookTask":{"type":"object","description":"InvestigationPlaybookTask is the Task in the playbook context as a node","properties":{"Reopen":{"type":"boolean"},"arguments":{"type":"object","additionalProperties":{"type":"object"}},"assignee":{"type":"string"},"assigneeSet":{"type":"boolean"},"blockingTasks":{"type":"array","items":{"type":"string"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"comments":{"type":"boolean","description":"Whether this task had any comments or not"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"conditions":{"type":"array","description":"Conditions - optional list of conditions to run when task is conditional. we check conditions by their order (e.i. - considering the first one that satisfied)","items":{"$ref":"#/components/schemas/TaskCondition"}},"continueOnError":{"type":"boolean"},"continueOnErrorType":{"$ref":"#/components/schemas/ContinueOnErrorType"},"defaultAssignee":{"type":"string"},"defaultAssigneeComplex":{"$ref":"#/components/schemas/AdvanceArg"},"defaultReminder":{"type":"integer","format":"int64"},"doNotSaveTaskHistory":{"type":"boolean"},"dueDate":{"type":"string","format":"date-time"},"dueDateDuration":{"type":"integer","format":"int64"},"dueDateDurationUnit":{"$ref":"#/components/schemas/SLADurationUnit"},"dueDateSet":{"type":"boolean"},"entries":{"type":"array","items":{"type":"string"}},"evidenceData":{"$ref":"#/components/schemas/EvidenceData"},"executionCount":{"type":"integer","format":"int64"},"externalFormUseAuth":{"type":"boolean"},"fieldMapping":{"type":"array","items":{"$ref":"#/components/schemas/FieldMapping"}},"forEachIndex":{"type":"integer","description":"Parameters needed for loops","format":"int64"},"forEachInputs":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object"}}},"form":{"$ref":"#/components/schemas/DataCollectionForm"},"formDisplay":{"$ref":"#/components/schemas/FormDisplay"},"hasErrorEntries":{"type":"boolean"},"id":{"type":"string"},"ignoreWorker":{"type":"boolean","description":"Do not run this task in a worker"},"indent":{"type":"integer","format":"int64"},"input":{"type":"string"},"isAutoSwitchedToQuietMode":{"type":"boolean"},"isOverSize":{"type":"boolean"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"message":{"$ref":"#/components/schemas/NotifiableItem"},"missingContentItem":{"type":"string","description":"content item which caused task to skip"},"nextPollingTime":{"type":"string","description":"NextPollTime Time of the next scheduled command execution","format":"date-time"},"nextTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"note":{"type":"boolean"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"parentBlockCount":{"type":"integer","description":"the number of tasks that are waiting on blocked in subplaybooks of this task","format":"int64"},"parentPlaybookID":{"type":"string"},"patched":{"type":"boolean","description":"Indicates whether this task was patched to InvPB and did not originally belong to the playbook"},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"pollingEntries":{"type":"array","description":"PollingEntryIDs IDs of entries that are still polling","items":{"type":"string"}},"pollingTimeoutTime":{"type":"string","format":"date-time"},"previousTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"quietMode":{"$ref":"#/components/schemas/QuietMode"},"reminder":{"type":"integer","description":"Duration in minutes, this field is not persisted here","format":"int64"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"restrictedCompletion":{"type":"boolean"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"skip":{"type":"boolean","description":"Skip - if true then this task will be skipped and all the tasks which comes after this task and depend on it\nwill skip (WillNotExecute)"},"skipUnavailable":{"type":"boolean","description":"SkipUnavailable if true then will check if automation exists, integration of that command is installed and\nactive or sub playbook exists in Demisto"},"sla":{"$ref":"#/components/schemas/SLA"},"slaReminder":{"$ref":"#/components/schemas/SLA"},"startDate":{"type":"string","format":"date-time"},"startedExecutingHarmfulScript":{"type":"boolean"},"state":{"$ref":"#/components/schemas/TaskState"},"subPlaybook":{"$ref":"#/components/schemas/InvestigationPlaybook"},"task":{"$ref":"#/components/schemas/Task"},"taskCompleteData":{"type":"array","description":"History complete data","items":{"$ref":"#/components/schemas/InvPlaybookTaskCompleteData"}},"taskDebug":{"$ref":"#/components/schemas/InvTaskDebug"},"taskId":{"type":"string"},"taskSize":{"type":"integer","format":"int64"},"timerTriggers":{"type":"array","description":"SLA fields","items":{"$ref":"#/components/schemas/TimerTrigger"}},"timesPolled":{"type":"integer","format":"int64"},"type":{"$ref":"#/components/schemas/TaskType"},"view":{"$ref":"#/components/schemas/TaskView"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"ContinueOnErrorType":{"type":"string","title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path."},"SLADurationUnit":{"type":"integer","description":"SLADurationUnit is a helper to calculate if SLA in hours or minutes","format":"int64"},"EvidenceData":{"type":"object","description":"EvidenceData - all evidence properties to evaluate in task process","properties":{"customFields":{"type":"object","description":"This field must have empty json key","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}}},"FieldMapping":{"type":"object","description":"FieldMapping - Map a task output (complex or simple value) to an incident field","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}}},"DataCollectionForm":{"type":"object","title":"DataCollectionForm - a data collection form with questions.","properties":{"description":{"type":"string"},"expired":{"type":"boolean"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"sender":{"type":"string"},"title":{"type":"string"},"totalAnswers":{"type":"integer","format":"uint64"}}},"Question":{"type":"object","title":"Question - question for a form with a given type.","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"fieldAssociated":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"labelArg":{"$ref":"#/components/schemas/AdvanceArg"},"options":{"type":"array","items":{"type":"string"}},"optionsArg":{"type":"array","items":{"$ref":"#/components/schemas/AdvanceArg"}},"placeholder":{"type":"string"},"readOnly":{"type":"boolean"},"required":{"type":"boolean"},"tooltip":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"FormDisplay":{"type":"object","title":"FormDisplay - display options for communication/ask task (for both email and web forms).","properties":{"bodyBackgroundColor":{"type":"string"},"bodyFontColor":{"type":"string"},"headerBackgroundColor":{"type":"string"},"headerFontColor":{"type":"string"},"isExternalRtl":{"type":"boolean"},"sender":{"type":"string"},"submitButtonBackgroundColor":{"type":"string"},"submitButtonFontColor":{"type":"string"},"submitText":{"type":"string"}}},"TaskLoop":{"type":"object","description":"TaskLoop contains loop details","properties":{"brand":{"type":"string"},"builtinCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"exitCondition":{"type":"string"},"forEach":{"type":"boolean"},"isCommand":{"type":"boolean"},"max":{"type":"integer","format":"int64"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"scriptId":{"type":"string"},"scriptName":{"type":"string"},"wait":{"type":"integer","format":"int64"}}},"NotifiableItem":{"type":"object","title":"NotifiableItem ...","properties":{"bcc":{"$ref":"#/components/schemas/AdvanceArg"},"body":{"$ref":"#/components/schemas/AdvanceArg"},"cc":{"$ref":"#/components/schemas/AdvanceArg"},"defaultOption":{"type":"string"},"format":{"type":"string"},"methods":{"type":"array","items":{"type":"string"}},"replyOptions":{"type":"array","items":{"type":"string"}},"subject":{"$ref":"#/components/schemas/AdvanceArg"},"timings":{"$ref":"#/components/schemas/NotifyTimings"},"to":{"$ref":"#/components/schemas/AdvanceArg"}}},"NotifyTimings":{"type":"object","title":"NotifyTimings - time control on notify items - retries max count and intervals.","properties":{"completeAfterReplies":{"type":"integer","format":"uint64"},"completeAfterSLA":{"type":"boolean"},"completeAfterV2":{"type":"boolean"},"retriesCount":{"type":"integer","format":"uint64"},"retriesInterval":{"type":"integer","format":"uint64"}}},"QuietMode":{"type":"integer","description":"QuietMode quiet mode for playbook task","format":"int64"},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"},"SLA":{"type":"object","title":"SLA ...","properties":{"days":{"type":"integer","format":"int64"},"hours":{"type":"integer","format":"int64"},"minutes":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"}}},"TaskState":{"type":"string","description":"TaskState indicates the state of the task during the incident/investigation execution"},"Task":{"type":"object","description":"Task is the basic task in the task repository that can be associated to an incident via playbook","properties":{"brand":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"clonedFrom":{"type":"string"},"comment":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"created":{"type":"string","format":"date-time"},"description":{"type":"string"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isCommand":{"type":"boolean"},"isLocked":{"type":"boolean"},"isTitleTask":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"playbookId":{"type":"string"},"playbookName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"scriptId":{"type":"string"},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"},"version":{"type":"integer","format":"int64"}}},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"InvPlaybookTaskCompleteData":{"type":"object","title":"InvPlaybookTaskCompleteData ...","properties":{"arguments":{"type":"object","additionalProperties":{"type":"object"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"entries":{"type":"array","items":{"type":"string"}},"hasErrorEntries":{"type":"boolean"},"input":{"type":"string"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"startDate":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/TaskState"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"InvTaskDebug":{"type":"object","title":"InvTaskDebug ...","properties":{"breakpointCondition":{"$ref":"#/components/schemas/ArgFilter"},"inputOverrides":{"type":"object","additionalProperties":{"type":"string"}},"isMarkedWithBreakpoint":{"type":"boolean"},"isMarkedWithSkip":{"type":"boolean"},"outputOverrides":{"type":"object","additionalProperties":{"type":"object"}},"shouldOverrideDebugInfo":{"type":"boolean"},"skipConditionOverrideTo":{"type":"string"},"taskOriginalId":{"type":"string"}}},"TimerTrigger":{"type":"object","title":"TimerTrigger ...","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"type":"string","title":"TimerAction ..."},"TaskView":{"type":"object","description":"TaskView represents the view in client of the tasks graph"},"PlaybookView":{"type":"object","description":"PlaybookView represents the view in client of playbook graph"}}},"paths":{"/inv-playbook/task/complete/simple":{"post":{"summary":"Complete task simple (no file)","description":"Complete a task without a file attachment","operationId":"simpleCompleteTask","requestBody":{"$ref":"#/components/requestBodies/invTaskInfo"},"responses":{"200":{"description":"InvestigationPlaybook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}},"tags":["Playbooks"]}}}}
```

## Delete ad-hoc task

> Delete an ad-hoc task from a running playbook

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"InvestigationPlaybook":{"type":"object","description":"InvestigationPlaybook is a wrapper for a linked list of Playbook tasks","properties":{"Dirty":{"type":"boolean"},"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"ReplacedPlaybook":{"type":"boolean","description":"Indicate whether this playbook has new history during this session"},"ShardID":{"type":"integer","format":"int64"},"UpdatedOperatorIDs":{"type":"boolean"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"autoExtracting":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"comment":{"type":"string"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentCreateDate":{"type":"string","description":"Incident create date","format":"date-time"},"indexName":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"invPBDebugInfo":{"$ref":"#/components/schemas/InvPlaybookDebugInfo"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pbHistory":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/InvestigationPlaybookData"}},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"quiet":{"type":"boolean"},"recoveryAttempts":{"type":"integer","format":"int64"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"serverId":{"type":"string","description":"Holds the ID of the responsible cluster app server"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"syncHash":{"type":"string"},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"version":{"type":"integer","format":"int64"},"view":{"$ref":"#/components/schemas/PlaybookView"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","description":"PlaybookInput represents the playbook input","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"PlaybookInputQuery":{"type":"object","description":"PlaybookInputQuery represents the playbook query input","properties":{"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string"},"queryEntity":{"type":"string"},"queryState":{"$ref":"#/components/schemas/QueryState"},"results":{"type":"object"},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}}},"Period":{"type":"object","title":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now.","properties":{"by":{"type":"string","description":"By is used for legacty, and if exists it will override ByTo and ByFrom"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}}},"QueryState":{"type":"object","description":"QueryState represents the playbook query state","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}}},"AdvanceArg":{"type":"object","title":"AdvanceArg - advance argument can be one of the following:","description":"Simple: plain text such as \"hello\" (constant) or ${File.ID} (DT expression)\nComplex: struct with all info that is necessary to compute argument value from context (Root, Filters, Accessor & Transformers)]\nKeyValue: list of key-value","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}}},"ComplexArg":{"type":"object","description":"ComplexArg - all info that is necessary to compute argument value from context\nRoot - the root slice (or object) from to work against\nFilters - a slice of filters to apply to the root object, one after another (e.i. with AND condition between each one)\nAccessor - the key to access to each result after filter\nTransformers - a slice to transformers to apply on the result of the accessed key from each result\ne.g. if user want to take from context all File.DisplayName where File.Extension is 'EXE', and the result in uppercase than:\nRoot: is \"File\"\nFilters: will hold the \"File.DisplayName where File.Extension is 'EXE'\" query\nAccessor: is \"DisplayName\"\nTransformers: will hold the uppercase transformation","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}}},"ArgFilter":{"type":"array","description":"ArgFilter - represent a slice of atomic filters with OR condition between them (e.i. - atomic1 OR atomic2 OR ...)","items":{"$ref":"#/components/schemas/ArgAtomicFilter"}},"ArgAtomicFilter":{"type":"object","description":"ArgAtomicFilter - operator with two sides that return true/false","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}}},"OperatorArgument":{"type":"object","title":"OperatorArgument ...","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"type":"string","title":"FilterOperatorID ..."},"ArgTransformer":{"type":"object","title":"ArgTransformer ...","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"type":"string","title":"TransformerOperatorID ..."},"KeyValueArg":{"type":"object","title":"KeyValueArg ...","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"InvPlaybookDebugInfo":{"type":"object","title":"InvPlaybookDebugInfo ...","properties":{"originalInvPBId":{"type":"string"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","description":"PlaybookOutput represents the playbook output","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}}},"OutputType":{"type":"string","title":"OutputType ..."},"InvestigationPlaybookData":{"type":"object","description":"InvestigationPlaybookData returns all data of an investigation playbook, not including history","properties":{"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"autoExtracting":{"type":"boolean"},"comment":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"name":{"type":"string"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"quiet":{"type":"boolean"},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"view":{"$ref":"#/components/schemas/PlaybookView"}}},"InvestigationPlaybookState":{"type":"string","description":"InvestigationPlaybookState indicates the state of the running playbook"},"InvestigationPlaybookTask":{"type":"object","description":"InvestigationPlaybookTask is the Task in the playbook context as a node","properties":{"Reopen":{"type":"boolean"},"arguments":{"type":"object","additionalProperties":{"type":"object"}},"assignee":{"type":"string"},"assigneeSet":{"type":"boolean"},"blockingTasks":{"type":"array","items":{"type":"string"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"comments":{"type":"boolean","description":"Whether this task had any comments or not"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"conditions":{"type":"array","description":"Conditions - optional list of conditions to run when task is conditional. we check conditions by their order (e.i. - considering the first one that satisfied)","items":{"$ref":"#/components/schemas/TaskCondition"}},"continueOnError":{"type":"boolean"},"continueOnErrorType":{"$ref":"#/components/schemas/ContinueOnErrorType"},"defaultAssignee":{"type":"string"},"defaultAssigneeComplex":{"$ref":"#/components/schemas/AdvanceArg"},"defaultReminder":{"type":"integer","format":"int64"},"doNotSaveTaskHistory":{"type":"boolean"},"dueDate":{"type":"string","format":"date-time"},"dueDateDuration":{"type":"integer","format":"int64"},"dueDateDurationUnit":{"$ref":"#/components/schemas/SLADurationUnit"},"dueDateSet":{"type":"boolean"},"entries":{"type":"array","items":{"type":"string"}},"evidenceData":{"$ref":"#/components/schemas/EvidenceData"},"executionCount":{"type":"integer","format":"int64"},"externalFormUseAuth":{"type":"boolean"},"fieldMapping":{"type":"array","items":{"$ref":"#/components/schemas/FieldMapping"}},"forEachIndex":{"type":"integer","description":"Parameters needed for loops","format":"int64"},"forEachInputs":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object"}}},"form":{"$ref":"#/components/schemas/DataCollectionForm"},"formDisplay":{"$ref":"#/components/schemas/FormDisplay"},"hasErrorEntries":{"type":"boolean"},"id":{"type":"string"},"ignoreWorker":{"type":"boolean","description":"Do not run this task in a worker"},"indent":{"type":"integer","format":"int64"},"input":{"type":"string"},"isAutoSwitchedToQuietMode":{"type":"boolean"},"isOverSize":{"type":"boolean"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"message":{"$ref":"#/components/schemas/NotifiableItem"},"missingContentItem":{"type":"string","description":"content item which caused task to skip"},"nextPollingTime":{"type":"string","description":"NextPollTime Time of the next scheduled command execution","format":"date-time"},"nextTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"note":{"type":"boolean"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"parentBlockCount":{"type":"integer","description":"the number of tasks that are waiting on blocked in subplaybooks of this task","format":"int64"},"parentPlaybookID":{"type":"string"},"patched":{"type":"boolean","description":"Indicates whether this task was patched to InvPB and did not originally belong to the playbook"},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"pollingEntries":{"type":"array","description":"PollingEntryIDs IDs of entries that are still polling","items":{"type":"string"}},"pollingTimeoutTime":{"type":"string","format":"date-time"},"previousTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"quietMode":{"$ref":"#/components/schemas/QuietMode"},"reminder":{"type":"integer","description":"Duration in minutes, this field is not persisted here","format":"int64"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"restrictedCompletion":{"type":"boolean"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"skip":{"type":"boolean","description":"Skip - if true then this task will be skipped and all the tasks which comes after this task and depend on it\nwill skip (WillNotExecute)"},"skipUnavailable":{"type":"boolean","description":"SkipUnavailable if true then will check if automation exists, integration of that command is installed and\nactive or sub playbook exists in Demisto"},"sla":{"$ref":"#/components/schemas/SLA"},"slaReminder":{"$ref":"#/components/schemas/SLA"},"startDate":{"type":"string","format":"date-time"},"startedExecutingHarmfulScript":{"type":"boolean"},"state":{"$ref":"#/components/schemas/TaskState"},"subPlaybook":{"$ref":"#/components/schemas/InvestigationPlaybook"},"task":{"$ref":"#/components/schemas/Task"},"taskCompleteData":{"type":"array","description":"History complete data","items":{"$ref":"#/components/schemas/InvPlaybookTaskCompleteData"}},"taskDebug":{"$ref":"#/components/schemas/InvTaskDebug"},"taskId":{"type":"string"},"taskSize":{"type":"integer","format":"int64"},"timerTriggers":{"type":"array","description":"SLA fields","items":{"$ref":"#/components/schemas/TimerTrigger"}},"timesPolled":{"type":"integer","format":"int64"},"type":{"$ref":"#/components/schemas/TaskType"},"view":{"$ref":"#/components/schemas/TaskView"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"TaskCondition":{"type":"object","description":"TaskCondition - contains a condition and a corresponding label\nif the condition satisfied - its label is taken as the next task(s) input (e.i. the label on the edge)","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}}},"ContinueOnErrorType":{"type":"string","title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path."},"SLADurationUnit":{"type":"integer","description":"SLADurationUnit is a helper to calculate if SLA in hours or minutes","format":"int64"},"EvidenceData":{"type":"object","description":"EvidenceData - all evidence properties to evaluate in task process","properties":{"customFields":{"type":"object","description":"This field must have empty json key","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}}},"FieldMapping":{"type":"object","description":"FieldMapping - Map a task output (complex or simple value) to an incident field","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}}},"DataCollectionForm":{"type":"object","title":"DataCollectionForm - a data collection form with questions.","properties":{"description":{"type":"string"},"expired":{"type":"boolean"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"sender":{"type":"string"},"title":{"type":"string"},"totalAnswers":{"type":"integer","format":"uint64"}}},"Question":{"type":"object","title":"Question - question for a form with a given type.","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"fieldAssociated":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"labelArg":{"$ref":"#/components/schemas/AdvanceArg"},"options":{"type":"array","items":{"type":"string"}},"optionsArg":{"type":"array","items":{"$ref":"#/components/schemas/AdvanceArg"}},"placeholder":{"type":"string"},"readOnly":{"type":"boolean"},"required":{"type":"boolean"},"tooltip":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"FormDisplay":{"type":"object","title":"FormDisplay - display options for communication/ask task (for both email and web forms).","properties":{"bodyBackgroundColor":{"type":"string"},"bodyFontColor":{"type":"string"},"headerBackgroundColor":{"type":"string"},"headerFontColor":{"type":"string"},"isExternalRtl":{"type":"boolean"},"sender":{"type":"string"},"submitButtonBackgroundColor":{"type":"string"},"submitButtonFontColor":{"type":"string"},"submitText":{"type":"string"}}},"TaskLoop":{"type":"object","description":"TaskLoop contains loop details","properties":{"brand":{"type":"string"},"builtinCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"exitCondition":{"type":"string"},"forEach":{"type":"boolean"},"isCommand":{"type":"boolean"},"max":{"type":"integer","format":"int64"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"scriptId":{"type":"string"},"scriptName":{"type":"string"},"wait":{"type":"integer","format":"int64"}}},"NotifiableItem":{"type":"object","title":"NotifiableItem ...","properties":{"bcc":{"$ref":"#/components/schemas/AdvanceArg"},"body":{"$ref":"#/components/schemas/AdvanceArg"},"cc":{"$ref":"#/components/schemas/AdvanceArg"},"defaultOption":{"type":"string"},"format":{"type":"string"},"methods":{"type":"array","items":{"type":"string"}},"replyOptions":{"type":"array","items":{"type":"string"}},"subject":{"$ref":"#/components/schemas/AdvanceArg"},"timings":{"$ref":"#/components/schemas/NotifyTimings"},"to":{"$ref":"#/components/schemas/AdvanceArg"}}},"NotifyTimings":{"type":"object","title":"NotifyTimings - time control on notify items - retries max count and intervals.","properties":{"completeAfterReplies":{"type":"integer","format":"uint64"},"completeAfterSLA":{"type":"boolean"},"completeAfterV2":{"type":"boolean"},"retriesCount":{"type":"integer","format":"uint64"},"retriesInterval":{"type":"integer","format":"uint64"}}},"QuietMode":{"type":"integer","description":"QuietMode quiet mode for playbook task","format":"int64"},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"},"SLA":{"type":"object","title":"SLA ...","properties":{"days":{"type":"integer","format":"int64"},"hours":{"type":"integer","format":"int64"},"minutes":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"}}},"TaskState":{"type":"string","description":"TaskState indicates the state of the task during the incident/investigation execution"},"Task":{"type":"object","description":"Task is the basic task in the task repository that can be associated to an incident via playbook","properties":{"brand":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"clonedFrom":{"type":"string"},"comment":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"created":{"type":"string","format":"date-time"},"description":{"type":"string"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isCommand":{"type":"boolean"},"isLocked":{"type":"boolean"},"isTitleTask":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"playbookId":{"type":"string"},"playbookName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"scriptId":{"type":"string"},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"},"version":{"type":"integer","format":"int64"}}},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"InvPlaybookTaskCompleteData":{"type":"object","title":"InvPlaybookTaskCompleteData ...","properties":{"arguments":{"type":"object","additionalProperties":{"type":"object"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"entries":{"type":"array","items":{"type":"string"}},"hasErrorEntries":{"type":"boolean"},"input":{"type":"string"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"startDate":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/TaskState"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"InvTaskDebug":{"type":"object","title":"InvTaskDebug ...","properties":{"breakpointCondition":{"$ref":"#/components/schemas/ArgFilter"},"inputOverrides":{"type":"object","additionalProperties":{"type":"string"}},"isMarkedWithBreakpoint":{"type":"boolean"},"isMarkedWithSkip":{"type":"boolean"},"outputOverrides":{"type":"object","additionalProperties":{"type":"object"}},"shouldOverrideDebugInfo":{"type":"boolean"},"skipConditionOverrideTo":{"type":"string"},"taskOriginalId":{"type":"string"}}},"TimerTrigger":{"type":"object","title":"TimerTrigger ...","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"type":"string","title":"TimerAction ..."},"TaskView":{"type":"object","description":"TaskView represents the view in client of the tasks graph"},"PlaybookView":{"type":"object","description":"PlaybookView represents the view in client of playbook graph"}}},"paths":{"/inv-playbook/task/delete/{investigationId}/{invPBTaskId}":{"post":{"summary":"Delete ad-hoc task","description":"Delete an ad-hoc task from a running playbook","operationId":"deleteAdHocTask","parameters":[{"name":"invPBTaskId","in":"path","description":"ad-hoc task ID","required":true,"schema":{"type":"string"}},{"name":"investigationId","in":"path","description":"investigation ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"InvestigationPlaybook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}},"tags":["Playbooks"]}}}}
```

## Set task due date

> Set the task due date

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"invPlaybookDue":{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"inTaskID":{"type":"string"},"invId":{"type":"string"},"version":{"type":"integer","format":"int64"}}},"InvestigationPlaybook":{"type":"object","description":"InvestigationPlaybook is a wrapper for a linked list of Playbook tasks","properties":{"Dirty":{"type":"boolean"},"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"ReplacedPlaybook":{"type":"boolean","description":"Indicate whether this playbook has new history during this session"},"ShardID":{"type":"integer","format":"int64"},"UpdatedOperatorIDs":{"type":"boolean"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"autoExtracting":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"comment":{"type":"string"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentCreateDate":{"type":"string","description":"Incident create date","format":"date-time"},"indexName":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"invPBDebugInfo":{"$ref":"#/components/schemas/InvPlaybookDebugInfo"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pbHistory":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/InvestigationPlaybookData"}},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"quiet":{"type":"boolean"},"recoveryAttempts":{"type":"integer","format":"int64"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"serverId":{"type":"string","description":"Holds the ID of the responsible cluster app server"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"syncHash":{"type":"string"},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"version":{"type":"integer","format":"int64"},"view":{"$ref":"#/components/schemas/PlaybookView"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","description":"PlaybookInput represents the playbook input","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"PlaybookInputQuery":{"type":"object","description":"PlaybookInputQuery represents the playbook query input","properties":{"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string"},"queryEntity":{"type":"string"},"queryState":{"$ref":"#/components/schemas/QueryState"},"results":{"type":"object"},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}}},"Period":{"type":"object","title":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now.","properties":{"by":{"type":"string","description":"By is used for legacty, and if exists it will override ByTo and ByFrom"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}}},"QueryState":{"type":"object","description":"QueryState represents the playbook query state","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}}},"AdvanceArg":{"type":"object","title":"AdvanceArg - advance argument can be one of the following:","description":"Simple: plain text such as \"hello\" (constant) or ${File.ID} (DT expression)\nComplex: struct with all info that is necessary to compute argument value from context (Root, Filters, Accessor & Transformers)]\nKeyValue: list of key-value","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}}},"ComplexArg":{"type":"object","description":"ComplexArg - all info that is necessary to compute argument value from context\nRoot - the root slice (or object) from to work against\nFilters - a slice of filters to apply to the root object, one after another (e.i. with AND condition between each one)\nAccessor - the key to access to each result after filter\nTransformers - a slice to transformers to apply on the result of the accessed key from each result\ne.g. if user want to take from context all File.DisplayName where File.Extension is 'EXE', and the result in uppercase than:\nRoot: is \"File\"\nFilters: will hold the \"File.DisplayName where File.Extension is 'EXE'\" query\nAccessor: is \"DisplayName\"\nTransformers: will hold the uppercase transformation","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}}},"ArgFilter":{"type":"array","description":"ArgFilter - represent a slice of atomic filters with OR condition between them (e.i. - atomic1 OR atomic2 OR ...)","items":{"$ref":"#/components/schemas/ArgAtomicFilter"}},"ArgAtomicFilter":{"type":"object","description":"ArgAtomicFilter - operator with two sides that return true/false","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}}},"OperatorArgument":{"type":"object","title":"OperatorArgument ...","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"type":"string","title":"FilterOperatorID ..."},"ArgTransformer":{"type":"object","title":"ArgTransformer ...","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"type":"string","title":"TransformerOperatorID ..."},"KeyValueArg":{"type":"object","title":"KeyValueArg ...","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"InvPlaybookDebugInfo":{"type":"object","title":"InvPlaybookDebugInfo ...","properties":{"originalInvPBId":{"type":"string"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","description":"PlaybookOutput represents the playbook output","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}}},"OutputType":{"type":"string","title":"OutputType ..."},"InvestigationPlaybookData":{"type":"object","description":"InvestigationPlaybookData returns all data of an investigation playbook, not including history","properties":{"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"autoExtracting":{"type":"boolean"},"comment":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"name":{"type":"string"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"quiet":{"type":"boolean"},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"view":{"$ref":"#/components/schemas/PlaybookView"}}},"InvestigationPlaybookState":{"type":"string","description":"InvestigationPlaybookState indicates the state of the running playbook"},"InvestigationPlaybookTask":{"type":"object","description":"InvestigationPlaybookTask is the Task in the playbook context as a node","properties":{"Reopen":{"type":"boolean"},"arguments":{"type":"object","additionalProperties":{"type":"object"}},"assignee":{"type":"string"},"assigneeSet":{"type":"boolean"},"blockingTasks":{"type":"array","items":{"type":"string"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"comments":{"type":"boolean","description":"Whether this task had any comments or not"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"conditions":{"type":"array","description":"Conditions - optional list of conditions to run when task is conditional. we check conditions by their order (e.i. - considering the first one that satisfied)","items":{"$ref":"#/components/schemas/TaskCondition"}},"continueOnError":{"type":"boolean"},"continueOnErrorType":{"$ref":"#/components/schemas/ContinueOnErrorType"},"defaultAssignee":{"type":"string"},"defaultAssigneeComplex":{"$ref":"#/components/schemas/AdvanceArg"},"defaultReminder":{"type":"integer","format":"int64"},"doNotSaveTaskHistory":{"type":"boolean"},"dueDate":{"type":"string","format":"date-time"},"dueDateDuration":{"type":"integer","format":"int64"},"dueDateDurationUnit":{"$ref":"#/components/schemas/SLADurationUnit"},"dueDateSet":{"type":"boolean"},"entries":{"type":"array","items":{"type":"string"}},"evidenceData":{"$ref":"#/components/schemas/EvidenceData"},"executionCount":{"type":"integer","format":"int64"},"externalFormUseAuth":{"type":"boolean"},"fieldMapping":{"type":"array","items":{"$ref":"#/components/schemas/FieldMapping"}},"forEachIndex":{"type":"integer","description":"Parameters needed for loops","format":"int64"},"forEachInputs":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object"}}},"form":{"$ref":"#/components/schemas/DataCollectionForm"},"formDisplay":{"$ref":"#/components/schemas/FormDisplay"},"hasErrorEntries":{"type":"boolean"},"id":{"type":"string"},"ignoreWorker":{"type":"boolean","description":"Do not run this task in a worker"},"indent":{"type":"integer","format":"int64"},"input":{"type":"string"},"isAutoSwitchedToQuietMode":{"type":"boolean"},"isOverSize":{"type":"boolean"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"message":{"$ref":"#/components/schemas/NotifiableItem"},"missingContentItem":{"type":"string","description":"content item which caused task to skip"},"nextPollingTime":{"type":"string","description":"NextPollTime Time of the next scheduled command execution","format":"date-time"},"nextTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"note":{"type":"boolean"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"parentBlockCount":{"type":"integer","description":"the number of tasks that are waiting on blocked in subplaybooks of this task","format":"int64"},"parentPlaybookID":{"type":"string"},"patched":{"type":"boolean","description":"Indicates whether this task was patched to InvPB and did not originally belong to the playbook"},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"pollingEntries":{"type":"array","description":"PollingEntryIDs IDs of entries that are still polling","items":{"type":"string"}},"pollingTimeoutTime":{"type":"string","format":"date-time"},"previousTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"quietMode":{"$ref":"#/components/schemas/QuietMode"},"reminder":{"type":"integer","description":"Duration in minutes, this field is not persisted here","format":"int64"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"restrictedCompletion":{"type":"boolean"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"skip":{"type":"boolean","description":"Skip - if true then this task will be skipped and all the tasks which comes after this task and depend on it\nwill skip (WillNotExecute)"},"skipUnavailable":{"type":"boolean","description":"SkipUnavailable if true then will check if automation exists, integration of that command is installed and\nactive or sub playbook exists in Demisto"},"sla":{"$ref":"#/components/schemas/SLA"},"slaReminder":{"$ref":"#/components/schemas/SLA"},"startDate":{"type":"string","format":"date-time"},"startedExecutingHarmfulScript":{"type":"boolean"},"state":{"$ref":"#/components/schemas/TaskState"},"subPlaybook":{"$ref":"#/components/schemas/InvestigationPlaybook"},"task":{"$ref":"#/components/schemas/Task"},"taskCompleteData":{"type":"array","description":"History complete data","items":{"$ref":"#/components/schemas/InvPlaybookTaskCompleteData"}},"taskDebug":{"$ref":"#/components/schemas/InvTaskDebug"},"taskId":{"type":"string"},"taskSize":{"type":"integer","format":"int64"},"timerTriggers":{"type":"array","description":"SLA fields","items":{"$ref":"#/components/schemas/TimerTrigger"}},"timesPolled":{"type":"integer","format":"int64"},"type":{"$ref":"#/components/schemas/TaskType"},"view":{"$ref":"#/components/schemas/TaskView"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"TaskCondition":{"type":"object","description":"TaskCondition - contains a condition and a corresponding label\nif the condition satisfied - its label is taken as the next task(s) input (e.i. the label on the edge)","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}}},"ContinueOnErrorType":{"type":"string","title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path."},"SLADurationUnit":{"type":"integer","description":"SLADurationUnit is a helper to calculate if SLA in hours or minutes","format":"int64"},"EvidenceData":{"type":"object","description":"EvidenceData - all evidence properties to evaluate in task process","properties":{"customFields":{"type":"object","description":"This field must have empty json key","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}}},"FieldMapping":{"type":"object","description":"FieldMapping - Map a task output (complex or simple value) to an incident field","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}}},"DataCollectionForm":{"type":"object","title":"DataCollectionForm - a data collection form with questions.","properties":{"description":{"type":"string"},"expired":{"type":"boolean"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"sender":{"type":"string"},"title":{"type":"string"},"totalAnswers":{"type":"integer","format":"uint64"}}},"Question":{"type":"object","title":"Question - question for a form with a given type.","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"fieldAssociated":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"labelArg":{"$ref":"#/components/schemas/AdvanceArg"},"options":{"type":"array","items":{"type":"string"}},"optionsArg":{"type":"array","items":{"$ref":"#/components/schemas/AdvanceArg"}},"placeholder":{"type":"string"},"readOnly":{"type":"boolean"},"required":{"type":"boolean"},"tooltip":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"FormDisplay":{"type":"object","title":"FormDisplay - display options for communication/ask task (for both email and web forms).","properties":{"bodyBackgroundColor":{"type":"string"},"bodyFontColor":{"type":"string"},"headerBackgroundColor":{"type":"string"},"headerFontColor":{"type":"string"},"isExternalRtl":{"type":"boolean"},"sender":{"type":"string"},"submitButtonBackgroundColor":{"type":"string"},"submitButtonFontColor":{"type":"string"},"submitText":{"type":"string"}}},"TaskLoop":{"type":"object","description":"TaskLoop contains loop details","properties":{"brand":{"type":"string"},"builtinCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"exitCondition":{"type":"string"},"forEach":{"type":"boolean"},"isCommand":{"type":"boolean"},"max":{"type":"integer","format":"int64"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"scriptId":{"type":"string"},"scriptName":{"type":"string"},"wait":{"type":"integer","format":"int64"}}},"NotifiableItem":{"type":"object","title":"NotifiableItem ...","properties":{"bcc":{"$ref":"#/components/schemas/AdvanceArg"},"body":{"$ref":"#/components/schemas/AdvanceArg"},"cc":{"$ref":"#/components/schemas/AdvanceArg"},"defaultOption":{"type":"string"},"format":{"type":"string"},"methods":{"type":"array","items":{"type":"string"}},"replyOptions":{"type":"array","items":{"type":"string"}},"subject":{"$ref":"#/components/schemas/AdvanceArg"},"timings":{"$ref":"#/components/schemas/NotifyTimings"},"to":{"$ref":"#/components/schemas/AdvanceArg"}}},"NotifyTimings":{"type":"object","title":"NotifyTimings - time control on notify items - retries max count and intervals.","properties":{"completeAfterReplies":{"type":"integer","format":"uint64"},"completeAfterSLA":{"type":"boolean"},"completeAfterV2":{"type":"boolean"},"retriesCount":{"type":"integer","format":"uint64"},"retriesInterval":{"type":"integer","format":"uint64"}}},"QuietMode":{"type":"integer","description":"QuietMode quiet mode for playbook task","format":"int64"},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"},"SLA":{"type":"object","title":"SLA ...","properties":{"days":{"type":"integer","format":"int64"},"hours":{"type":"integer","format":"int64"},"minutes":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"}}},"TaskState":{"type":"string","description":"TaskState indicates the state of the task during the incident/investigation execution"},"Task":{"type":"object","description":"Task is the basic task in the task repository that can be associated to an incident via playbook","properties":{"brand":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"clonedFrom":{"type":"string"},"comment":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"created":{"type":"string","format":"date-time"},"description":{"type":"string"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isCommand":{"type":"boolean"},"isLocked":{"type":"boolean"},"isTitleTask":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"playbookId":{"type":"string"},"playbookName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"scriptId":{"type":"string"},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"},"version":{"type":"integer","format":"int64"}}},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"InvPlaybookTaskCompleteData":{"type":"object","title":"InvPlaybookTaskCompleteData ...","properties":{"arguments":{"type":"object","additionalProperties":{"type":"object"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"entries":{"type":"array","items":{"type":"string"}},"hasErrorEntries":{"type":"boolean"},"input":{"type":"string"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"startDate":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/TaskState"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"InvTaskDebug":{"type":"object","title":"InvTaskDebug ...","properties":{"breakpointCondition":{"$ref":"#/components/schemas/ArgFilter"},"inputOverrides":{"type":"object","additionalProperties":{"type":"string"}},"isMarkedWithBreakpoint":{"type":"boolean"},"isMarkedWithSkip":{"type":"boolean"},"outputOverrides":{"type":"object","additionalProperties":{"type":"object"}},"shouldOverrideDebugInfo":{"type":"boolean"},"skipConditionOverrideTo":{"type":"string"},"taskOriginalId":{"type":"string"}}},"TimerTrigger":{"type":"object","title":"TimerTrigger ...","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"type":"string","title":"TimerAction ..."},"TaskView":{"type":"object","description":"TaskView represents the view in client of the tasks graph"},"PlaybookView":{"type":"object","description":"PlaybookView represents the view in client of playbook graph"}}},"paths":{"/inv-playbook/task/due":{"post":{"summary":"Set task due date","description":"Set the task due date","operationId":"taskSetDue","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invPlaybookDue"}},"application/xml":{"schema":{"$ref":"#/components/schemas/invPlaybookDue"}}}},"responses":{"200":{"description":"InvestigationPlaybook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}},"tags":["Playbooks"]}}}}
```

## Edit ad-hoc task

> Edit an ad-hoc task in a running playbook

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"requestBodies":{"InvPlaybookTaskData":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvPlaybookTaskData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/InvPlaybookTaskData"}}}}},"schemas":{"InvPlaybookTaskData":{"type":"object","title":"InvPlaybookTaskData ...","properties":{"addAfter":{"type":"boolean"},"addToSeparateBranch":{"type":"boolean"},"automationScript":{"type":"string"},"description":{"type":"string"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"name":{"type":"string"},"neighborInvPBTaskId":{"type":"string"},"playbookId":{"type":"string"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"}}},"TaskLoop":{"type":"object","description":"TaskLoop contains loop details","properties":{"brand":{"type":"string"},"builtinCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"exitCondition":{"type":"string"},"forEach":{"type":"boolean"},"isCommand":{"type":"boolean"},"max":{"type":"integer","format":"int64"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"scriptId":{"type":"string"},"scriptName":{"type":"string"},"wait":{"type":"integer","format":"int64"}}},"ArgFilter":{"type":"array","description":"ArgFilter - represent a slice of atomic filters with OR condition between them (e.i. - atomic1 OR atomic2 OR ...)","items":{"$ref":"#/components/schemas/ArgAtomicFilter"}},"ArgAtomicFilter":{"type":"object","description":"ArgAtomicFilter - operator with two sides that return true/false","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}}},"OperatorArgument":{"type":"object","title":"OperatorArgument ...","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"AdvanceArg":{"type":"object","title":"AdvanceArg - advance argument can be one of the following:","description":"Simple: plain text such as \"hello\" (constant) or ${File.ID} (DT expression)\nComplex: struct with all info that is necessary to compute argument value from context (Root, Filters, Accessor & Transformers)]\nKeyValue: list of key-value","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}}},"ComplexArg":{"type":"object","description":"ComplexArg - all info that is necessary to compute argument value from context\nRoot - the root slice (or object) from to work against\nFilters - a slice of filters to apply to the root object, one after another (e.i. with AND condition between each one)\nAccessor - the key to access to each result after filter\nTransformers - a slice to transformers to apply on the result of the accessed key from each result\ne.g. if user want to take from context all File.DisplayName where File.Extension is 'EXE', and the result in uppercase than:\nRoot: is \"File\"\nFilters: will hold the \"File.DisplayName where File.Extension is 'EXE'\" query\nAccessor: is \"DisplayName\"\nTransformers: will hold the uppercase transformation","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}}},"ArgTransformer":{"type":"object","title":"ArgTransformer ...","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"type":"string","title":"TransformerOperatorID ..."},"KeyValueArg":{"type":"object","title":"KeyValueArg ...","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"type":"string","title":"FilterOperatorID ..."},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"InvestigationPlaybook":{"type":"object","description":"InvestigationPlaybook is a wrapper for a linked list of Playbook tasks","properties":{"Dirty":{"type":"boolean"},"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"ReplacedPlaybook":{"type":"boolean","description":"Indicate whether this playbook has new history during this session"},"ShardID":{"type":"integer","format":"int64"},"UpdatedOperatorIDs":{"type":"boolean"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"autoExtracting":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"comment":{"type":"string"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentCreateDate":{"type":"string","description":"Incident create date","format":"date-time"},"indexName":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"invPBDebugInfo":{"$ref":"#/components/schemas/InvPlaybookDebugInfo"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pbHistory":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/InvestigationPlaybookData"}},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"quiet":{"type":"boolean"},"recoveryAttempts":{"type":"integer","format":"int64"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"serverId":{"type":"string","description":"Holds the ID of the responsible cluster app server"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"syncHash":{"type":"string"},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"version":{"type":"integer","format":"int64"},"view":{"$ref":"#/components/schemas/PlaybookView"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","description":"PlaybookInput represents the playbook input","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"PlaybookInputQuery":{"type":"object","description":"PlaybookInputQuery represents the playbook query input","properties":{"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string"},"queryEntity":{"type":"string"},"queryState":{"$ref":"#/components/schemas/QueryState"},"results":{"type":"object"},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}}},"Period":{"type":"object","title":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now.","properties":{"by":{"type":"string","description":"By is used for legacty, and if exists it will override ByTo and ByFrom"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}}},"QueryState":{"type":"object","description":"QueryState represents the playbook query state","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}}},"InvPlaybookDebugInfo":{"type":"object","title":"InvPlaybookDebugInfo ...","properties":{"originalInvPBId":{"type":"string"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","description":"PlaybookOutput represents the playbook output","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}}},"OutputType":{"type":"string","title":"OutputType ..."},"InvestigationPlaybookData":{"type":"object","description":"InvestigationPlaybookData returns all data of an investigation playbook, not including history","properties":{"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"autoExtracting":{"type":"boolean"},"comment":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"name":{"type":"string"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"quiet":{"type":"boolean"},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"view":{"$ref":"#/components/schemas/PlaybookView"}}},"InvestigationPlaybookState":{"type":"string","description":"InvestigationPlaybookState indicates the state of the running playbook"},"InvestigationPlaybookTask":{"type":"object","description":"InvestigationPlaybookTask is the Task in the playbook context as a node","properties":{"Reopen":{"type":"boolean"},"arguments":{"type":"object","additionalProperties":{"type":"object"}},"assignee":{"type":"string"},"assigneeSet":{"type":"boolean"},"blockingTasks":{"type":"array","items":{"type":"string"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"comments":{"type":"boolean","description":"Whether this task had any comments or not"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"conditions":{"type":"array","description":"Conditions - optional list of conditions to run when task is conditional. we check conditions by their order (e.i. - considering the first one that satisfied)","items":{"$ref":"#/components/schemas/TaskCondition"}},"continueOnError":{"type":"boolean"},"continueOnErrorType":{"$ref":"#/components/schemas/ContinueOnErrorType"},"defaultAssignee":{"type":"string"},"defaultAssigneeComplex":{"$ref":"#/components/schemas/AdvanceArg"},"defaultReminder":{"type":"integer","format":"int64"},"doNotSaveTaskHistory":{"type":"boolean"},"dueDate":{"type":"string","format":"date-time"},"dueDateDuration":{"type":"integer","format":"int64"},"dueDateDurationUnit":{"$ref":"#/components/schemas/SLADurationUnit"},"dueDateSet":{"type":"boolean"},"entries":{"type":"array","items":{"type":"string"}},"evidenceData":{"$ref":"#/components/schemas/EvidenceData"},"executionCount":{"type":"integer","format":"int64"},"externalFormUseAuth":{"type":"boolean"},"fieldMapping":{"type":"array","items":{"$ref":"#/components/schemas/FieldMapping"}},"forEachIndex":{"type":"integer","description":"Parameters needed for loops","format":"int64"},"forEachInputs":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object"}}},"form":{"$ref":"#/components/schemas/DataCollectionForm"},"formDisplay":{"$ref":"#/components/schemas/FormDisplay"},"hasErrorEntries":{"type":"boolean"},"id":{"type":"string"},"ignoreWorker":{"type":"boolean","description":"Do not run this task in a worker"},"indent":{"type":"integer","format":"int64"},"input":{"type":"string"},"isAutoSwitchedToQuietMode":{"type":"boolean"},"isOverSize":{"type":"boolean"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"message":{"$ref":"#/components/schemas/NotifiableItem"},"missingContentItem":{"type":"string","description":"content item which caused task to skip"},"nextPollingTime":{"type":"string","description":"NextPollTime Time of the next scheduled command execution","format":"date-time"},"nextTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"note":{"type":"boolean"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"parentBlockCount":{"type":"integer","description":"the number of tasks that are waiting on blocked in subplaybooks of this task","format":"int64"},"parentPlaybookID":{"type":"string"},"patched":{"type":"boolean","description":"Indicates whether this task was patched to InvPB and did not originally belong to the playbook"},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"pollingEntries":{"type":"array","description":"PollingEntryIDs IDs of entries that are still polling","items":{"type":"string"}},"pollingTimeoutTime":{"type":"string","format":"date-time"},"previousTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"quietMode":{"$ref":"#/components/schemas/QuietMode"},"reminder":{"type":"integer","description":"Duration in minutes, this field is not persisted here","format":"int64"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"restrictedCompletion":{"type":"boolean"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"skip":{"type":"boolean","description":"Skip - if true then this task will be skipped and all the tasks which comes after this task and depend on it\nwill skip (WillNotExecute)"},"skipUnavailable":{"type":"boolean","description":"SkipUnavailable if true then will check if automation exists, integration of that command is installed and\nactive or sub playbook exists in Demisto"},"sla":{"$ref":"#/components/schemas/SLA"},"slaReminder":{"$ref":"#/components/schemas/SLA"},"startDate":{"type":"string","format":"date-time"},"startedExecutingHarmfulScript":{"type":"boolean"},"state":{"$ref":"#/components/schemas/TaskState"},"subPlaybook":{"$ref":"#/components/schemas/InvestigationPlaybook"},"task":{"$ref":"#/components/schemas/Task"},"taskCompleteData":{"type":"array","description":"History complete data","items":{"$ref":"#/components/schemas/InvPlaybookTaskCompleteData"}},"taskDebug":{"$ref":"#/components/schemas/InvTaskDebug"},"taskId":{"type":"string"},"taskSize":{"type":"integer","format":"int64"},"timerTriggers":{"type":"array","description":"SLA fields","items":{"$ref":"#/components/schemas/TimerTrigger"}},"timesPolled":{"type":"integer","format":"int64"},"type":{"$ref":"#/components/schemas/TaskType"},"view":{"$ref":"#/components/schemas/TaskView"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"TaskCondition":{"type":"object","description":"TaskCondition - contains a condition and a corresponding label\nif the condition satisfied - its label is taken as the next task(s) input (e.i. the label on the edge)","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}}},"ContinueOnErrorType":{"type":"string","title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path."},"SLADurationUnit":{"type":"integer","description":"SLADurationUnit is a helper to calculate if SLA in hours or minutes","format":"int64"},"EvidenceData":{"type":"object","description":"EvidenceData - all evidence properties to evaluate in task process","properties":{"customFields":{"type":"object","description":"This field must have empty json key","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}}},"FieldMapping":{"type":"object","description":"FieldMapping - Map a task output (complex or simple value) to an incident field","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}}},"DataCollectionForm":{"type":"object","title":"DataCollectionForm - a data collection form with questions.","properties":{"description":{"type":"string"},"expired":{"type":"boolean"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"sender":{"type":"string"},"title":{"type":"string"},"totalAnswers":{"type":"integer","format":"uint64"}}},"Question":{"type":"object","title":"Question - question for a form with a given type.","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"fieldAssociated":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"labelArg":{"$ref":"#/components/schemas/AdvanceArg"},"options":{"type":"array","items":{"type":"string"}},"optionsArg":{"type":"array","items":{"$ref":"#/components/schemas/AdvanceArg"}},"placeholder":{"type":"string"},"readOnly":{"type":"boolean"},"required":{"type":"boolean"},"tooltip":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"FormDisplay":{"type":"object","title":"FormDisplay - display options for communication/ask task (for both email and web forms).","properties":{"bodyBackgroundColor":{"type":"string"},"bodyFontColor":{"type":"string"},"headerBackgroundColor":{"type":"string"},"headerFontColor":{"type":"string"},"isExternalRtl":{"type":"boolean"},"sender":{"type":"string"},"submitButtonBackgroundColor":{"type":"string"},"submitButtonFontColor":{"type":"string"},"submitText":{"type":"string"}}},"NotifiableItem":{"type":"object","title":"NotifiableItem ...","properties":{"bcc":{"$ref":"#/components/schemas/AdvanceArg"},"body":{"$ref":"#/components/schemas/AdvanceArg"},"cc":{"$ref":"#/components/schemas/AdvanceArg"},"defaultOption":{"type":"string"},"format":{"type":"string"},"methods":{"type":"array","items":{"type":"string"}},"replyOptions":{"type":"array","items":{"type":"string"}},"subject":{"$ref":"#/components/schemas/AdvanceArg"},"timings":{"$ref":"#/components/schemas/NotifyTimings"},"to":{"$ref":"#/components/schemas/AdvanceArg"}}},"NotifyTimings":{"type":"object","title":"NotifyTimings - time control on notify items - retries max count and intervals.","properties":{"completeAfterReplies":{"type":"integer","format":"uint64"},"completeAfterSLA":{"type":"boolean"},"completeAfterV2":{"type":"boolean"},"retriesCount":{"type":"integer","format":"uint64"},"retriesInterval":{"type":"integer","format":"uint64"}}},"QuietMode":{"type":"integer","description":"QuietMode quiet mode for playbook task","format":"int64"},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"},"SLA":{"type":"object","title":"SLA ...","properties":{"days":{"type":"integer","format":"int64"},"hours":{"type":"integer","format":"int64"},"minutes":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"}}},"TaskState":{"type":"string","description":"TaskState indicates the state of the task during the incident/investigation execution"},"Task":{"type":"object","description":"Task is the basic task in the task repository that can be associated to an incident via playbook","properties":{"brand":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"clonedFrom":{"type":"string"},"comment":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"created":{"type":"string","format":"date-time"},"description":{"type":"string"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isCommand":{"type":"boolean"},"isLocked":{"type":"boolean"},"isTitleTask":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"playbookId":{"type":"string"},"playbookName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"scriptId":{"type":"string"},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"},"version":{"type":"integer","format":"int64"}}},"InvPlaybookTaskCompleteData":{"type":"object","title":"InvPlaybookTaskCompleteData ...","properties":{"arguments":{"type":"object","additionalProperties":{"type":"object"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"entries":{"type":"array","items":{"type":"string"}},"hasErrorEntries":{"type":"boolean"},"input":{"type":"string"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"startDate":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/TaskState"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"InvTaskDebug":{"type":"object","title":"InvTaskDebug ...","properties":{"breakpointCondition":{"$ref":"#/components/schemas/ArgFilter"},"inputOverrides":{"type":"object","additionalProperties":{"type":"string"}},"isMarkedWithBreakpoint":{"type":"boolean"},"isMarkedWithSkip":{"type":"boolean"},"outputOverrides":{"type":"object","additionalProperties":{"type":"object"}},"shouldOverrideDebugInfo":{"type":"boolean"},"skipConditionOverrideTo":{"type":"string"},"taskOriginalId":{"type":"string"}}},"TimerTrigger":{"type":"object","title":"TimerTrigger ...","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"type":"string","title":"TimerAction ..."},"TaskView":{"type":"object","description":"TaskView represents the view in client of the tasks graph"},"PlaybookView":{"type":"object","description":"PlaybookView represents the view in client of playbook graph"}}},"paths":{"/inv-playbook/task/edit/{investigationId}":{"post":{"summary":"Edit ad-hoc task","description":"Edit an ad-hoc task in a running playbook","operationId":"editAdHocTask","parameters":[{"name":"investigationId","in":"path","description":"investigation ID","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/InvPlaybookTaskData"},"responses":{"200":{"description":"InvestigationPlaybook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}},"tags":["Playbooks"]}}}}
```

## Task add comment

> Add comment to a task

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"requestBodies":{"invTaskInfo":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invTaskInfo"}},"application/xml":{"schema":{"$ref":"#/components/schemas/invTaskInfo"}}}}},"schemas":{"invTaskInfo":{"type":"object","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"comment":{"type":"string"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/TaskCondition"}},"inTaskID":{"type":"string"},"input":{"type":"string"},"invId":{"type":"string"},"loopArgs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"loopCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"version":{"type":"integer","format":"int64"}}},"AdvanceArg":{"type":"object","title":"AdvanceArg - advance argument can be one of the following:","description":"Simple: plain text such as \"hello\" (constant) or ${File.ID} (DT expression)\nComplex: struct with all info that is necessary to compute argument value from context (Root, Filters, Accessor & Transformers)]\nKeyValue: list of key-value","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}}},"ComplexArg":{"type":"object","description":"ComplexArg - all info that is necessary to compute argument value from context\nRoot - the root slice (or object) from to work against\nFilters - a slice of filters to apply to the root object, one after another (e.i. with AND condition between each one)\nAccessor - the key to access to each result after filter\nTransformers - a slice to transformers to apply on the result of the accessed key from each result\ne.g. if user want to take from context all File.DisplayName where File.Extension is 'EXE', and the result in uppercase than:\nRoot: is \"File\"\nFilters: will hold the \"File.DisplayName where File.Extension is 'EXE'\" query\nAccessor: is \"DisplayName\"\nTransformers: will hold the uppercase transformation","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}}},"ArgFilter":{"type":"array","description":"ArgFilter - represent a slice of atomic filters with OR condition between them (e.i. - atomic1 OR atomic2 OR ...)","items":{"$ref":"#/components/schemas/ArgAtomicFilter"}},"ArgAtomicFilter":{"type":"object","description":"ArgAtomicFilter - operator with two sides that return true/false","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}}},"OperatorArgument":{"type":"object","title":"OperatorArgument ...","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"type":"string","title":"FilterOperatorID ..."},"ArgTransformer":{"type":"object","title":"ArgTransformer ...","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"type":"string","title":"TransformerOperatorID ..."},"KeyValueArg":{"type":"object","title":"KeyValueArg ...","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"TaskCondition":{"type":"object","description":"TaskCondition - contains a condition and a corresponding label\nif the condition satisfied - its label is taken as the next task(s) input (e.i. the label on the edge)","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}}},"InvestigationPlaybook":{"type":"object","description":"InvestigationPlaybook is a wrapper for a linked list of Playbook tasks","properties":{"Dirty":{"type":"boolean"},"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"ReplacedPlaybook":{"type":"boolean","description":"Indicate whether this playbook has new history during this session"},"ShardID":{"type":"integer","format":"int64"},"UpdatedOperatorIDs":{"type":"boolean"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"autoExtracting":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"comment":{"type":"string"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentCreateDate":{"type":"string","description":"Incident create date","format":"date-time"},"indexName":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"invPBDebugInfo":{"$ref":"#/components/schemas/InvPlaybookDebugInfo"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pbHistory":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/InvestigationPlaybookData"}},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"quiet":{"type":"boolean"},"recoveryAttempts":{"type":"integer","format":"int64"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"serverId":{"type":"string","description":"Holds the ID of the responsible cluster app server"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"syncHash":{"type":"string"},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"version":{"type":"integer","format":"int64"},"view":{"$ref":"#/components/schemas/PlaybookView"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","description":"PlaybookInput represents the playbook input","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"PlaybookInputQuery":{"type":"object","description":"PlaybookInputQuery represents the playbook query input","properties":{"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string"},"queryEntity":{"type":"string"},"queryState":{"$ref":"#/components/schemas/QueryState"},"results":{"type":"object"},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}}},"Period":{"type":"object","title":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now.","properties":{"by":{"type":"string","description":"By is used for legacty, and if exists it will override ByTo and ByFrom"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}}},"QueryState":{"type":"object","description":"QueryState represents the playbook query state","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}}},"InvPlaybookDebugInfo":{"type":"object","title":"InvPlaybookDebugInfo ...","properties":{"originalInvPBId":{"type":"string"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","description":"PlaybookOutput represents the playbook output","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}}},"OutputType":{"type":"string","title":"OutputType ..."},"InvestigationPlaybookData":{"type":"object","description":"InvestigationPlaybookData returns all data of an investigation playbook, not including history","properties":{"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"autoExtracting":{"type":"boolean"},"comment":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"name":{"type":"string"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"quiet":{"type":"boolean"},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"view":{"$ref":"#/components/schemas/PlaybookView"}}},"InvestigationPlaybookState":{"type":"string","description":"InvestigationPlaybookState indicates the state of the running playbook"},"InvestigationPlaybookTask":{"type":"object","description":"InvestigationPlaybookTask is the Task in the playbook context as a node","properties":{"Reopen":{"type":"boolean"},"arguments":{"type":"object","additionalProperties":{"type":"object"}},"assignee":{"type":"string"},"assigneeSet":{"type":"boolean"},"blockingTasks":{"type":"array","items":{"type":"string"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"comments":{"type":"boolean","description":"Whether this task had any comments or not"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"conditions":{"type":"array","description":"Conditions - optional list of conditions to run when task is conditional. we check conditions by their order (e.i. - considering the first one that satisfied)","items":{"$ref":"#/components/schemas/TaskCondition"}},"continueOnError":{"type":"boolean"},"continueOnErrorType":{"$ref":"#/components/schemas/ContinueOnErrorType"},"defaultAssignee":{"type":"string"},"defaultAssigneeComplex":{"$ref":"#/components/schemas/AdvanceArg"},"defaultReminder":{"type":"integer","format":"int64"},"doNotSaveTaskHistory":{"type":"boolean"},"dueDate":{"type":"string","format":"date-time"},"dueDateDuration":{"type":"integer","format":"int64"},"dueDateDurationUnit":{"$ref":"#/components/schemas/SLADurationUnit"},"dueDateSet":{"type":"boolean"},"entries":{"type":"array","items":{"type":"string"}},"evidenceData":{"$ref":"#/components/schemas/EvidenceData"},"executionCount":{"type":"integer","format":"int64"},"externalFormUseAuth":{"type":"boolean"},"fieldMapping":{"type":"array","items":{"$ref":"#/components/schemas/FieldMapping"}},"forEachIndex":{"type":"integer","description":"Parameters needed for loops","format":"int64"},"forEachInputs":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object"}}},"form":{"$ref":"#/components/schemas/DataCollectionForm"},"formDisplay":{"$ref":"#/components/schemas/FormDisplay"},"hasErrorEntries":{"type":"boolean"},"id":{"type":"string"},"ignoreWorker":{"type":"boolean","description":"Do not run this task in a worker"},"indent":{"type":"integer","format":"int64"},"input":{"type":"string"},"isAutoSwitchedToQuietMode":{"type":"boolean"},"isOverSize":{"type":"boolean"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"message":{"$ref":"#/components/schemas/NotifiableItem"},"missingContentItem":{"type":"string","description":"content item which caused task to skip"},"nextPollingTime":{"type":"string","description":"NextPollTime Time of the next scheduled command execution","format":"date-time"},"nextTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"note":{"type":"boolean"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"parentBlockCount":{"type":"integer","description":"the number of tasks that are waiting on blocked in subplaybooks of this task","format":"int64"},"parentPlaybookID":{"type":"string"},"patched":{"type":"boolean","description":"Indicates whether this task was patched to InvPB and did not originally belong to the playbook"},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"pollingEntries":{"type":"array","description":"PollingEntryIDs IDs of entries that are still polling","items":{"type":"string"}},"pollingTimeoutTime":{"type":"string","format":"date-time"},"previousTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"quietMode":{"$ref":"#/components/schemas/QuietMode"},"reminder":{"type":"integer","description":"Duration in minutes, this field is not persisted here","format":"int64"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"restrictedCompletion":{"type":"boolean"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"skip":{"type":"boolean","description":"Skip - if true then this task will be skipped and all the tasks which comes after this task and depend on it\nwill skip (WillNotExecute)"},"skipUnavailable":{"type":"boolean","description":"SkipUnavailable if true then will check if automation exists, integration of that command is installed and\nactive or sub playbook exists in Demisto"},"sla":{"$ref":"#/components/schemas/SLA"},"slaReminder":{"$ref":"#/components/schemas/SLA"},"startDate":{"type":"string","format":"date-time"},"startedExecutingHarmfulScript":{"type":"boolean"},"state":{"$ref":"#/components/schemas/TaskState"},"subPlaybook":{"$ref":"#/components/schemas/InvestigationPlaybook"},"task":{"$ref":"#/components/schemas/Task"},"taskCompleteData":{"type":"array","description":"History complete data","items":{"$ref":"#/components/schemas/InvPlaybookTaskCompleteData"}},"taskDebug":{"$ref":"#/components/schemas/InvTaskDebug"},"taskId":{"type":"string"},"taskSize":{"type":"integer","format":"int64"},"timerTriggers":{"type":"array","description":"SLA fields","items":{"$ref":"#/components/schemas/TimerTrigger"}},"timesPolled":{"type":"integer","format":"int64"},"type":{"$ref":"#/components/schemas/TaskType"},"view":{"$ref":"#/components/schemas/TaskView"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"ContinueOnErrorType":{"type":"string","title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path."},"SLADurationUnit":{"type":"integer","description":"SLADurationUnit is a helper to calculate if SLA in hours or minutes","format":"int64"},"EvidenceData":{"type":"object","description":"EvidenceData - all evidence properties to evaluate in task process","properties":{"customFields":{"type":"object","description":"This field must have empty json key","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}}},"FieldMapping":{"type":"object","description":"FieldMapping - Map a task output (complex or simple value) to an incident field","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}}},"DataCollectionForm":{"type":"object","title":"DataCollectionForm - a data collection form with questions.","properties":{"description":{"type":"string"},"expired":{"type":"boolean"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"sender":{"type":"string"},"title":{"type":"string"},"totalAnswers":{"type":"integer","format":"uint64"}}},"Question":{"type":"object","title":"Question - question for a form with a given type.","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"fieldAssociated":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"labelArg":{"$ref":"#/components/schemas/AdvanceArg"},"options":{"type":"array","items":{"type":"string"}},"optionsArg":{"type":"array","items":{"$ref":"#/components/schemas/AdvanceArg"}},"placeholder":{"type":"string"},"readOnly":{"type":"boolean"},"required":{"type":"boolean"},"tooltip":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"FormDisplay":{"type":"object","title":"FormDisplay - display options for communication/ask task (for both email and web forms).","properties":{"bodyBackgroundColor":{"type":"string"},"bodyFontColor":{"type":"string"},"headerBackgroundColor":{"type":"string"},"headerFontColor":{"type":"string"},"isExternalRtl":{"type":"boolean"},"sender":{"type":"string"},"submitButtonBackgroundColor":{"type":"string"},"submitButtonFontColor":{"type":"string"},"submitText":{"type":"string"}}},"TaskLoop":{"type":"object","description":"TaskLoop contains loop details","properties":{"brand":{"type":"string"},"builtinCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"exitCondition":{"type":"string"},"forEach":{"type":"boolean"},"isCommand":{"type":"boolean"},"max":{"type":"integer","format":"int64"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"scriptId":{"type":"string"},"scriptName":{"type":"string"},"wait":{"type":"integer","format":"int64"}}},"NotifiableItem":{"type":"object","title":"NotifiableItem ...","properties":{"bcc":{"$ref":"#/components/schemas/AdvanceArg"},"body":{"$ref":"#/components/schemas/AdvanceArg"},"cc":{"$ref":"#/components/schemas/AdvanceArg"},"defaultOption":{"type":"string"},"format":{"type":"string"},"methods":{"type":"array","items":{"type":"string"}},"replyOptions":{"type":"array","items":{"type":"string"}},"subject":{"$ref":"#/components/schemas/AdvanceArg"},"timings":{"$ref":"#/components/schemas/NotifyTimings"},"to":{"$ref":"#/components/schemas/AdvanceArg"}}},"NotifyTimings":{"type":"object","title":"NotifyTimings - time control on notify items - retries max count and intervals.","properties":{"completeAfterReplies":{"type":"integer","format":"uint64"},"completeAfterSLA":{"type":"boolean"},"completeAfterV2":{"type":"boolean"},"retriesCount":{"type":"integer","format":"uint64"},"retriesInterval":{"type":"integer","format":"uint64"}}},"QuietMode":{"type":"integer","description":"QuietMode quiet mode for playbook task","format":"int64"},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"},"SLA":{"type":"object","title":"SLA ...","properties":{"days":{"type":"integer","format":"int64"},"hours":{"type":"integer","format":"int64"},"minutes":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"}}},"TaskState":{"type":"string","description":"TaskState indicates the state of the task during the incident/investigation execution"},"Task":{"type":"object","description":"Task is the basic task in the task repository that can be associated to an incident via playbook","properties":{"brand":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"clonedFrom":{"type":"string"},"comment":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"created":{"type":"string","format":"date-time"},"description":{"type":"string"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isCommand":{"type":"boolean"},"isLocked":{"type":"boolean"},"isTitleTask":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"playbookId":{"type":"string"},"playbookName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"scriptId":{"type":"string"},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"},"version":{"type":"integer","format":"int64"}}},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"InvPlaybookTaskCompleteData":{"type":"object","title":"InvPlaybookTaskCompleteData ...","properties":{"arguments":{"type":"object","additionalProperties":{"type":"object"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"entries":{"type":"array","items":{"type":"string"}},"hasErrorEntries":{"type":"boolean"},"input":{"type":"string"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"startDate":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/TaskState"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"InvTaskDebug":{"type":"object","title":"InvTaskDebug ...","properties":{"breakpointCondition":{"$ref":"#/components/schemas/ArgFilter"},"inputOverrides":{"type":"object","additionalProperties":{"type":"string"}},"isMarkedWithBreakpoint":{"type":"boolean"},"isMarkedWithSkip":{"type":"boolean"},"outputOverrides":{"type":"object","additionalProperties":{"type":"object"}},"shouldOverrideDebugInfo":{"type":"boolean"},"skipConditionOverrideTo":{"type":"string"},"taskOriginalId":{"type":"string"}}},"TimerTrigger":{"type":"object","title":"TimerTrigger ...","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"type":"string","title":"TimerAction ..."},"TaskView":{"type":"object","description":"TaskView represents the view in client of the tasks graph"},"PlaybookView":{"type":"object","description":"PlaybookView represents the view in client of playbook graph"}}},"paths":{"/inv-playbook/task/note/add":{"post":{"summary":"Task add comment","description":"Add comment to a task","operationId":"taskAddComment","requestBody":{"$ref":"#/components/requestBodies/invTaskInfo"},"responses":{"200":{"description":"InvestigationPlaybook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}},"tags":["Playbooks"]}}}}
```

## Un complete a task

> Reopen a closed task and change the status to uncomplete

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"requestBodies":{"invTaskInfo":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invTaskInfo"}},"application/xml":{"schema":{"$ref":"#/components/schemas/invTaskInfo"}}}}},"schemas":{"invTaskInfo":{"type":"object","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"comment":{"type":"string"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/TaskCondition"}},"inTaskID":{"type":"string"},"input":{"type":"string"},"invId":{"type":"string"},"loopArgs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"loopCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"version":{"type":"integer","format":"int64"}}},"AdvanceArg":{"type":"object","title":"AdvanceArg - advance argument can be one of the following:","description":"Simple: plain text such as \"hello\" (constant) or ${File.ID} (DT expression)\nComplex: struct with all info that is necessary to compute argument value from context (Root, Filters, Accessor & Transformers)]\nKeyValue: list of key-value","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}}},"ComplexArg":{"type":"object","description":"ComplexArg - all info that is necessary to compute argument value from context\nRoot - the root slice (or object) from to work against\nFilters - a slice of filters to apply to the root object, one after another (e.i. with AND condition between each one)\nAccessor - the key to access to each result after filter\nTransformers - a slice to transformers to apply on the result of the accessed key from each result\ne.g. if user want to take from context all File.DisplayName where File.Extension is 'EXE', and the result in uppercase than:\nRoot: is \"File\"\nFilters: will hold the \"File.DisplayName where File.Extension is 'EXE'\" query\nAccessor: is \"DisplayName\"\nTransformers: will hold the uppercase transformation","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}}},"ArgFilter":{"type":"array","description":"ArgFilter - represent a slice of atomic filters with OR condition between them (e.i. - atomic1 OR atomic2 OR ...)","items":{"$ref":"#/components/schemas/ArgAtomicFilter"}},"ArgAtomicFilter":{"type":"object","description":"ArgAtomicFilter - operator with two sides that return true/false","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}}},"OperatorArgument":{"type":"object","title":"OperatorArgument ...","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"type":"string","title":"FilterOperatorID ..."},"ArgTransformer":{"type":"object","title":"ArgTransformer ...","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"type":"string","title":"TransformerOperatorID ..."},"KeyValueArg":{"type":"object","title":"KeyValueArg ...","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"TaskCondition":{"type":"object","description":"TaskCondition - contains a condition and a corresponding label\nif the condition satisfied - its label is taken as the next task(s) input (e.i. the label on the edge)","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}}},"InvestigationPlaybook":{"type":"object","description":"InvestigationPlaybook is a wrapper for a linked list of Playbook tasks","properties":{"Dirty":{"type":"boolean"},"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"ReplacedPlaybook":{"type":"boolean","description":"Indicate whether this playbook has new history during this session"},"ShardID":{"type":"integer","format":"int64"},"UpdatedOperatorIDs":{"type":"boolean"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"autoExtracting":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"comment":{"type":"string"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentCreateDate":{"type":"string","description":"Incident create date","format":"date-time"},"indexName":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"invPBDebugInfo":{"$ref":"#/components/schemas/InvPlaybookDebugInfo"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pbHistory":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/InvestigationPlaybookData"}},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"quiet":{"type":"boolean"},"recoveryAttempts":{"type":"integer","format":"int64"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"serverId":{"type":"string","description":"Holds the ID of the responsible cluster app server"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"syncHash":{"type":"string"},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"version":{"type":"integer","format":"int64"},"view":{"$ref":"#/components/schemas/PlaybookView"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","description":"PlaybookInput represents the playbook input","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"PlaybookInputQuery":{"type":"object","description":"PlaybookInputQuery represents the playbook query input","properties":{"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string"},"queryEntity":{"type":"string"},"queryState":{"$ref":"#/components/schemas/QueryState"},"results":{"type":"object"},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}}},"Period":{"type":"object","title":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now.","properties":{"by":{"type":"string","description":"By is used for legacty, and if exists it will override ByTo and ByFrom"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}}},"QueryState":{"type":"object","description":"QueryState represents the playbook query state","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}}},"InvPlaybookDebugInfo":{"type":"object","title":"InvPlaybookDebugInfo ...","properties":{"originalInvPBId":{"type":"string"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","description":"PlaybookOutput represents the playbook output","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}}},"OutputType":{"type":"string","title":"OutputType ..."},"InvestigationPlaybookData":{"type":"object","description":"InvestigationPlaybookData returns all data of an investigation playbook, not including history","properties":{"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"autoExtracting":{"type":"boolean"},"comment":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"name":{"type":"string"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"quiet":{"type":"boolean"},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"view":{"$ref":"#/components/schemas/PlaybookView"}}},"InvestigationPlaybookState":{"type":"string","description":"InvestigationPlaybookState indicates the state of the running playbook"},"InvestigationPlaybookTask":{"type":"object","description":"InvestigationPlaybookTask is the Task in the playbook context as a node","properties":{"Reopen":{"type":"boolean"},"arguments":{"type":"object","additionalProperties":{"type":"object"}},"assignee":{"type":"string"},"assigneeSet":{"type":"boolean"},"blockingTasks":{"type":"array","items":{"type":"string"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"comments":{"type":"boolean","description":"Whether this task had any comments or not"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"conditions":{"type":"array","description":"Conditions - optional list of conditions to run when task is conditional. we check conditions by their order (e.i. - considering the first one that satisfied)","items":{"$ref":"#/components/schemas/TaskCondition"}},"continueOnError":{"type":"boolean"},"continueOnErrorType":{"$ref":"#/components/schemas/ContinueOnErrorType"},"defaultAssignee":{"type":"string"},"defaultAssigneeComplex":{"$ref":"#/components/schemas/AdvanceArg"},"defaultReminder":{"type":"integer","format":"int64"},"doNotSaveTaskHistory":{"type":"boolean"},"dueDate":{"type":"string","format":"date-time"},"dueDateDuration":{"type":"integer","format":"int64"},"dueDateDurationUnit":{"$ref":"#/components/schemas/SLADurationUnit"},"dueDateSet":{"type":"boolean"},"entries":{"type":"array","items":{"type":"string"}},"evidenceData":{"$ref":"#/components/schemas/EvidenceData"},"executionCount":{"type":"integer","format":"int64"},"externalFormUseAuth":{"type":"boolean"},"fieldMapping":{"type":"array","items":{"$ref":"#/components/schemas/FieldMapping"}},"forEachIndex":{"type":"integer","description":"Parameters needed for loops","format":"int64"},"forEachInputs":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object"}}},"form":{"$ref":"#/components/schemas/DataCollectionForm"},"formDisplay":{"$ref":"#/components/schemas/FormDisplay"},"hasErrorEntries":{"type":"boolean"},"id":{"type":"string"},"ignoreWorker":{"type":"boolean","description":"Do not run this task in a worker"},"indent":{"type":"integer","format":"int64"},"input":{"type":"string"},"isAutoSwitchedToQuietMode":{"type":"boolean"},"isOverSize":{"type":"boolean"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"message":{"$ref":"#/components/schemas/NotifiableItem"},"missingContentItem":{"type":"string","description":"content item which caused task to skip"},"nextPollingTime":{"type":"string","description":"NextPollTime Time of the next scheduled command execution","format":"date-time"},"nextTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"note":{"type":"boolean"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"parentBlockCount":{"type":"integer","description":"the number of tasks that are waiting on blocked in subplaybooks of this task","format":"int64"},"parentPlaybookID":{"type":"string"},"patched":{"type":"boolean","description":"Indicates whether this task was patched to InvPB and did not originally belong to the playbook"},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"pollingEntries":{"type":"array","description":"PollingEntryIDs IDs of entries that are still polling","items":{"type":"string"}},"pollingTimeoutTime":{"type":"string","format":"date-time"},"previousTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"quietMode":{"$ref":"#/components/schemas/QuietMode"},"reminder":{"type":"integer","description":"Duration in minutes, this field is not persisted here","format":"int64"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"restrictedCompletion":{"type":"boolean"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"skip":{"type":"boolean","description":"Skip - if true then this task will be skipped and all the tasks which comes after this task and depend on it\nwill skip (WillNotExecute)"},"skipUnavailable":{"type":"boolean","description":"SkipUnavailable if true then will check if automation exists, integration of that command is installed and\nactive or sub playbook exists in Demisto"},"sla":{"$ref":"#/components/schemas/SLA"},"slaReminder":{"$ref":"#/components/schemas/SLA"},"startDate":{"type":"string","format":"date-time"},"startedExecutingHarmfulScript":{"type":"boolean"},"state":{"$ref":"#/components/schemas/TaskState"},"subPlaybook":{"$ref":"#/components/schemas/InvestigationPlaybook"},"task":{"$ref":"#/components/schemas/Task"},"taskCompleteData":{"type":"array","description":"History complete data","items":{"$ref":"#/components/schemas/InvPlaybookTaskCompleteData"}},"taskDebug":{"$ref":"#/components/schemas/InvTaskDebug"},"taskId":{"type":"string"},"taskSize":{"type":"integer","format":"int64"},"timerTriggers":{"type":"array","description":"SLA fields","items":{"$ref":"#/components/schemas/TimerTrigger"}},"timesPolled":{"type":"integer","format":"int64"},"type":{"$ref":"#/components/schemas/TaskType"},"view":{"$ref":"#/components/schemas/TaskView"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"ContinueOnErrorType":{"type":"string","title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path."},"SLADurationUnit":{"type":"integer","description":"SLADurationUnit is a helper to calculate if SLA in hours or minutes","format":"int64"},"EvidenceData":{"type":"object","description":"EvidenceData - all evidence properties to evaluate in task process","properties":{"customFields":{"type":"object","description":"This field must have empty json key","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}}},"FieldMapping":{"type":"object","description":"FieldMapping - Map a task output (complex or simple value) to an incident field","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}}},"DataCollectionForm":{"type":"object","title":"DataCollectionForm - a data collection form with questions.","properties":{"description":{"type":"string"},"expired":{"type":"boolean"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"sender":{"type":"string"},"title":{"type":"string"},"totalAnswers":{"type":"integer","format":"uint64"}}},"Question":{"type":"object","title":"Question - question for a form with a given type.","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"fieldAssociated":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"labelArg":{"$ref":"#/components/schemas/AdvanceArg"},"options":{"type":"array","items":{"type":"string"}},"optionsArg":{"type":"array","items":{"$ref":"#/components/schemas/AdvanceArg"}},"placeholder":{"type":"string"},"readOnly":{"type":"boolean"},"required":{"type":"boolean"},"tooltip":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"FormDisplay":{"type":"object","title":"FormDisplay - display options for communication/ask task (for both email and web forms).","properties":{"bodyBackgroundColor":{"type":"string"},"bodyFontColor":{"type":"string"},"headerBackgroundColor":{"type":"string"},"headerFontColor":{"type":"string"},"isExternalRtl":{"type":"boolean"},"sender":{"type":"string"},"submitButtonBackgroundColor":{"type":"string"},"submitButtonFontColor":{"type":"string"},"submitText":{"type":"string"}}},"TaskLoop":{"type":"object","description":"TaskLoop contains loop details","properties":{"brand":{"type":"string"},"builtinCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"exitCondition":{"type":"string"},"forEach":{"type":"boolean"},"isCommand":{"type":"boolean"},"max":{"type":"integer","format":"int64"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"scriptId":{"type":"string"},"scriptName":{"type":"string"},"wait":{"type":"integer","format":"int64"}}},"NotifiableItem":{"type":"object","title":"NotifiableItem ...","properties":{"bcc":{"$ref":"#/components/schemas/AdvanceArg"},"body":{"$ref":"#/components/schemas/AdvanceArg"},"cc":{"$ref":"#/components/schemas/AdvanceArg"},"defaultOption":{"type":"string"},"format":{"type":"string"},"methods":{"type":"array","items":{"type":"string"}},"replyOptions":{"type":"array","items":{"type":"string"}},"subject":{"$ref":"#/components/schemas/AdvanceArg"},"timings":{"$ref":"#/components/schemas/NotifyTimings"},"to":{"$ref":"#/components/schemas/AdvanceArg"}}},"NotifyTimings":{"type":"object","title":"NotifyTimings - time control on notify items - retries max count and intervals.","properties":{"completeAfterReplies":{"type":"integer","format":"uint64"},"completeAfterSLA":{"type":"boolean"},"completeAfterV2":{"type":"boolean"},"retriesCount":{"type":"integer","format":"uint64"},"retriesInterval":{"type":"integer","format":"uint64"}}},"QuietMode":{"type":"integer","description":"QuietMode quiet mode for playbook task","format":"int64"},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"},"SLA":{"type":"object","title":"SLA ...","properties":{"days":{"type":"integer","format":"int64"},"hours":{"type":"integer","format":"int64"},"minutes":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"}}},"TaskState":{"type":"string","description":"TaskState indicates the state of the task during the incident/investigation execution"},"Task":{"type":"object","description":"Task is the basic task in the task repository that can be associated to an incident via playbook","properties":{"brand":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"clonedFrom":{"type":"string"},"comment":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"created":{"type":"string","format":"date-time"},"description":{"type":"string"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isCommand":{"type":"boolean"},"isLocked":{"type":"boolean"},"isTitleTask":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"playbookId":{"type":"string"},"playbookName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"scriptId":{"type":"string"},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"},"version":{"type":"integer","format":"int64"}}},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"InvPlaybookTaskCompleteData":{"type":"object","title":"InvPlaybookTaskCompleteData ...","properties":{"arguments":{"type":"object","additionalProperties":{"type":"object"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"entries":{"type":"array","items":{"type":"string"}},"hasErrorEntries":{"type":"boolean"},"input":{"type":"string"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"startDate":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/TaskState"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"InvTaskDebug":{"type":"object","title":"InvTaskDebug ...","properties":{"breakpointCondition":{"$ref":"#/components/schemas/ArgFilter"},"inputOverrides":{"type":"object","additionalProperties":{"type":"string"}},"isMarkedWithBreakpoint":{"type":"boolean"},"isMarkedWithSkip":{"type":"boolean"},"outputOverrides":{"type":"object","additionalProperties":{"type":"object"}},"shouldOverrideDebugInfo":{"type":"boolean"},"skipConditionOverrideTo":{"type":"string"},"taskOriginalId":{"type":"string"}}},"TimerTrigger":{"type":"object","title":"TimerTrigger ...","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"type":"string","title":"TimerAction ..."},"TaskView":{"type":"object","description":"TaskView represents the view in client of the tasks graph"},"PlaybookView":{"type":"object","description":"PlaybookView represents the view in client of playbook graph"}}},"paths":{"/inv-playbook/task/uncomplete":{"post":{"summary":"Un complete a task","description":"Reopen a closed task and change the status to uncomplete","operationId":"taskUnComplete","requestBody":{"$ref":"#/components/requestBodies/invTaskInfo"},"responses":{"200":{"description":"InvestigationPlaybook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}},"tags":["Playbooks"]}}}}
```

## Import and override playbook

> Import and override playbook in Cortex XSOAR

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"requestBodies":{"importScript":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"file","type":"string"}}}}}}},"schemas":{"playbookWithWarnings":{"type":"object","properties":{"playbook":{"$ref":"#/components/schemas/Playbook"},"warnings":{"type":"array","items":{"type":"string"}}}},"Playbook":{"type":"object","description":"Playbook is a collection of tasks","properties":{"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"brands":{"type":"array","items":{"type":"string"}},"cacheVersn":{"type":"integer","format":"int64"},"commands":{"type":"array","items":{"type":"string"}},"comment":{"type":"string"},"commitMessage":{"type":"string"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"definitionId":{"type":"string"},"deprecated":{"type":"boolean"},"detached":{"type":"boolean"},"encTasks":{"type":"string"},"fromServerVersion":{"$ref":"#/components/schemas/Version"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"hidden":{"type":"boolean"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"itemVersion":{"$ref":"#/components/schemas/Version"},"locked":{"type":"boolean"},"missingScriptsIds":{"type":"array","items":{"type":"string"}},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"nameRaw":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"packID":{"type":"string"},"packName":{"type":"string"},"packPropagationLabels":{"type":"array","items":{"type":"string"}},"prevName":{"type":"string"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"private":{"type":"boolean"},"propagationLabels":{"type":"array","items":{"type":"string"}},"quiet":{"type":"boolean"},"remote":{"type":"boolean"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"scriptIds":{"type":"array","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"shouldCommit":{"type":"boolean"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"sourcePlaybookID":{"type":"string"},"startTaskId":{"type":"string"},"syncHash":{"type":"string"},"system":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"taskIds":{"type":"array","description":"auto generated field that will contain all task ids in this playbook\nNeeded for searching with bleve","items":{"type":"string"}},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookTask"}},"toServerVersion":{"$ref":"#/components/schemas/Version"},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"version":{"type":"integer","format":"int64"},"view":{"$ref":"#/components/schemas/PlaybookView"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"Version":{"type":"object","title":"Version represents a version.","properties":{"Digits":{"type":"array","description":"WARNING: when adding new attributes or changing the names\nof the existing ones, remember to add support in UnmarshalJSON\nfor items that were exported by msgpack.","items":{"type":"integer","format":"int64"}},"Label":{"type":"string"}}},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","description":"PlaybookInput represents the playbook input","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"PlaybookInputQuery":{"type":"object","description":"PlaybookInputQuery represents the playbook query input","properties":{"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string"},"queryEntity":{"type":"string"},"queryState":{"$ref":"#/components/schemas/QueryState"},"results":{"type":"object"},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}}},"Period":{"type":"object","title":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now.","properties":{"by":{"type":"string","description":"By is used for legacty, and if exists it will override ByTo and ByFrom"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}}},"QueryState":{"type":"object","description":"QueryState represents the playbook query state","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}}},"AdvanceArg":{"type":"object","title":"AdvanceArg - advance argument can be one of the following:","description":"Simple: plain text such as \"hello\" (constant) or ${File.ID} (DT expression)\nComplex: struct with all info that is necessary to compute argument value from context (Root, Filters, Accessor & Transformers)]\nKeyValue: list of key-value","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}}},"ComplexArg":{"type":"object","description":"ComplexArg - all info that is necessary to compute argument value from context\nRoot - the root slice (or object) from to work against\nFilters - a slice of filters to apply to the root object, one after another (e.i. with AND condition between each one)\nAccessor - the key to access to each result after filter\nTransformers - a slice to transformers to apply on the result of the accessed key from each result\ne.g. if user want to take from context all File.DisplayName where File.Extension is 'EXE', and the result in uppercase than:\nRoot: is \"File\"\nFilters: will hold the \"File.DisplayName where File.Extension is 'EXE'\" query\nAccessor: is \"DisplayName\"\nTransformers: will hold the uppercase transformation","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}}},"ArgFilter":{"type":"array","description":"ArgFilter - represent a slice of atomic filters with OR condition between them (e.i. - atomic1 OR atomic2 OR ...)","items":{"$ref":"#/components/schemas/ArgAtomicFilter"}},"ArgAtomicFilter":{"type":"object","description":"ArgAtomicFilter - operator with two sides that return true/false","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}}},"OperatorArgument":{"type":"object","title":"OperatorArgument ...","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"type":"string","title":"FilterOperatorID ..."},"ArgTransformer":{"type":"object","title":"ArgTransformer ...","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"type":"string","title":"TransformerOperatorID ..."},"KeyValueArg":{"type":"object","title":"KeyValueArg ...","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","description":"PlaybookOutput represents the playbook output","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}}},"OutputType":{"type":"string","title":"OutputType ..."},"PlaybookTask":{"type":"object","title":"PlaybookTask ...","properties":{"conditions":{"type":"array","description":"Conditions - optional list of conditions to run when task is conditional. we check conditions by their order (e.i. - considering the first one that satisfied)","items":{"$ref":"#/components/schemas/TaskCondition"}},"continueOnError":{"type":"boolean"},"continueOnErrorType":{"$ref":"#/components/schemas/ContinueOnErrorType"},"defaultAssignee":{"type":"string"},"defaultAssigneeComplex":{"$ref":"#/components/schemas/AdvanceArg"},"defaultReminder":{"type":"integer","format":"int64"},"evidenceData":{"$ref":"#/components/schemas/EvidenceData"},"externalFormUseAuth":{"type":"boolean"},"fieldMapping":{"type":"array","items":{"$ref":"#/components/schemas/FieldMapping"}},"form":{"$ref":"#/components/schemas/DataCollectionForm"},"formDisplay":{"$ref":"#/components/schemas/FormDisplay"},"id":{"type":"string"},"ignoreWorker":{"type":"boolean","description":"Do not run this task in a worker"},"isAutoSwitchedToQuietMode":{"type":"boolean"},"isOverSize":{"type":"boolean"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"message":{"$ref":"#/components/schemas/NotifiableItem"},"nextTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"note":{"type":"boolean"},"quietMode":{"$ref":"#/components/schemas/QuietMode"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"restrictedCompletion":{"type":"boolean"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"skipUnavailable":{"type":"boolean","description":"SkipUnavailable if true then will check if automation exists, integration of that command is installed and\nactive or sub playbook exists in Demisto"},"sla":{"$ref":"#/components/schemas/SLA"},"slaReminder":{"$ref":"#/components/schemas/SLA"},"task":{"$ref":"#/components/schemas/Task"},"taskId":{"type":"string"},"timerTriggers":{"type":"array","description":"SLA fields","items":{"$ref":"#/components/schemas/TimerTrigger"}},"type":{"$ref":"#/components/schemas/TaskType"},"view":{"$ref":"#/components/schemas/TaskView"}}},"TaskCondition":{"type":"object","description":"TaskCondition - contains a condition and a corresponding label\nif the condition satisfied - its label is taken as the next task(s) input (e.i. the label on the edge)","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}}},"ContinueOnErrorType":{"type":"string","title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path."},"EvidenceData":{"type":"object","description":"EvidenceData - all evidence properties to evaluate in task process","properties":{"customFields":{"type":"object","description":"This field must have empty json key","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}}},"FieldMapping":{"type":"object","description":"FieldMapping - Map a task output (complex or simple value) to an incident field","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}}},"DataCollectionForm":{"type":"object","title":"DataCollectionForm - a data collection form with questions.","properties":{"description":{"type":"string"},"expired":{"type":"boolean"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"sender":{"type":"string"},"title":{"type":"string"},"totalAnswers":{"type":"integer","format":"uint64"}}},"Question":{"type":"object","title":"Question - question for a form with a given type.","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"fieldAssociated":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"labelArg":{"$ref":"#/components/schemas/AdvanceArg"},"options":{"type":"array","items":{"type":"string"}},"optionsArg":{"type":"array","items":{"$ref":"#/components/schemas/AdvanceArg"}},"placeholder":{"type":"string"},"readOnly":{"type":"boolean"},"required":{"type":"boolean"},"tooltip":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"FormDisplay":{"type":"object","title":"FormDisplay - display options for communication/ask task (for both email and web forms).","properties":{"bodyBackgroundColor":{"type":"string"},"bodyFontColor":{"type":"string"},"headerBackgroundColor":{"type":"string"},"headerFontColor":{"type":"string"},"isExternalRtl":{"type":"boolean"},"sender":{"type":"string"},"submitButtonBackgroundColor":{"type":"string"},"submitButtonFontColor":{"type":"string"},"submitText":{"type":"string"}}},"TaskLoop":{"type":"object","description":"TaskLoop contains loop details","properties":{"brand":{"type":"string"},"builtinCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"exitCondition":{"type":"string"},"forEach":{"type":"boolean"},"isCommand":{"type":"boolean"},"max":{"type":"integer","format":"int64"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"scriptId":{"type":"string"},"scriptName":{"type":"string"},"wait":{"type":"integer","format":"int64"}}},"NotifiableItem":{"type":"object","title":"NotifiableItem ...","properties":{"bcc":{"$ref":"#/components/schemas/AdvanceArg"},"body":{"$ref":"#/components/schemas/AdvanceArg"},"cc":{"$ref":"#/components/schemas/AdvanceArg"},"defaultOption":{"type":"string"},"format":{"type":"string"},"methods":{"type":"array","items":{"type":"string"}},"replyOptions":{"type":"array","items":{"type":"string"}},"subject":{"$ref":"#/components/schemas/AdvanceArg"},"timings":{"$ref":"#/components/schemas/NotifyTimings"},"to":{"$ref":"#/components/schemas/AdvanceArg"}}},"NotifyTimings":{"type":"object","title":"NotifyTimings - time control on notify items - retries max count and intervals.","properties":{"completeAfterReplies":{"type":"integer","format":"uint64"},"completeAfterSLA":{"type":"boolean"},"completeAfterV2":{"type":"boolean"},"retriesCount":{"type":"integer","format":"uint64"},"retriesInterval":{"type":"integer","format":"uint64"}}},"QuietMode":{"type":"integer","description":"QuietMode quiet mode for playbook task","format":"int64"},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"},"SLA":{"type":"object","title":"SLA ...","properties":{"days":{"type":"integer","format":"int64"},"hours":{"type":"integer","format":"int64"},"minutes":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"}}},"Task":{"type":"object","description":"Task is the basic task in the task repository that can be associated to an incident via playbook","properties":{"brand":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"clonedFrom":{"type":"string"},"comment":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"created":{"type":"string","format":"date-time"},"description":{"type":"string"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isCommand":{"type":"boolean"},"isLocked":{"type":"boolean"},"isTitleTask":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"playbookId":{"type":"string"},"playbookName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"scriptId":{"type":"string"},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"},"version":{"type":"integer","format":"int64"}}},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"TimerTrigger":{"type":"object","title":"TimerTrigger ...","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"type":"string","title":"TimerAction ..."},"TaskView":{"type":"object","description":"TaskView represents the view in client of the tasks graph"},"PlaybookView":{"type":"object","description":"PlaybookView represents the view in client of playbook graph"}}},"paths":{"/playbook/save/yaml":{"post":{"summary":"Import and override playbook","description":"Import and override playbook in Cortex XSOAR","operationId":"overridePlaybookYaml","requestBody":{"$ref":"#/components/requestBodies/importScript"},"responses":{"200":{"description":"The saved playbook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/playbookWithWarnings"}}}}},"tags":["Playbooks"]}}}}
```

## Complete a task

> Complete a task with command and multiple file attachments

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"InvestigationPlaybook":{"type":"object","description":"InvestigationPlaybook is a wrapper for a linked list of Playbook tasks","properties":{"Dirty":{"type":"boolean"},"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"ReplacedPlaybook":{"type":"boolean","description":"Indicate whether this playbook has new history during this session"},"ShardID":{"type":"integer","format":"int64"},"UpdatedOperatorIDs":{"type":"boolean"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"autoExtracting":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"comment":{"type":"string"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentCreateDate":{"type":"string","description":"Incident create date","format":"date-time"},"indexName":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"invPBDebugInfo":{"$ref":"#/components/schemas/InvPlaybookDebugInfo"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pbHistory":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/InvestigationPlaybookData"}},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"quiet":{"type":"boolean"},"recoveryAttempts":{"type":"integer","format":"int64"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"serverId":{"type":"string","description":"Holds the ID of the responsible cluster app server"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"syncHash":{"type":"string"},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"version":{"type":"integer","format":"int64"},"view":{"$ref":"#/components/schemas/PlaybookView"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","description":"PlaybookInput represents the playbook input","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"PlaybookInputQuery":{"type":"object","description":"PlaybookInputQuery represents the playbook query input","properties":{"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string"},"queryEntity":{"type":"string"},"queryState":{"$ref":"#/components/schemas/QueryState"},"results":{"type":"object"},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}}},"Period":{"type":"object","title":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now.","properties":{"by":{"type":"string","description":"By is used for legacty, and if exists it will override ByTo and ByFrom"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}}},"QueryState":{"type":"object","description":"QueryState represents the playbook query state","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}}},"AdvanceArg":{"type":"object","title":"AdvanceArg - advance argument can be one of the following:","description":"Simple: plain text such as \"hello\" (constant) or ${File.ID} (DT expression)\nComplex: struct with all info that is necessary to compute argument value from context (Root, Filters, Accessor & Transformers)]\nKeyValue: list of key-value","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}}},"ComplexArg":{"type":"object","description":"ComplexArg - all info that is necessary to compute argument value from context\nRoot - the root slice (or object) from to work against\nFilters - a slice of filters to apply to the root object, one after another (e.i. with AND condition between each one)\nAccessor - the key to access to each result after filter\nTransformers - a slice to transformers to apply on the result of the accessed key from each result\ne.g. if user want to take from context all File.DisplayName where File.Extension is 'EXE', and the result in uppercase than:\nRoot: is \"File\"\nFilters: will hold the \"File.DisplayName where File.Extension is 'EXE'\" query\nAccessor: is \"DisplayName\"\nTransformers: will hold the uppercase transformation","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}}},"ArgFilter":{"type":"array","description":"ArgFilter - represent a slice of atomic filters with OR condition between them (e.i. - atomic1 OR atomic2 OR ...)","items":{"$ref":"#/components/schemas/ArgAtomicFilter"}},"ArgAtomicFilter":{"type":"object","description":"ArgAtomicFilter - operator with two sides that return true/false","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}}},"OperatorArgument":{"type":"object","title":"OperatorArgument ...","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"type":"string","title":"FilterOperatorID ..."},"ArgTransformer":{"type":"object","title":"ArgTransformer ...","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"type":"string","title":"TransformerOperatorID ..."},"KeyValueArg":{"type":"object","title":"KeyValueArg ...","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"InvPlaybookDebugInfo":{"type":"object","title":"InvPlaybookDebugInfo ...","properties":{"originalInvPBId":{"type":"string"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","description":"PlaybookOutput represents the playbook output","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}}},"OutputType":{"type":"string","title":"OutputType ..."},"InvestigationPlaybookData":{"type":"object","description":"InvestigationPlaybookData returns all data of an investigation playbook, not including history","properties":{"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"autoExtracting":{"type":"boolean"},"comment":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"name":{"type":"string"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"quiet":{"type":"boolean"},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"view":{"$ref":"#/components/schemas/PlaybookView"}}},"InvestigationPlaybookState":{"type":"string","description":"InvestigationPlaybookState indicates the state of the running playbook"},"InvestigationPlaybookTask":{"type":"object","description":"InvestigationPlaybookTask is the Task in the playbook context as a node","properties":{"Reopen":{"type":"boolean"},"arguments":{"type":"object","additionalProperties":{"type":"object"}},"assignee":{"type":"string"},"assigneeSet":{"type":"boolean"},"blockingTasks":{"type":"array","items":{"type":"string"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"comments":{"type":"boolean","description":"Whether this task had any comments or not"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"conditions":{"type":"array","description":"Conditions - optional list of conditions to run when task is conditional. we check conditions by their order (e.i. - considering the first one that satisfied)","items":{"$ref":"#/components/schemas/TaskCondition"}},"continueOnError":{"type":"boolean"},"continueOnErrorType":{"$ref":"#/components/schemas/ContinueOnErrorType"},"defaultAssignee":{"type":"string"},"defaultAssigneeComplex":{"$ref":"#/components/schemas/AdvanceArg"},"defaultReminder":{"type":"integer","format":"int64"},"doNotSaveTaskHistory":{"type":"boolean"},"dueDate":{"type":"string","format":"date-time"},"dueDateDuration":{"type":"integer","format":"int64"},"dueDateDurationUnit":{"$ref":"#/components/schemas/SLADurationUnit"},"dueDateSet":{"type":"boolean"},"entries":{"type":"array","items":{"type":"string"}},"evidenceData":{"$ref":"#/components/schemas/EvidenceData"},"executionCount":{"type":"integer","format":"int64"},"externalFormUseAuth":{"type":"boolean"},"fieldMapping":{"type":"array","items":{"$ref":"#/components/schemas/FieldMapping"}},"forEachIndex":{"type":"integer","description":"Parameters needed for loops","format":"int64"},"forEachInputs":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object"}}},"form":{"$ref":"#/components/schemas/DataCollectionForm"},"formDisplay":{"$ref":"#/components/schemas/FormDisplay"},"hasErrorEntries":{"type":"boolean"},"id":{"type":"string"},"ignoreWorker":{"type":"boolean","description":"Do not run this task in a worker"},"indent":{"type":"integer","format":"int64"},"input":{"type":"string"},"isAutoSwitchedToQuietMode":{"type":"boolean"},"isOverSize":{"type":"boolean"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"message":{"$ref":"#/components/schemas/NotifiableItem"},"missingContentItem":{"type":"string","description":"content item which caused task to skip"},"nextPollingTime":{"type":"string","description":"NextPollTime Time of the next scheduled command execution","format":"date-time"},"nextTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"note":{"type":"boolean"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"parentBlockCount":{"type":"integer","description":"the number of tasks that are waiting on blocked in subplaybooks of this task","format":"int64"},"parentPlaybookID":{"type":"string"},"patched":{"type":"boolean","description":"Indicates whether this task was patched to InvPB and did not originally belong to the playbook"},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"pollingEntries":{"type":"array","description":"PollingEntryIDs IDs of entries that are still polling","items":{"type":"string"}},"pollingTimeoutTime":{"type":"string","format":"date-time"},"previousTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"quietMode":{"$ref":"#/components/schemas/QuietMode"},"reminder":{"type":"integer","description":"Duration in minutes, this field is not persisted here","format":"int64"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"restrictedCompletion":{"type":"boolean"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"skip":{"type":"boolean","description":"Skip - if true then this task will be skipped and all the tasks which comes after this task and depend on it\nwill skip (WillNotExecute)"},"skipUnavailable":{"type":"boolean","description":"SkipUnavailable if true then will check if automation exists, integration of that command is installed and\nactive or sub playbook exists in Demisto"},"sla":{"$ref":"#/components/schemas/SLA"},"slaReminder":{"$ref":"#/components/schemas/SLA"},"startDate":{"type":"string","format":"date-time"},"startedExecutingHarmfulScript":{"type":"boolean"},"state":{"$ref":"#/components/schemas/TaskState"},"subPlaybook":{"$ref":"#/components/schemas/InvestigationPlaybook"},"task":{"$ref":"#/components/schemas/Task"},"taskCompleteData":{"type":"array","description":"History complete data","items":{"$ref":"#/components/schemas/InvPlaybookTaskCompleteData"}},"taskDebug":{"$ref":"#/components/schemas/InvTaskDebug"},"taskId":{"type":"string"},"taskSize":{"type":"integer","format":"int64"},"timerTriggers":{"type":"array","description":"SLA fields","items":{"$ref":"#/components/schemas/TimerTrigger"}},"timesPolled":{"type":"integer","format":"int64"},"type":{"$ref":"#/components/schemas/TaskType"},"view":{"$ref":"#/components/schemas/TaskView"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"TaskCondition":{"type":"object","description":"TaskCondition - contains a condition and a corresponding label\nif the condition satisfied - its label is taken as the next task(s) input (e.i. the label on the edge)","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}}},"ContinueOnErrorType":{"type":"string","title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path."},"SLADurationUnit":{"type":"integer","description":"SLADurationUnit is a helper to calculate if SLA in hours or minutes","format":"int64"},"EvidenceData":{"type":"object","description":"EvidenceData - all evidence properties to evaluate in task process","properties":{"customFields":{"type":"object","description":"This field must have empty json key","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}}},"FieldMapping":{"type":"object","description":"FieldMapping - Map a task output (complex or simple value) to an incident field","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}}},"DataCollectionForm":{"type":"object","title":"DataCollectionForm - a data collection form with questions.","properties":{"description":{"type":"string"},"expired":{"type":"boolean"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"sender":{"type":"string"},"title":{"type":"string"},"totalAnswers":{"type":"integer","format":"uint64"}}},"Question":{"type":"object","title":"Question - question for a form with a given type.","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"fieldAssociated":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"labelArg":{"$ref":"#/components/schemas/AdvanceArg"},"options":{"type":"array","items":{"type":"string"}},"optionsArg":{"type":"array","items":{"$ref":"#/components/schemas/AdvanceArg"}},"placeholder":{"type":"string"},"readOnly":{"type":"boolean"},"required":{"type":"boolean"},"tooltip":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"FormDisplay":{"type":"object","title":"FormDisplay - display options for communication/ask task (for both email and web forms).","properties":{"bodyBackgroundColor":{"type":"string"},"bodyFontColor":{"type":"string"},"headerBackgroundColor":{"type":"string"},"headerFontColor":{"type":"string"},"isExternalRtl":{"type":"boolean"},"sender":{"type":"string"},"submitButtonBackgroundColor":{"type":"string"},"submitButtonFontColor":{"type":"string"},"submitText":{"type":"string"}}},"TaskLoop":{"type":"object","description":"TaskLoop contains loop details","properties":{"brand":{"type":"string"},"builtinCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"exitCondition":{"type":"string"},"forEach":{"type":"boolean"},"isCommand":{"type":"boolean"},"max":{"type":"integer","format":"int64"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"scriptId":{"type":"string"},"scriptName":{"type":"string"},"wait":{"type":"integer","format":"int64"}}},"NotifiableItem":{"type":"object","title":"NotifiableItem ...","properties":{"bcc":{"$ref":"#/components/schemas/AdvanceArg"},"body":{"$ref":"#/components/schemas/AdvanceArg"},"cc":{"$ref":"#/components/schemas/AdvanceArg"},"defaultOption":{"type":"string"},"format":{"type":"string"},"methods":{"type":"array","items":{"type":"string"}},"replyOptions":{"type":"array","items":{"type":"string"}},"subject":{"$ref":"#/components/schemas/AdvanceArg"},"timings":{"$ref":"#/components/schemas/NotifyTimings"},"to":{"$ref":"#/components/schemas/AdvanceArg"}}},"NotifyTimings":{"type":"object","title":"NotifyTimings - time control on notify items - retries max count and intervals.","properties":{"completeAfterReplies":{"type":"integer","format":"uint64"},"completeAfterSLA":{"type":"boolean"},"completeAfterV2":{"type":"boolean"},"retriesCount":{"type":"integer","format":"uint64"},"retriesInterval":{"type":"integer","format":"uint64"}}},"QuietMode":{"type":"integer","description":"QuietMode quiet mode for playbook task","format":"int64"},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"},"SLA":{"type":"object","title":"SLA ...","properties":{"days":{"type":"integer","format":"int64"},"hours":{"type":"integer","format":"int64"},"minutes":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"}}},"TaskState":{"type":"string","description":"TaskState indicates the state of the task during the incident/investigation execution"},"Task":{"type":"object","description":"Task is the basic task in the task repository that can be associated to an incident via playbook","properties":{"brand":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"clonedFrom":{"type":"string"},"comment":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"created":{"type":"string","format":"date-time"},"description":{"type":"string"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isCommand":{"type":"boolean"},"isLocked":{"type":"boolean"},"isTitleTask":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"playbookId":{"type":"string"},"playbookName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"scriptId":{"type":"string"},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"},"version":{"type":"integer","format":"int64"}}},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"InvPlaybookTaskCompleteData":{"type":"object","title":"InvPlaybookTaskCompleteData ...","properties":{"arguments":{"type":"object","additionalProperties":{"type":"object"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"entries":{"type":"array","items":{"type":"string"}},"hasErrorEntries":{"type":"boolean"},"input":{"type":"string"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"startDate":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/TaskState"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"InvTaskDebug":{"type":"object","title":"InvTaskDebug ...","properties":{"breakpointCondition":{"$ref":"#/components/schemas/ArgFilter"},"inputOverrides":{"type":"object","additionalProperties":{"type":"string"}},"isMarkedWithBreakpoint":{"type":"boolean"},"isMarkedWithSkip":{"type":"boolean"},"outputOverrides":{"type":"object","additionalProperties":{"type":"object"}},"shouldOverrideDebugInfo":{"type":"boolean"},"skipConditionOverrideTo":{"type":"string"},"taskOriginalId":{"type":"string"}}},"TimerTrigger":{"type":"object","title":"TimerTrigger ...","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"type":"string","title":"TimerAction ..."},"TaskView":{"type":"object","description":"TaskView represents the view in client of the tasks graph"},"PlaybookView":{"type":"object","description":"PlaybookView represents the view in client of playbook graph"}}},"paths":{"/v2/inv-playbook/task/complete":{"post":{"summary":"Complete a task","description":"Complete a task with command and multiple file attachments","operationId":"completeTaskV2","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"investigationId":{"description":"investigation ID","type":"string"},"taskId":{"description":"Task Id","type":"string"},"taskComment":{"description":"Task comment or command to run","type":"string"},"taskInput":{"description":"Task input","type":"string"},"version":{"description":"Version","type":"string"},"file":{"description":"Files to attach to the task","type":"string"},"fileNames":{"description":"file names separated by %###% (only if files provided)","type":"string"},"fileComments":{"description":"file comment separated by %###% (only if files provided)","type":"string"}}}}}},"responses":{"200":{"description":"InvestigationPlaybook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}},"tags":["Playbooks"]}}}}
```

## Complete a task

> Submit a data collection task with given answers and multiple file attachments

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"InvestigationPlaybook":{"type":"object","description":"InvestigationPlaybook is a wrapper for a linked list of Playbook tasks","properties":{"Dirty":{"type":"boolean"},"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"ReplacedPlaybook":{"type":"boolean","description":"Indicate whether this playbook has new history during this session"},"ShardID":{"type":"integer","format":"int64"},"UpdatedOperatorIDs":{"type":"boolean"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"autoExtracting":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"comment":{"type":"string"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentCreateDate":{"type":"string","description":"Incident create date","format":"date-time"},"indexName":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"invPBDebugInfo":{"$ref":"#/components/schemas/InvPlaybookDebugInfo"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pbHistory":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/InvestigationPlaybookData"}},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"quiet":{"type":"boolean"},"recoveryAttempts":{"type":"integer","format":"int64"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"serverId":{"type":"string","description":"Holds the ID of the responsible cluster app server"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"syncHash":{"type":"string"},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"version":{"type":"integer","format":"int64"},"view":{"$ref":"#/components/schemas/PlaybookView"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","description":"PlaybookInput represents the playbook input","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"PlaybookInputQuery":{"type":"object","description":"PlaybookInputQuery represents the playbook query input","properties":{"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string"},"queryEntity":{"type":"string"},"queryState":{"$ref":"#/components/schemas/QueryState"},"results":{"type":"object"},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}}},"Period":{"type":"object","title":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now.","properties":{"by":{"type":"string","description":"By is used for legacty, and if exists it will override ByTo and ByFrom"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}}},"QueryState":{"type":"object","description":"QueryState represents the playbook query state","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}}},"AdvanceArg":{"type":"object","title":"AdvanceArg - advance argument can be one of the following:","description":"Simple: plain text such as \"hello\" (constant) or ${File.ID} (DT expression)\nComplex: struct with all info that is necessary to compute argument value from context (Root, Filters, Accessor & Transformers)]\nKeyValue: list of key-value","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}}},"ComplexArg":{"type":"object","description":"ComplexArg - all info that is necessary to compute argument value from context\nRoot - the root slice (or object) from to work against\nFilters - a slice of filters to apply to the root object, one after another (e.i. with AND condition between each one)\nAccessor - the key to access to each result after filter\nTransformers - a slice to transformers to apply on the result of the accessed key from each result\ne.g. if user want to take from context all File.DisplayName where File.Extension is 'EXE', and the result in uppercase than:\nRoot: is \"File\"\nFilters: will hold the \"File.DisplayName where File.Extension is 'EXE'\" query\nAccessor: is \"DisplayName\"\nTransformers: will hold the uppercase transformation","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}}},"ArgFilter":{"type":"array","description":"ArgFilter - represent a slice of atomic filters with OR condition between them (e.i. - atomic1 OR atomic2 OR ...)","items":{"$ref":"#/components/schemas/ArgAtomicFilter"}},"ArgAtomicFilter":{"type":"object","description":"ArgAtomicFilter - operator with two sides that return true/false","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}}},"OperatorArgument":{"type":"object","title":"OperatorArgument ...","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"type":"string","title":"FilterOperatorID ..."},"ArgTransformer":{"type":"object","title":"ArgTransformer ...","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"type":"string","title":"TransformerOperatorID ..."},"KeyValueArg":{"type":"object","title":"KeyValueArg ...","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"InvPlaybookDebugInfo":{"type":"object","title":"InvPlaybookDebugInfo ...","properties":{"originalInvPBId":{"type":"string"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","description":"PlaybookOutput represents the playbook output","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}}},"OutputType":{"type":"string","title":"OutputType ..."},"InvestigationPlaybookData":{"type":"object","description":"InvestigationPlaybookData returns all data of an investigation playbook, not including history","properties":{"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object"}}},"autoExtracting":{"type":"boolean"},"comment":{"type":"string"},"inputs":{"$ref":"#/components/schemas/PlaybookInputs"},"investigationId":{"type":"string"},"isTIM":{"type":"boolean"},"name":{"type":"string"},"outputs":{"$ref":"#/components/schemas/PlaybookOutputs"},"pendingTasks":{"type":"object","description":"Tasks that are marked for running, but cannot yet run due to incomplete parents","additionalProperties":{"type":"object"}},"playbookId":{"type":"string"},"quiet":{"type":"boolean"},"startDate":{"type":"string","format":"date-time"},"startTaskId":{"type":"string","description":"FirstTask is the root task of the playbook"},"state":{"$ref":"#/components/schemas/InvestigationPlaybookState"},"subPlaybookInputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookInputs"}},"subPlaybookOutputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaybookOutputs"}},"tasks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvestigationPlaybookTask"}},"view":{"$ref":"#/components/schemas/PlaybookView"}}},"InvestigationPlaybookState":{"type":"string","description":"InvestigationPlaybookState indicates the state of the running playbook"},"InvestigationPlaybookTask":{"type":"object","description":"InvestigationPlaybookTask is the Task in the playbook context as a node","properties":{"Reopen":{"type":"boolean"},"arguments":{"type":"object","additionalProperties":{"type":"object"}},"assignee":{"type":"string"},"assigneeSet":{"type":"boolean"},"blockingTasks":{"type":"array","items":{"type":"string"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"comments":{"type":"boolean","description":"Whether this task had any comments or not"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"conditions":{"type":"array","description":"Conditions - optional list of conditions to run when task is conditional. we check conditions by their order (e.i. - considering the first one that satisfied)","items":{"$ref":"#/components/schemas/TaskCondition"}},"continueOnError":{"type":"boolean"},"continueOnErrorType":{"$ref":"#/components/schemas/ContinueOnErrorType"},"defaultAssignee":{"type":"string"},"defaultAssigneeComplex":{"$ref":"#/components/schemas/AdvanceArg"},"defaultReminder":{"type":"integer","format":"int64"},"doNotSaveTaskHistory":{"type":"boolean"},"dueDate":{"type":"string","format":"date-time"},"dueDateDuration":{"type":"integer","format":"int64"},"dueDateDurationUnit":{"$ref":"#/components/schemas/SLADurationUnit"},"dueDateSet":{"type":"boolean"},"entries":{"type":"array","items":{"type":"string"}},"evidenceData":{"$ref":"#/components/schemas/EvidenceData"},"executionCount":{"type":"integer","format":"int64"},"externalFormUseAuth":{"type":"boolean"},"fieldMapping":{"type":"array","items":{"$ref":"#/components/schemas/FieldMapping"}},"forEachIndex":{"type":"integer","description":"Parameters needed for loops","format":"int64"},"forEachInputs":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object"}}},"form":{"$ref":"#/components/schemas/DataCollectionForm"},"formDisplay":{"$ref":"#/components/schemas/FormDisplay"},"hasErrorEntries":{"type":"boolean"},"id":{"type":"string"},"ignoreWorker":{"type":"boolean","description":"Do not run this task in a worker"},"indent":{"type":"integer","format":"int64"},"input":{"type":"string"},"isAutoSwitchedToQuietMode":{"type":"boolean"},"isOverSize":{"type":"boolean"},"loop":{"$ref":"#/components/schemas/TaskLoop"},"message":{"$ref":"#/components/schemas/NotifiableItem"},"missingContentItem":{"type":"string","description":"content item which caused task to skip"},"nextPollingTime":{"type":"string","description":"NextPollTime Time of the next scheduled command execution","format":"date-time"},"nextTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"note":{"type":"boolean"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"parentBlockCount":{"type":"integer","description":"the number of tasks that are waiting on blocked in subplaybooks of this task","format":"int64"},"parentPlaybookID":{"type":"string"},"patched":{"type":"boolean","description":"Indicates whether this task was patched to InvPB and did not originally belong to the playbook"},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"pollingEntries":{"type":"array","description":"PollingEntryIDs IDs of entries that are still polling","items":{"type":"string"}},"pollingTimeoutTime":{"type":"string","format":"date-time"},"previousTasks":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"quietMode":{"$ref":"#/components/schemas/QuietMode"},"reminder":{"type":"integer","description":"Duration in minutes, this field is not persisted here","format":"int64"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"restrictedCompletion":{"type":"boolean"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"separateContext":{"type":"boolean"},"skip":{"type":"boolean","description":"Skip - if true then this task will be skipped and all the tasks which comes after this task and depend on it\nwill skip (WillNotExecute)"},"skipUnavailable":{"type":"boolean","description":"SkipUnavailable if true then will check if automation exists, integration of that command is installed and\nactive or sub playbook exists in Demisto"},"sla":{"$ref":"#/components/schemas/SLA"},"slaReminder":{"$ref":"#/components/schemas/SLA"},"startDate":{"type":"string","format":"date-time"},"startedExecutingHarmfulScript":{"type":"boolean"},"state":{"$ref":"#/components/schemas/TaskState"},"subPlaybook":{"$ref":"#/components/schemas/InvestigationPlaybook"},"task":{"$ref":"#/components/schemas/Task"},"taskCompleteData":{"type":"array","description":"History complete data","items":{"$ref":"#/components/schemas/InvPlaybookTaskCompleteData"}},"taskDebug":{"$ref":"#/components/schemas/InvTaskDebug"},"taskId":{"type":"string"},"taskSize":{"type":"integer","format":"int64"},"timerTriggers":{"type":"array","description":"SLA fields","items":{"$ref":"#/components/schemas/TimerTrigger"}},"timesPolled":{"type":"integer","format":"int64"},"type":{"$ref":"#/components/schemas/TaskType"},"view":{"$ref":"#/components/schemas/TaskView"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"TaskCondition":{"type":"object","description":"TaskCondition - contains a condition and a corresponding label\nif the condition satisfied - its label is taken as the next task(s) input (e.i. the label on the edge)","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}}},"ContinueOnErrorType":{"type":"string","title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path."},"SLADurationUnit":{"type":"integer","description":"SLADurationUnit is a helper to calculate if SLA in hours or minutes","format":"int64"},"EvidenceData":{"type":"object","description":"EvidenceData - all evidence properties to evaluate in task process","properties":{"customFields":{"type":"object","description":"This field must have empty json key","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}}},"FieldMapping":{"type":"object","description":"FieldMapping - Map a task output (complex or simple value) to an incident field","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}}},"DataCollectionForm":{"type":"object","title":"DataCollectionForm - a data collection form with questions.","properties":{"description":{"type":"string"},"expired":{"type":"boolean"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"sender":{"type":"string"},"title":{"type":"string"},"totalAnswers":{"type":"integer","format":"uint64"}}},"Question":{"type":"object","title":"Question - question for a form with a given type.","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"fieldAssociated":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"},"labelArg":{"$ref":"#/components/schemas/AdvanceArg"},"options":{"type":"array","items":{"type":"string"}},"optionsArg":{"type":"array","items":{"$ref":"#/components/schemas/AdvanceArg"}},"placeholder":{"type":"string"},"readOnly":{"type":"boolean"},"required":{"type":"boolean"},"tooltip":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"FormDisplay":{"type":"object","title":"FormDisplay - display options for communication/ask task (for both email and web forms).","properties":{"bodyBackgroundColor":{"type":"string"},"bodyFontColor":{"type":"string"},"headerBackgroundColor":{"type":"string"},"headerFontColor":{"type":"string"},"isExternalRtl":{"type":"boolean"},"sender":{"type":"string"},"submitButtonBackgroundColor":{"type":"string"},"submitButtonFontColor":{"type":"string"},"submitText":{"type":"string"}}},"TaskLoop":{"type":"object","description":"TaskLoop contains loop details","properties":{"brand":{"type":"string"},"builtinCondition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"exitCondition":{"type":"string"},"forEach":{"type":"boolean"},"isCommand":{"type":"boolean"},"max":{"type":"integer","format":"int64"},"scriptArguments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"scriptId":{"type":"string"},"scriptName":{"type":"string"},"wait":{"type":"integer","format":"int64"}}},"NotifiableItem":{"type":"object","title":"NotifiableItem ...","properties":{"bcc":{"$ref":"#/components/schemas/AdvanceArg"},"body":{"$ref":"#/components/schemas/AdvanceArg"},"cc":{"$ref":"#/components/schemas/AdvanceArg"},"defaultOption":{"type":"string"},"format":{"type":"string"},"methods":{"type":"array","items":{"type":"string"}},"replyOptions":{"type":"array","items":{"type":"string"}},"subject":{"$ref":"#/components/schemas/AdvanceArg"},"timings":{"$ref":"#/components/schemas/NotifyTimings"},"to":{"$ref":"#/components/schemas/AdvanceArg"}}},"NotifyTimings":{"type":"object","title":"NotifyTimings - time control on notify items - retries max count and intervals.","properties":{"completeAfterReplies":{"type":"integer","format":"uint64"},"completeAfterSLA":{"type":"boolean"},"completeAfterV2":{"type":"boolean"},"retriesCount":{"type":"integer","format":"uint64"},"retriesInterval":{"type":"integer","format":"uint64"}}},"QuietMode":{"type":"integer","description":"QuietMode quiet mode for playbook task","format":"int64"},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"},"SLA":{"type":"object","title":"SLA ...","properties":{"days":{"type":"integer","format":"int64"},"hours":{"type":"integer","format":"int64"},"minutes":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"}}},"TaskState":{"type":"string","description":"TaskState indicates the state of the task during the incident/investigation execution"},"Task":{"type":"object","description":"Task is the basic task in the task repository that can be associated to an incident via playbook","properties":{"brand":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"clonedFrom":{"type":"string"},"comment":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"created":{"type":"string","format":"date-time"},"description":{"type":"string"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isCommand":{"type":"boolean"},"isLocked":{"type":"boolean"},"isTitleTask":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"playbookId":{"type":"string"},"playbookName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"scriptId":{"type":"string"},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"type":{"$ref":"#/components/schemas/TaskType"},"version":{"type":"integer","format":"int64"}}},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"InvPlaybookTaskCompleteData":{"type":"object","title":"InvPlaybookTaskCompleteData ...","properties":{"arguments":{"type":"object","additionalProperties":{"type":"object"}},"calculatedDescription":{"type":"string"},"calculatedTaskName":{"type":"string"},"completedBy":{"type":"string"},"completedCount":{"type":"integer","format":"int64"},"completedDate":{"type":"string","format":"date-time"},"entries":{"type":"array","items":{"type":"string"}},"hasErrorEntries":{"type":"boolean"},"input":{"type":"string"},"outputs":{"type":"object","additionalProperties":{"type":"object"}},"playbookInputs":{"type":"object","additionalProperties":{"type":"object"}},"startDate":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/TaskState"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"InvTaskDebug":{"type":"object","title":"InvTaskDebug ...","properties":{"breakpointCondition":{"$ref":"#/components/schemas/ArgFilter"},"inputOverrides":{"type":"object","additionalProperties":{"type":"string"}},"isMarkedWithBreakpoint":{"type":"boolean"},"isMarkedWithSkip":{"type":"boolean"},"outputOverrides":{"type":"object","additionalProperties":{"type":"object"}},"shouldOverrideDebugInfo":{"type":"boolean"},"skipConditionOverrideTo":{"type":"string"},"taskOriginalId":{"type":"string"}}},"TimerTrigger":{"type":"object","title":"TimerTrigger ...","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"type":"string","title":"TimerAction ..."},"TaskView":{"type":"object","description":"TaskView represents the view in client of the tasks graph"},"PlaybookView":{"type":"object","description":"PlaybookView represents the view in client of playbook graph"}}},"paths":{"/v2/inv-playbook/task/form/submit":{"post":{"summary":"Complete a task","description":"Submit a data collection task with given answers and multiple file attachments","operationId":"submitTaskForm","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"investigationId":{"description":"investigation ID","type":"string"},"taskId":{"description":"Task Id","type":"string"},"answers":{"description":"the answers to the task form. Answers are keyed by numerical question id","type":"string"},"file":{"description":"Files to attach to the task","type":"string"}}}}}},"responses":{"200":{"description":"InvestigationPlaybook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}},"tags":["Playbooks"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/xsoar-6-api/cortex-xsoar-6.x-apis/playbooks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
