> 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-8-api/cortex-xsoar-8.x-apis/playbooks.md).

# Playbooks

APIs for managing playbooks

## Complete a playbook task

> Mark a playbook task as completed.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 8 API","version":"XSOAR 8 Cloud"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://api-yourfqdn","description":""}],"paths":{"/xsoar/public/v1/inv-playbook/task/complete":{"post":{"summary":"Complete a playbook task","tags":["Playbooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}},"operationId":"post-xsoar-inv-playbook-task-complete","description":"Mark a playbook task as completed.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["investigationId","fileComment","taskId","taskInput"],"properties":{"investigationId":{"type":"string","description":"Investigation ID"},"fileName":{"type":"string","description":"File name"},"fileComment":{"type":"string","description":"Comment about the file"},"taskId":{"type":"string","description":"Task ID"},"taskInput":{"type":"string","description":"Task input"}}}}}}}}},"components":{"schemas":{"InvestigationPlaybook":{"type":"object","properties":{"Dirty":{"type":"boolean"},"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object","properties":{}}}},"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","additionalProperties":{"type":"object","properties":{}},"description":"Tasks that are marked for running, but cannot yet run due to incomplete parents"},"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"}}},"description":"InvestigationPlaybook is a wrapper for a linked list of Playbook tasks"},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}},"description":"PlaybookInput represents the playbook input"},"PlaybookInputQuery":{"type":"object","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","properties":{}},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}},"description":"PlaybookInputQuery represents the playbook query input"},"Period":{"title":"Period","type":"object","properties":{"by":{"type":"string"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}},"description":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now."},"QueryState":{"type":"object","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}},"description":"QueryState represents the playbook query state"},"AdvanceArg":{"title":"AdvanceArg - advance argument can be one of the following:","type":"object","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}},"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"},"ComplexArg":{"type":"object","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}},"description":"**ComplexArg:** All information that is necessary to compute argument value from context.\n\n**Root:** The object to work against.\n\n**Filters:** A collection of filters to apply to the root object, one after another (with logical AND condition between each one).\n\n**Accessor:** The key to access each result after filter.\n\n**Transformers:** A collection of transformers to apply on the result of the accessed key from each result. \n\nExample: If you want to take from context all `File.DisplayName` where `File.Extension` is `EXE`, and return the result in uppercase: `Root` is \"File\", `Filters` is \"File.DisplayName where File.Extension is 'EXE'\" query, `Accessor`:` is \"DisplayName\", and `Transformers` includes the uppercase transformation."},"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","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}},"description":"ArgAtomicFilter - operator with two sides that return true/false"},"OperatorArgument":{"title":"OperatorArgument ...","type":"object","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"title":"FilterOperatorID ...","type":"string"},"ArgTransformer":{"title":"ArgTransformer ...","type":"object","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"title":"TransformerOperatorID ...","type":"string"},"KeyValueArg":{"title":"KeyValueArg ...","type":"object","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"InvPlaybookDebugInfo":{"title":"InvPlaybookDebugInfo ...","type":"object","properties":{"originalInvPBId":{"type":"string"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}},"description":"PlaybookOutput represents the playbook output"},"OutputType":{"title":"OutputType ...","type":"string"},"InvestigationPlaybookData":{"type":"object","properties":{"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object","properties":{}}}},"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","additionalProperties":{"type":"object","properties":{}},"description":"Tasks that are marked for running, but cannot yet run due to incomplete parents"},"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"}},"description":"InvestigationPlaybookData returns all data of an investigation playbook, not including history"},"InvestigationPlaybookState":{"type":"string","description":"InvestigationPlaybookState indicates the state of the running playbook"},"InvestigationPlaybookTask":{"type":"object","properties":{"Reopen":{"type":"boolean"},"arguments":{"type":"object","additionalProperties":{"type":"object","properties":{}}},"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","properties":{}}}},"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","properties":{}}},"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","properties":{}}},"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"}},"description":"InvestigationPlaybookTask is the Task in the playbook context as a node"},"TaskCondition":{"type":"object","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}},"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)"},"ContinueOnErrorType":{"title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path.","type":"string"},"SLADurationUnit":{"type":"integer","description":"SLADurationUnit is a helper to calculate if SLA in hours or minutes","format":"int64"},"EvidenceData":{"type":"object","properties":{"customFields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"},"description":"This field must have empty json key"},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}},"description":"EvidenceData - all evidence properties to evaluate in task process"},"FieldMapping":{"type":"object","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}},"description":"FieldMapping - Map a task output (complex or simple value) to an incident field"},"DataCollectionForm":{"title":"DataCollectionForm - a data collection form with questions.","type":"object","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":{"title":"Question - question for a form with a given type.","type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{}}}},"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":{"title":"GridColumn","type":"object","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":{"title":"FormDisplay - display options for communication/ask task (for both email and web forms).","type":"object","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","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"}},"description":"TaskLoop contains loop details"},"NotifiableItem":{"title":"NotifiableItem ...","type":"object","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":{"title":"NotifyTimings - time control on notify items - retries max count and intervals.","type":"object","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","format":"double","title":"ReputationCalcAlg ..."},"SLA":{"title":"SLA ...","type":"object","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","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"}},"description":"Task is the basic task in the task repository that can be associated to an incident via playbook"},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"InvPlaybookTaskCompleteData":{"title":"InvPlaybookTaskCompleteData ...","type":"object","properties":{"arguments":{"type":"object","additionalProperties":{"type":"object","properties":{}}},"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","properties":{}}},"playbookInputs":{"type":"object","additionalProperties":{"type":"object","properties":{}}},"startDate":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/TaskState"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"InvTaskDebug":{"title":"InvTaskDebug ...","type":"object","properties":{"breakpointCondition":{"$ref":"#/components/schemas/ArgFilter"},"inputOverrides":{"type":"object","additionalProperties":{"type":"string"}},"isMarkedWithBreakpoint":{"type":"boolean"},"isMarkedWithSkip":{"type":"boolean"},"outputOverrides":{"type":"object","additionalProperties":{"type":"object","properties":{}}},"shouldOverrideDebugInfo":{"type":"boolean"},"skipConditionOverrideTo":{"type":"string"},"taskOriginalId":{"type":"string"}}},"TimerTrigger":{"title":"TimerTrigger ...","type":"object","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"title":"TimerAction ...","type":"string"},"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"}}}}
```

## Execute task in running investigation

> Trigger execution of automatic task in running investigation.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 8 API","version":"XSOAR 8 Cloud"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://api-yourfqdn","description":""}],"paths":{"/xsoar/public/v1/inv-playbook/task/execute":{"post":{"summary":"Execute task in running investigation","tags":["Playbooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"},"dbotCreatedBy":{"type":"string"},"incidentCreateDate":{"type":"string"},"name":{"type":"string"},"playbookId":{"type":"string"},"investigationId":{"type":"string"},"startTaskId":{"type":"string"},"tasks":{"type":"object","properties":{"0":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"type":{"type":"string"},"task":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"sequenceNumber":{"type":"integer"},"primaryTerm":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"},"description":{"type":"string"},"type":{"type":"string"}}},"nextTasks":{"type":"object","properties":{"#none#":{"type":"array","items":{"type":"string"}}}},"continueOnErrorType":{"type":"string"},"view":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"evidenceData":{"type":"object","properties":{}},"quietMode":{"type":"integer"},"dueDate":{"type":"string"},"completedBy":{"type":"string"},"startDate":{"type":"string"},"completedDate":{"type":"string"},"state":{"type":"string"},"hasErrorEntries":{"type":"boolean"},"doNotSaveTaskHistory":{"type":"boolean"},"Reopen":{"type":"boolean"},"taskSize":{"type":"integer"}}},"1":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"type":{"type":"string"},"task":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"sequenceNumber":{"type":"integer"},"primaryTerm":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"scriptId":{"type":"string"},"type":{"type":"string"},"brand":{"type":"string"}}},"nextTasks":{"type":"object","properties":{"#none#":{"type":"array","items":{"type":"string"}}}},"scriptArguments":{"type":"object","properties":{"severity":{"type":"object","properties":{"simple":{"type":"string"}}}}},"continueOnErrorType":{"type":"string"},"view":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"evidenceData":{"type":"object","properties":{}},"quietMode":{"type":"integer"},"dueDate":{"type":"string"},"previousTasks":{"type":"object","properties":{"#none#":{"type":"array","items":{"type":"string"}}}},"completedBy":{"type":"string"},"startDate":{"type":"string"},"completedDate":{"type":"string"},"arguments":{"type":"object","properties":{"severity":{"type":"string"}}},"entries":{"type":"array","items":{"type":"string"}},"state":{"type":"string"},"hasErrorEntries":{"type":"boolean"},"doNotSaveTaskHistory":{"type":"boolean"},"Reopen":{"type":"boolean"},"taskSize":{"type":"integer"}}},"2":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"type":{"type":"string"},"task":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"scriptId":{"type":"string"},"type":{"type":"string"}}},"scriptArguments":{"type":"object","properties":{"value":{"type":"object","properties":{"simple":{"type":"string"}}}}},"continueOnErrorType":{"type":"string"},"view":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"evidenceData":{"type":"object","properties":{}},"dueDate":{"type":"string"},"previousTasks":{"type":"object","properties":{"#none#":{"type":"array","items":{"type":"string"}}}},"patched":{"type":"boolean"},"startDate":{"type":"string"},"completedDate":{"type":"string"},"hasErrorEntries":{"type":"boolean"},"indent":{"type":"integer"},"Reopen":{"type":"boolean"}}}}},"state":{"type":"string"},"view":{"type":"object","properties":{"linkLabelsPosition":{"type":"object","properties":{}},"paper":{"type":"object","properties":{"dimensions":{"type":"object","properties":{"height":{"type":"integer"},"width":{"type":"integer"},"x":{"type":"integer"},"y":{"type":"integer"}}}}}}},"startDate":{"type":"string"},"UpdatedOperatorIDs":{"type":"boolean"}}}}}}},"operationId":"post-xsoar-inv-playbook-task-execute","description":"Trigger execution of automatic task in running investigation.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"taskinfo":{"type":"object","properties":{"invId":{"type":"string"},"inTaskID":{"type":"string"},"version":{"type":"integer"},"args":{"type":"object","properties":{"value":{"type":"object","properties":{"simple":{"type":"string"}}}}},"loopArgs":{"type":"object","properties":{}}}},"playbooksdebuginfo":{"type":"object","properties":{}}}}}}}}}}}
```

## Mark a completed task in a running playbook as not complete

> Reopen a closed task and change the status to not complete.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 8 API","version":"XSOAR 8 Cloud"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://api-yourfqdn","description":""}],"paths":{"/xsoar/public/v1/inv-playbook/task/uncomplete":{"post":{"tags":["Playbooks"],"summary":"Mark a completed task in a running playbook as not complete","description":"Reopen a closed task and change the status to not complete.","operationId":"post-xsoar-inv-playbook-task-uncomplete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invTaskInfo"}}},"required":false},"responses":{"200":{"description":"OK","content":{}}}}}},"components":{"schemas":{"invTaskInfo":{"type":"object","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"}},"comment":{"type":"string"},"inTaskID":{"type":"string"},"input":{"type":"string"},"invId":{"type":"string"}}},"AdvanceArg":{"title":"AdvanceArg - advance argument can be one of the following:","type":"object","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}},"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"},"ComplexArg":{"type":"object","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}},"description":"**ComplexArg:** All information that is necessary to compute argument value from context.\n\n**Root:** The object to work against.\n\n**Filters:** A collection of filters to apply to the root object, one after another (with logical AND condition between each one).\n\n**Accessor:** The key to access each result after filter.\n\n**Transformers:** A collection of transformers to apply on the result of the accessed key from each result. \n\nExample: If you want to take from context all `File.DisplayName` where `File.Extension` is `EXE`, and return the result in uppercase: `Root` is \"File\", `Filters` is \"File.DisplayName where File.Extension is 'EXE'\" query, `Accessor`:` is \"DisplayName\", and `Transformers` includes the uppercase transformation."},"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","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}},"description":"ArgAtomicFilter - operator with two sides that return true/false"},"OperatorArgument":{"title":"OperatorArgument ...","type":"object","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"title":"FilterOperatorID ...","type":"string"},"ArgTransformer":{"title":"ArgTransformer ...","type":"object","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"title":"TransformerOperatorID ...","type":"string"},"KeyValueArg":{"title":"KeyValueArg ...","type":"object","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}}}}}
```

## Get playbook by ID

> Get the playbook specified by playbook ID.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 8 API","version":"XSOAR 8 Cloud"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://api-yourfqdn","description":""}],"paths":{"/xsoar/public/v1/playbook/{playbook_id}":{"get":{"summary":"Get playbook by ID","tags":["Playbooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"sequenceNumber":{"type":"integer"},"primaryTerm":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"},"packID":{"type":"string"},"packName":{"type":"string"},"itemVersion":{"type":"string"},"fromServerVersion":{"type":"string"},"toServerVersion":{"type":"string"},"propagationLabels":{"type":"array","items":{"type":"string"}},"definitionId":{"type":"string"},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"commitMessage":{"type":"string"},"shouldCommit":{"type":"boolean"},"name":{"type":"string"},"nameRaw":{"type":"string"},"prevName":{"type":"string"},"startTaskId":{"type":"string"},"tasks":{"type":"object","properties":{"0":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"type":{"type":"string"},"task":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"sequenceNumber":{"type":"integer"},"primaryTerm":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"}}},"continueOnErrorType":{"type":"string"},"view":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"evidenceData":{"type":"object","properties":{}}}}}},"taskIds":{"type":"array","items":{"type":"string"}},"scriptIds":{"type":"array","items":{"type":"object","properties":{}}},"commands":{"type":"array","items":{"type":"object","properties":{}}},"brands":{"type":"array","items":{"type":"object","properties":{}}},"view":{"type":"object","properties":{"linkLabelsPosition":{"type":"object","properties":{}},"paper":{"type":"object","properties":{"dimensions":{"type":"object","properties":{"height":{"type":"integer"},"width":{"type":"integer"},"x":{"type":"integer"},"y":{"type":"integer"}}}}}}},"inputs":{"type":"null"},"outputs":{"type":"null"},"quiet":{"type":"boolean"}}}}}}},"operationId":"get-xsoar-playbook-playbook_id","description":"Get the playbook specified by playbook ID."}}}}
```

## Search playbooks using queries

> Search for playbooks using queries.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 8 API","version":"XSOAR 8 Cloud"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://api-yourfqdn","description":""}],"paths":{"/xsoar/public/v1/playbook/search":{"post":{"summary":"Search playbooks using queries","tags":["Playbooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"playbooks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"sequenceNumber":{"type":"integer"},"primaryTerm":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"},"packID":{"type":"string"},"packName":{"type":"string"},"itemVersion":{"type":"string"},"fromServerVersion":{"type":"string"},"toServerVersion":{"type":"string"},"propagationLabels":{"type":"array","items":{"type":"string"}},"definitionId":{"type":"string"},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"commitMessage":{"type":"string"},"shouldCommit":{"type":"boolean"},"name":{"type":"string"},"nameRaw":{"type":"string"},"prevName":{"type":"string"},"startTaskId":{"type":"string"},"tasks":{"type":"object","properties":{"0":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"type":{"type":"string"},"task":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"sequenceNumber":{"type":"integer"},"primaryTerm":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"}}},"nextTasks":{"type":"object","properties":{"#none#":{"type":"array","items":{"type":"string"}}}},"continueOnErrorType":{"type":"string"},"view":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"evidenceData":{"type":"object","properties":{}}}},"1":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"type":{"type":"string"},"task":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"sequenceNumber":{"type":"integer"},"primaryTerm":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"scriptId":{"type":"string"},"type":{"type":"string"},"isCommand":{"type":"boolean"},"brand":{"type":"string"}}},"scriptArguments":{"type":"object","properties":{"severity":{"type":"object","properties":{"simple":{"type":"string"}}}}},"continueOnErrorType":{"type":"string"},"view":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"evidenceData":{"type":"object","properties":{}}}}}},"taskIds":{"type":"array","items":{"type":"string"}},"scriptIds":{"type":"array","items":{"type":"object","properties":{}}},"commands":{"type":"array","items":{"type":"string"}},"brands":{"type":"array","items":{"type":"string"}},"missingScriptsIds":{"type":"array","items":{"type":"string"}},"view":{"type":"object","properties":{"linkLabelsPosition":{"type":"object","properties":{}},"paper":{"type":"object","properties":{"dimensions":{"type":"object","properties":{"height":{"type":"integer"},"width":{"type":"integer"},"x":{"type":"integer"},"y":{"type":"integer"}}}}}}},"inputs":{"type":"null"},"outputs":{"type":"null"},"quiet":{"type":"boolean"}}}},"tags":{"type":"array","items":{"type":"string"}},"total":{"type":"integer"}}}}}}},"operationId":"post-xsoar-playbook-search","description":"Search for playbooks using queries.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"}}}}}}}}}}
```

## Upload a playbook from a YAML file

> Import and override an existing playbook by uploading its YAML file.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 8 API","version":"XSOAR 8 Cloud"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://api-yourfqdn","description":""}],"paths":{"/xsoar/public/v1/playbook/save/yaml":{"post":{"summary":"Upload a playbook from a YAML file","tags":["Playbooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"playbook":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"sequenceNumber":{"type":"integer"},"primaryTerm":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"},"packID":{"type":"string"},"packName":{"type":"string"},"itemVersion":{"type":"string"},"fromServerVersion":{"type":"string"},"toServerVersion":{"type":"string"},"propagationLabels":{"type":"array","items":{"type":"string"}},"definitionId":{"type":"string"},"isOverridable":{"type":"boolean"},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"commitMessage":{"type":"string"},"shouldCommit":{"type":"boolean"},"name":{"type":"string"},"nameRaw":{"type":"string"},"prevName":{"type":"string"},"startTaskId":{"type":"string"},"tasks":{"type":"object","properties":{"0":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"type":{"type":"string"},"task":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"sequenceNumber":{"type":"integer"},"primaryTerm":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"}}},"nextTasks":{"type":"object","properties":{"#none#":{"type":"array","items":{"type":"string"}}}},"continueOnErrorType":{"type":"string"},"view":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"evidenceData":{"type":"object","properties":{}}}},"1":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"type":{"type":"string"},"task":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"sequenceNumber":{"type":"integer"},"primaryTerm":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"scriptId":{"type":"string"},"type":{"type":"string"},"isCommand":{"type":"boolean"},"brand":{"type":"string"}}},"scriptArguments":{"type":"object","properties":{"accountid":{"type":"object","properties":{"complex":{"type":"object","properties":{"root":{"type":"string"},"filters":{"type":"null"},"accessor":{"type":"string"},"transformers":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string"},"args":{"type":"object","properties":{"prefix":{"type":"object","properties":{"isContext":{"type":"boolean"}}},"suffix":{"type":"object","properties":{"value":{"type":"object","properties":{"simple":{"type":"string"}}},"isContext":{"type":"boolean"}}}}}}}}}}}}}},"continueOnErrorType":{"type":"string"},"view":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"evidenceData":{"type":"object","properties":{}}}}}},"taskIds":{"type":"array","items":{"type":"string"}},"scriptIds":{"type":"array","items":{"type":"object","properties":{}}},"commands":{"type":"array","items":{"type":"string"}},"brands":{"type":"array","items":{"type":"string"}},"view":{"type":"object","properties":{"linkLabelsPosition":{"type":"object","properties":{}},"paper":{"type":"object","properties":{"dimensions":{"type":"object","properties":{"height":{"type":"integer"},"width":{"type":"integer"},"x":{"type":"integer"},"y":{"type":"integer"}}}}}}},"inputs":{"type":"array","items":{"type":"object","properties":{}}},"outputs":{"type":"array","items":{"type":"object","properties":{}}},"dirtyInputs":{"type":"boolean"}}},"warnings":{"type":"null"}}}}}}},"operationId":"post-xsoar-public-v1-playbook-save-yaml","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"{api_key}","required":true},{"schema":{"type":"string"},"in":"header","name":"x-xdr-auth-id","description":"{api_key_id}","required":true}],"description":"Import and override an existing playbook by uploading its YAML file.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"File"}}}}}}}}}}
```

## Add ad-hoc playbook task

> Add an ad-hoc task to a running playbook.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 8 API","version":"XSOAR 8 Cloud"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://api-yourfqdn","description":""}],"paths":{"/xsoar/public/v1/inv-playbook/task/add/{investigationId}":{"post":{"summary":"Add ad-hoc playbook task","tags":["Playbooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}},"operationId":"post-xsoar-public-v1-inv-playbook-task-add-investigationId","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"{api_key}","required":true},{"schema":{"type":"string"},"in":"header","name":"x-xdr-auth-id","description":"{api_key_id}","required":true}],"description":"Add an ad-hoc task to a running playbook.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationPlaybook"}}}}}}},"components":{"schemas":{"InvestigationPlaybook":{"type":"object","properties":{"Dirty":{"type":"boolean"},"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object","properties":{}}}},"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","additionalProperties":{"type":"object","properties":{}},"description":"Tasks that are marked for running, but cannot yet run due to incomplete parents"},"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"}}},"description":"InvestigationPlaybook is a wrapper for a linked list of Playbook tasks"},"PlaybookInputs":{"type":"array","description":"PlaybookInputs - array of PlaybookInput","items":{"$ref":"#/components/schemas/PlaybookInput"}},"PlaybookInput":{"type":"object","properties":{"description":{"type":"string"},"key":{"type":"string"},"playbookInputQuery":{"$ref":"#/components/schemas/PlaybookInputQuery"},"required":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}},"description":"PlaybookInput represents the playbook input"},"PlaybookInputQuery":{"type":"object","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","properties":{}},"runFromLastJobTime":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"}},"description":"PlaybookInputQuery represents the playbook query input"},"Period":{"title":"Period","type":"object","properties":{"by":{"type":"string"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}},"description":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now."},"QueryState":{"type":"object","properties":{"batchSize":{"type":"integer","format":"int64"},"currentPage":{"type":"integer","format":"int64"},"searchAfter":{"type":"array","items":{"type":"string"}},"totalResults":{"type":"integer","format":"int64"}},"description":"QueryState represents the playbook query state"},"AdvanceArg":{"title":"AdvanceArg - advance argument can be one of the following:","type":"object","properties":{"complex":{"$ref":"#/components/schemas/ComplexArg"},"keyValue":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueArg"}},"simple":{"type":"string"}},"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"},"ComplexArg":{"type":"object","properties":{"accessor":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"root":{"type":"string"},"transformers":{"type":"array","items":{"$ref":"#/components/schemas/ArgTransformer"}}},"description":"**ComplexArg:** All information that is necessary to compute argument value from context.\n\n**Root:** The object to work against.\n\n**Filters:** A collection of filters to apply to the root object, one after another (with logical AND condition between each one).\n\n**Accessor:** The key to access each result after filter.\n\n**Transformers:** A collection of transformers to apply on the result of the accessed key from each result. \n\nExample: If you want to take from context all `File.DisplayName` where `File.Extension` is `EXE`, and return the result in uppercase: `Root` is \"File\", `Filters` is \"File.DisplayName where File.Extension is 'EXE'\" query, `Accessor`:` is \"DisplayName\", and `Transformers` includes the uppercase transformation."},"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","properties":{"ignoreCase":{"type":"boolean"},"left":{"$ref":"#/components/schemas/OperatorArgument"},"operator":{"$ref":"#/components/schemas/FilterOperatorID"},"right":{"$ref":"#/components/schemas/OperatorArgument"},"type":{"type":"string"}},"description":"ArgAtomicFilter - operator with two sides that return true/false"},"OperatorArgument":{"title":"OperatorArgument ...","type":"object","properties":{"isContext":{"type":"boolean"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"FilterOperatorID":{"title":"FilterOperatorID ...","type":"string"},"ArgTransformer":{"title":"ArgTransformer ...","type":"object","properties":{"args":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OperatorArgument"}},"operator":{"$ref":"#/components/schemas/TransformerOperatorID"}}},"TransformerOperatorID":{"title":"TransformerOperatorID ...","type":"string"},"KeyValueArg":{"title":"KeyValueArg ...","type":"object","properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/AdvanceArg"}}},"InvPlaybookDebugInfo":{"title":"InvPlaybookDebugInfo ...","type":"object","properties":{"originalInvPBId":{"type":"string"}}},"PlaybookOutputs":{"type":"array","description":"PlaybookOutputs - array of PlaybookOutput","items":{"$ref":"#/components/schemas/PlaybookOutput"}},"PlaybookOutput":{"type":"object","properties":{"contextPath":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/OutputType"}},"description":"PlaybookOutput represents the playbook output"},"OutputType":{"title":"OutputType ...","type":"string"},"InvestigationPlaybookData":{"type":"object","properties":{"ReadyPlaybookInputs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object","properties":{}}}},"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","additionalProperties":{"type":"object","properties":{}},"description":"Tasks that are marked for running, but cannot yet run due to incomplete parents"},"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"}},"description":"InvestigationPlaybookData returns all data of an investigation playbook, not including history"},"InvestigationPlaybookState":{"type":"string","description":"InvestigationPlaybookState indicates the state of the running playbook"},"InvestigationPlaybookTask":{"type":"object","properties":{"Reopen":{"type":"boolean"},"arguments":{"type":"object","additionalProperties":{"type":"object","properties":{}}},"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","properties":{}}}},"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","properties":{}}},"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","properties":{}}},"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"}},"description":"InvestigationPlaybookTask is the Task in the playbook context as a node"},"TaskCondition":{"type":"object","properties":{"condition":{"type":"array","items":{"$ref":"#/components/schemas/ArgFilter"}},"label":{"type":"string"}},"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)"},"ContinueOnErrorType":{"title":"ContinueOnErrorType there are different ways to handle an error. Ignore the error and proceed or handle it with error path.","type":"string"},"SLADurationUnit":{"type":"integer","description":"SLADurationUnit is a helper to calculate if SLA in hours or minutes","format":"int64"},"EvidenceData":{"type":"object","properties":{"customFields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AdvanceArg"},"description":"This field must have empty json key"},"description":{"$ref":"#/components/schemas/AdvanceArg"},"occurred":{"$ref":"#/components/schemas/AdvanceArg"},"tags":{"$ref":"#/components/schemas/AdvanceArg"}},"description":"EvidenceData - all evidence properties to evaluate in task process"},"FieldMapping":{"type":"object","properties":{"fieldId":{"type":"string"},"output":{"$ref":"#/components/schemas/AdvanceArg"}},"description":"FieldMapping - Map a task output (complex or simple value) to an incident field"},"DataCollectionForm":{"title":"DataCollectionForm - a data collection form with questions.","type":"object","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":{"title":"Question - question for a form with a given type.","type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object","properties":{}}}},"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":{"title":"GridColumn","type":"object","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":{"title":"FormDisplay - display options for communication/ask task (for both email and web forms).","type":"object","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","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"}},"description":"TaskLoop contains loop details"},"NotifiableItem":{"title":"NotifiableItem ...","type":"object","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":{"title":"NotifyTimings - time control on notify items - retries max count and intervals.","type":"object","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","format":"double","title":"ReputationCalcAlg ..."},"SLA":{"title":"SLA ...","type":"object","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","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"}},"description":"Task is the basic task in the task repository that can be associated to an incident via playbook"},"TaskType":{"type":"string","description":"TaskType is the Task in the playbook context as a node"},"InvPlaybookTaskCompleteData":{"title":"InvPlaybookTaskCompleteData ...","type":"object","properties":{"arguments":{"type":"object","additionalProperties":{"type":"object","properties":{}}},"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","properties":{}}},"playbookInputs":{"type":"object","additionalProperties":{"type":"object","properties":{}}},"startDate":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/TaskState"},"willNotExecuteCount":{"type":"integer","format":"int64"},"willNotExecuteReason":{"type":"string"}}},"InvTaskDebug":{"title":"InvTaskDebug ...","type":"object","properties":{"breakpointCondition":{"$ref":"#/components/schemas/ArgFilter"},"inputOverrides":{"type":"object","additionalProperties":{"type":"string"}},"isMarkedWithBreakpoint":{"type":"boolean"},"isMarkedWithSkip":{"type":"boolean"},"outputOverrides":{"type":"object","additionalProperties":{"type":"object","properties":{}}},"shouldOverrideDebugInfo":{"type":"boolean"},"skipConditionOverrideTo":{"type":"string"},"taskOriginalId":{"type":"string"}}},"TimerTrigger":{"title":"TimerTrigger ...","type":"object","properties":{"action":{"$ref":"#/components/schemas/TimerAction"},"fieldName":{"type":"string"}}},"TimerAction":{"title":"TimerAction ...","type":"string"},"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"}}}}
```

## Duplicate a playbook

> Clone an existing playbook by specifying its playbook ID.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 8 API","version":"XSOAR 8 Cloud"},"tags":[{"name":"Playbooks","description":"APIs for managing playbooks"}],"servers":[{"url":"https://api-yourfqdn","description":""}],"paths":{"/xsoar/public/v1/playbook/clone/{playbook_id}":{"post":{"summary":"Duplicate a playbook","tags":["Playbooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"sequenceNumber":{"type":"integer"},"primaryTerm":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"},"packID":{"type":"string"},"packName":{"type":"string"},"itemVersion":{"type":"string"},"fromServerVersion":{"type":"string"},"toServerVersion":{"type":"string"},"propagationLabels":{"type":"array","items":{"type":"string"}},"definitionId":{"type":"string"},"isOverridable":{"type":"boolean"},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"commitMessage":{"type":"string"},"shouldCommit":{"type":"boolean"},"name":{"type":"string"},"nameRaw":{"type":"string"},"prevName":{"type":"string"},"startTaskId":{"type":"string"},"tasks":{"type":"object","properties":{"0":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"type":{"type":"string"},"task":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"sequenceNumber":{"type":"integer"},"primaryTerm":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"},"description":{"type":"string"},"type":{"type":"string"}}},"nextTasks":{"type":"object","properties":{"#none#":{"type":"array","items":{"type":"string"}}}},"continueOnErrorType":{"type":"string"},"view":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"evidenceData":{"type":"object","properties":{}}}},"1":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"type":{"type":"string"},"task":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"sequenceNumber":{"type":"integer"},"primaryTerm":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"scriptId":{"type":"string"},"type":{"type":"string"},"isCommand":{"type":"boolean"}}},"scriptArguments":{"type":"object","properties":{"value":{"type":"object","properties":{"simple":{"type":"string"}}}}},"continueOnErrorType":{"type":"string"},"view":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"evidenceData":{"type":"object","properties":{}}}}}},"taskIds":{"type":"array","items":{"type":"string"}},"scriptIds":{"type":"array","items":{"type":"object","properties":{}}},"commands":{"type":"array","items":{"type":"string"}},"brands":{"type":"array","items":{"type":"string"}},"view":{"type":"object","properties":{"linkLabelsPosition":{"type":"object","properties":{}},"paper":{"type":"object","properties":{"dimensions":{"type":"object","properties":{"height":{"type":"integer"},"width":{"type":"integer"},"x":{"type":"integer"},"y":{"type":"integer"}}}}}}},"inputs":{"type":"null"},"outputs":{"type":"null"},"sourcePlaybookID":{"type":"string"}}}}}}},"operationId":"post-xsoar-public-v1-playbook-clone-playbook_id","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"{api_key}","required":true},{"schema":{"type":"string"},"in":"header","name":"x-xdr-auth-id","description":"{api_key_id}","required":true}],"description":"Clone an existing playbook by specifying its playbook ID."}}}}
```


---

# 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-8-api/cortex-xsoar-8.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.
