> 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/incidents.md).

# Incidents

APIs for managing incidents

## Import a classifier

> Import a classifier to Cortex XSOAR

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incidents","description":"APIs for managing incidents"}],"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":{"InstanceClassifier":{"type":"object","description":"InstanceClassifier - classifies an incident from a specific brand","properties":{"brands":{"type":"array","items":{"type":"string"}},"cacheVersn":{"type":"integer","format":"int64"},"commitMessage":{"type":"string"},"created":{"type":"string","format":"date-time"},"defaultIncidentType":{"type":"string"},"definitionId":{"type":"string"},"description":{"type":"string"},"feed":{"type":"boolean"},"fromServerVersion":{"$ref":"#/components/schemas/Version"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentSamples":{"$ref":"#/components/schemas/Incidents"},"indexName":{"type":"string"},"indicatorSamples":{"$ref":"#/components/schemas/FeedIndicators"},"instanceIds":{"type":"array","items":{"type":"string"}},"itemVersion":{"$ref":"#/components/schemas/Version"},"keyTypeMap":{"type":"object","additionalProperties":{"type":"string"}},"locked":{"type":"boolean"},"logicalVersion":{"type":"integer","format":"int64"},"mapping":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Mapper"}},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"nameRaw":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"packID":{"type":"string"},"packName":{"type":"string"},"packPropagationLabels":{"type":"array","items":{"type":"string"}},"prevName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"propagationLabels":{"type":"array","items":{"type":"string"}},"remote":{"type":"boolean"},"sequenceNumber":{"type":"integer","format":"int64"},"shouldCommit":{"type":"boolean"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"sourceClassifierId":{"type":"string"},"syncHash":{"type":"string"},"system":{"type":"boolean"},"toServerVersion":{"$ref":"#/components/schemas/Version"},"transformer":{"$ref":"#/components/schemas/AdvanceArg"},"type":{"$ref":"#/components/schemas/MapperType"},"unclassifiedCases":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/UnclassifiedCases"}},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"version":{"type":"integer","format":"int64"}}},"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"}}},"Incidents":{"description":"Incidents is a list of incident entities"},"FeedIndicators":{"type":"array","title":"FeedIndicators ...","items":{"$ref":"#/components/schemas/FeedIndicator"}},"FeedIndicator":{"type":"object","title":"FeedIndicator ...","properties":{"ExpirationSource":{"$ref":"#/components/schemas/ExpirationSource"},"bypassExclusionList":{"type":"boolean"},"classifierId":{"type":"string"},"classifierVersion":{"type":"integer","format":"int64"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/FeedIndicatorComment"}},"expirationInterval":{"type":"integer","format":"int64"},"expirationPolicy":{"$ref":"#/components/schemas/ExpirationPolicy"},"fetchTime":{"type":"string","format":"date-time"},"fields":{"$ref":"#/components/schemas/CustomFields"},"isEnrichment":{"type":"boolean"},"mapperId":{"type":"string"},"mapperVersion":{"type":"integer","format":"int64"},"modifiedTime":{"type":"string","format":"date-time"},"moduleId":{"type":"string"},"rawJSON":{"type":"object","additionalProperties":{"type":"object"}},"relationships":{"$ref":"#/components/schemas/RelationshipsAPI"},"reliability":{"$ref":"#/components/schemas/Reliability"},"score":{"type":"integer","format":"int64"},"sourceBrand":{"type":"string"},"sourceInstance":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string"},"value":{"type":"string"}}},"ExpirationSource":{"type":"object","title":"ExpirationSource ..\t.","properties":{"brand":{"type":"string"},"expirationInterval":{"type":"integer","format":"int64"},"expirationPolicy":{"$ref":"#/components/schemas/ExpirationPolicy"},"instance":{"type":"string"},"moduleId":{"type":"string"},"setTime":{"type":"string","format":"date-time"},"source":{"$ref":"#/components/schemas/ExpirationSettingsSource"},"user":{"type":"string"}}},"ExpirationPolicy":{"type":"string","title":"ExpirationPolicy ..."},"ExpirationSettingsSource":{"type":"string","title":"ExpirationSettingsSource ..."},"FeedIndicatorComment":{"type":"object","title":"FeedIndicatorComment ...","properties":{"content":{"type":"string"},"created":{"type":"string","format":"date-time"},"id":{"type":"string"},"user":{"type":"string"}}},"CustomFields":{"type":"object","title":"CustomFields ...","description":"The keys should be the field's display name all lower and without spaces. For example: Scan IP -> scanip\nTo get the actual key name you can also go to Cortex XSOAR CLI and run /incident_add and look for the key that you would like to update","additionalProperties":{"type":"object"}},"RelationshipsAPI":{"type":"array","title":"RelationshipsAPI ...","items":{"$ref":"#/components/schemas/RelationshipAPI"}},"RelationshipAPI":{"type":"object","title":"RelationshipAPI ...","properties":{"brand":{"type":"string"},"entityA":{"type":"string"},"entityAFamily":{"type":"string"},"entityAType":{"type":"string"},"entityB":{"type":"string"},"entityBFamily":{"type":"string"},"entityBType":{"type":"string"},"fields":{"$ref":"#/components/schemas/CustomFields"},"id":{"type":"string"},"instance":{"type":"string"},"name":{"type":"string"},"reliability":{"$ref":"#/components/schemas/Reliability"},"reverseName":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"type":{"type":"string"}}},"Reliability":{"type":"string","title":"Reliability ..."},"Mapper":{"type":"object","description":"Mapper - mapper for new incidents","properties":{"dontMapEventToLabels":{"type":"boolean","description":"DontMapEventToLabels by default we will map all the fields of the event to incident labels"},"internalMapping":{"type":"object","additionalProperties":{"$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"}}}},"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"}}},"MapperType":{"type":"string","description":"MapperType for instance classifier"},"UnclassifiedCases":{"type":"object","title":"UnclassifiedCases ...","additionalProperties":{"type":"integer","format":"int64"}}}},"paths":{"/classifier/import":{"post":{"summary":"Import a classifier","description":"Import a classifier to Cortex XSOAR","operationId":"importClassifier","requestBody":{"$ref":"#/components/requestBodies/importScript"},"responses":{"200":{"description":"The saved classifiers","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InstanceClassifier"}}}}}},"tags":["Incidents"]}}}}
```

## Create single incident

> Create or update incident according to JSON structure.\
> To update incident custom fields you should lowercase them and remove all spaces. For example: Scan IP -> scanip\
> To get the actual key name you can also go to Cortex XSOAR CLI and run /incident\_add and look for the key that you would like to update\
> \
> Use the 'createInvestigation\\: true' to start the investigation process automatically. (by running a playbook based on incident type.)

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incidents","description":"APIs for managing incidents"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"CreateIncidentRequest":{"type":"object","description":"CreateIncidentRequest is an extension for Incident entity, with additional field of changed-status for the web client.","properties":{"ShardID":{"type":"integer","format":"int64"},"account":{"type":"string","description":"Account holds the tenant name so that slicing and dicing on the master can leverage bleve"},"activated":{"type":"string","description":"When was this activated","format":"date-time"},"activatingingUserId":{"type":"string","description":"The user that activated this investigation"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"autime":{"type":"integer","description":"AlmostUniqueTime is an attempt to have a unique sortable ID for an incident","format":"int64"},"cacheVersn":{"type":"integer","format":"int64"},"canvases":{"type":"array","description":"Canvases of the incident","items":{"type":"string"}},"category":{"type":"string","description":"Category"},"closeNotes":{"type":"string","description":"Notes for closing the incident"},"closeReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"closed":{"type":"string","description":"When was this closed","format":"date-time"},"closingUserId":{"type":"string","description":"The user ID that closed this investigation"},"createInvestigation":{"type":"boolean"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"dbotCurrentDirtyFields":{"type":"array","description":"For mirroring, manage a list of current dirty fields so that we can send delta to outgoing integration","items":{"type":"string"}},"dbotDirtyFields":{"type":"array","description":"For mirroring, manage a list of dirty fields to not override them from the source of the incident","items":{"type":"string"}},"dbotMirrorDirection":{"type":"string","description":"DBotMirrorDirection of how to mirror the incident (in/out/both)"},"dbotMirrorId":{"type":"string","description":"DBotMirrorID of a remote system we are syncing with"},"dbotMirrorInstance":{"type":"string","description":"DBotMirrorInstance name of a mirror integration instance"},"dbotMirrorLastSync":{"type":"string","description":"The last time we synced this incident even if we did not update anything","format":"date-time"},"dbotMirrorTags":{"type":"array","description":"The entry tags I want to sync to remote system","items":{"type":"string"}},"details":{"type":"string","description":"The details of the incident - reason, etc."},"droppedCount":{"type":"integer","description":"DroppedCount ...","format":"int64"},"dueDate":{"type":"string","description":"SLA","format":"date-time"},"feedBased":{"type":"boolean","description":"If this incident was triggered by a feed job"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"indexName":{"type":"string"},"investigationId":{"type":"string","description":"Investigation that was opened as a result of the incoming event"},"isDebug":{"type":"boolean","description":"IsDebug ..."},"isPlayground":{"type":"boolean","description":"IsPlayGround"},"labels":{"type":"array","description":"Labels related to incident - each label is composed of a type and value","items":{"$ref":"#/components/schemas/Label"}},"lastJobRunTime":{"type":"string","description":"If this incident was triggered by a job, this would be the time the **previous** job started","format":"date-time"},"lastOpen":{"type":"string","format":"date-time"},"linkedCount":{"type":"integer","description":"LinkedCount ...","format":"int64"},"linkedIncidents":{"type":"array","description":"LinkedIncidents incidents that were marked as linked by user","items":{"type":"string"}},"modified":{"type":"string","format":"date-time"},"name":{"type":"string","description":"Incident Name - given by user"},"notifyTime":{"type":"string","description":"Incdicates when last this field was changed with a value that supposed to send a notification","format":"date-time"},"numericId":{"type":"integer","format":"int64"},"occurred":{"type":"string","description":"When this incident has really occurred","format":"date-time"},"openDuration":{"type":"integer","description":"Duration incident was open","format":"int64"},"owner":{"type":"string","description":"The user who owns this incident"},"parent":{"type":"string","description":"Parent"},"phase":{"type":"string","description":"Phase"},"playbookId":{"type":"string","description":"The associated playbook for this incident"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"rawCategory":{"type":"string"},"rawCloseReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"rawJSON":{"type":"string"},"rawName":{"type":"string","description":"Incident RawName"},"rawPhase":{"type":"string","description":"RawPhase"},"rawType":{"type":"string","description":"Incident raw type"},"reason":{"type":"string","description":"The reason an incident was closed."},"reminder":{"type":"string","description":"When if at all to send a reminder","format":"date-time"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"runStatus":{"$ref":"#/components/schemas/RunStatus"},"sequenceNumber":{"type":"integer","format":"int64"},"severity":{"$ref":"#/components/schemas/Severity"},"sizeInBytes":{"type":"integer","format":"int64"},"sla":{"$ref":"#/components/schemas/SLAState"},"sortValues":{"type":"array","items":{"type":"string"}},"sourceBrand":{"type":"string","description":"SourceBrand ..."},"sourceInstance":{"type":"string","description":"SourceInstance ..."},"status":{"$ref":"#/components/schemas/IncidentStatus"},"syncHash":{"type":"string"},"todoTaskIds":{"type":"array","description":"ToDoTaskIDs list of to do task ids","items":{"type":"string"}},"type":{"type":"string","description":"Incident type"},"version":{"type":"integer","format":"int64"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"Label":{"type":"object","title":"Label ...","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"RunStatus":{"type":"string","description":"RunStatus of a job"},"Severity":{"type":"number","description":"Severity is the incident severity","format":"double","minimum":0,"multipleOf":4},"SLAState":{"type":"number","description":"SLAState is the incident sla at closure time, in minutes.","format":"double"},"IncidentStatus":{"type":"number","description":"IncidentStatus is the status of the incident","format":"double","minimum":0,"maximum":2},"IncidentWrapper":{"type":"object","description":"IncidentWrapper is an extension of the Incident entity, which includes an additional field of changed-status for the web client","properties":{"ShardID":{"type":"integer","format":"int64"},"account":{"type":"string","description":"Account holds the tenant name so that slicing and dicing on the master can leverage bleve"},"activated":{"type":"string","description":"When was this activated","format":"date-time"},"activatingingUserId":{"type":"string","description":"The user that activated this investigation"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"attachment":{"type":"array","description":"Attachments","items":{"$ref":"#/components/schemas/Attachment"}},"autime":{"type":"integer","description":"AlmostUniqueTime is an attempt to have a unique sortable ID for an incident","format":"int64"},"cacheVersn":{"type":"integer","format":"int64"},"canvases":{"type":"array","description":"Canvases of the incident","items":{"type":"string"}},"category":{"type":"string","description":"Category"},"changeStatus":{"type":"string"},"closeNotes":{"type":"string","description":"Notes for closing the incident"},"closeReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"closed":{"type":"string","description":"When was this closed","format":"date-time"},"closingUserId":{"type":"string","description":"The user ID that closed this investigation"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"dbotCurrentDirtyFields":{"type":"array","description":"For mirroring, manage a list of current dirty fields so that we can send delta to outgoing integration","items":{"type":"string"}},"dbotDirtyFields":{"type":"array","description":"For mirroring, manage a list of dirty fields to not override them from the source of the incident","items":{"type":"string"}},"dbotMirrorDirection":{"type":"string","description":"DBotMirrorDirection of how to mirror the incident (in/out/both)"},"dbotMirrorId":{"type":"string","description":"DBotMirrorID of a remote system we are syncing with"},"dbotMirrorInstance":{"type":"string","description":"DBotMirrorInstance name of a mirror integration instance"},"dbotMirrorLastSync":{"type":"string","description":"The last time we synced this incident even if we did not update anything","format":"date-time"},"dbotMirrorTags":{"type":"array","description":"The entry tags I want to sync to remote system","items":{"type":"string"}},"details":{"type":"string","description":"The details of the incident - reason, etc."},"droppedCount":{"type":"integer","description":"DroppedCount ...","format":"int64"},"dueDate":{"type":"string","description":"SLA","format":"date-time"},"feedBased":{"type":"boolean","description":"If this incident was triggered by a feed job"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"insights":{"type":"integer","format":"uint64"},"investigationId":{"type":"string","description":"Investigation that was opened as a result of the incoming event"},"isDebug":{"type":"boolean","description":"IsDebug ..."},"isPlayground":{"type":"boolean","description":"IsPlayGround"},"labels":{"type":"array","description":"Labels related to incident - each label is composed of a type and value","items":{"$ref":"#/components/schemas/Label"}},"lastJobRunTime":{"type":"string","description":"If this incident was triggered by a job, this would be the time the **previous** job started","format":"date-time"},"lastOpen":{"type":"string","format":"date-time"},"linkedCount":{"type":"integer","description":"LinkedCount ...","format":"int64"},"linkedIncidents":{"type":"array","description":"LinkedIncidents incidents that were marked as linked by user","items":{"type":"string"}},"modified":{"type":"string","format":"date-time"},"name":{"type":"string","description":"Incident Name - given by user"},"notifyTime":{"type":"string","description":"Incdicates when last this field was changed with a value that supposed to send a notification","format":"date-time"},"numericId":{"type":"integer","format":"int64"},"occurred":{"type":"string","description":"When this incident has really occurred","format":"date-time"},"openDuration":{"type":"integer","description":"Duration incident was open","format":"int64"},"owner":{"type":"string","description":"The user who owns this incident"},"parent":{"type":"string","description":"Parent"},"phase":{"type":"string","description":"Phase"},"playbookId":{"type":"string","description":"The associated playbook for this incident"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"rawCategory":{"type":"string"},"rawCloseReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"rawJSON":{"type":"string"},"rawName":{"type":"string","description":"Incident RawName"},"rawPhase":{"type":"string","description":"RawPhase"},"rawType":{"type":"string","description":"Incident raw type"},"reason":{"type":"string","description":"The reason for the resolve"},"reminder":{"type":"string","description":"When if at all to send a reminder","format":"date-time"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"runStatus":{"$ref":"#/components/schemas/RunStatus"},"sequenceNumber":{"type":"integer","format":"int64"},"severity":{"$ref":"#/components/schemas/Severity"},"sizeInBytes":{"type":"integer","format":"int64"},"sla":{"$ref":"#/components/schemas/SLAState"},"sortValues":{"type":"array","items":{"type":"string"}},"sourceBrand":{"type":"string","description":"SourceBrand ..."},"sourceInstance":{"type":"string","description":"SourceInstance ..."},"status":{"$ref":"#/components/schemas/IncidentStatus"},"syncHash":{"type":"string"},"todoTaskIds":{"type":"array","description":"ToDoTaskIDs list of to do task ids","items":{"type":"string"}},"type":{"type":"string","description":"Incident type"},"version":{"type":"integer","format":"int64"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"Attachment":{"type":"object","title":"Attachment ...","properties":{"description":{"type":"string"},"isTempPath":{"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"},"showMediaFile":{"type":"boolean"},"type":{"type":"string"}}}}},"paths":{"/incident":{"post":{"summary":"Create single incident","description":"Create or update incident according to JSON structure.\nTo update incident custom fields you should lowercase them and remove all spaces. For example: Scan IP -> scanip\nTo get the actual key name you can also go to Cortex XSOAR CLI and run /incident_add and look for the key that you would like to update\n\nUse the 'createInvestigation\\: true' to start the investigation process automatically. (by running a playbook based on incident type.)","operationId":"createIncident","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIncidentRequest"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CreateIncidentRequest"}}}},"responses":{"200":{"description":"IncidentWrapper","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentWrapper"}}}}},"tags":["Incidents"]}}}}
```

## Update incidents in a batch

> Update a batch of incidents.\
> To update incident custom fields you should lowercase them and remove all spaces. For example: Scan IP -> scanip\
> To get the actual key name you can also go to Cortex XSOAR CLI and run /incident\_add and look for the key that you would like to update

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incidents","description":"APIs for managing incidents"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"requestBodies":{"UpdateDataBatch":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDataBatch"}},"application/xml":{"schema":{"$ref":"#/components/schemas/UpdateDataBatch"}}}}},"schemas":{"UpdateDataBatch":{"type":"object","title":"UpdateDataBatch ...","properties":{"CustomFields":{"type":"object","additionalProperties":{"type":"object"}},"all":{"type":"boolean"},"closeNotes":{"type":"string"},"closeReason":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"data":{"type":"object","additionalProperties":{"type":"object"}},"filter":{"$ref":"#/components/schemas/IncidentFilter"},"force":{"type":"boolean"},"ids":{"type":"array","items":{"type":"string"}},"line":{"type":"string"},"originalIncidentId":{"type":"string"},"overrideInvestigation":{"type":"boolean"}}},"IncidentFilter":{"type":"object","title":"IncidentFilter allows for very simple filtering.","properties":{"Cache":{"type":"object","description":"Cache of join functions","additionalProperties":{"type":"array","items":{"type":"string"}}},"accounts":{"type":"object","additionalProperties":{"type":"object"}},"andOp":{"type":"boolean"},"category":{"type":"array","items":{"type":"string"}},"details":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"string"}},"filterobjectquery":{"type":"string"},"fromActivatedDate":{"type":"string","format":"date-time"},"fromClosedDate":{"type":"string","format":"date-time"},"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"fromDueDate":{"type":"string","format":"date-time"},"fromReminder":{"type":"string","format":"date-time"},"id":{"type":"array","items":{"type":"string"}},"ignoreWorkers":{"type":"boolean","description":"Do not use workers mechanism while searching bleve"},"includeTmp":{"type":"boolean"},"investigation":{"type":"array","items":{"type":"string"}},"level":{"type":"array","items":{"$ref":"#/components/schemas/Severity"}},"name":{"type":"array","items":{"type":"string"}},"notCategory":{"type":"array","items":{"type":"string"}},"notInvestigation":{"type":"array","items":{"type":"string"}},"notStatus":{"type":"array","items":{"$ref":"#/components/schemas/IncidentStatus"}},"page":{"type":"integer","description":"0-based page","format":"int64"},"parent":{"type":"array","items":{"type":"string"}},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string","description":"If you include the `query` parameter, all other filter fields will be ignored. \nTo include the other filter fields, they must be included as part of the query used as the `query` value."},"reason":{"type":"array","items":{"type":"string"}},"searchAfter":{"type":"array","description":"Efficient next page, pass max sort value from previous page","items":{"type":"string"}},"searchAfterElastic":{"type":"array","description":"Efficient next page, pass max ES sort value from previous page","items":{"type":"string"}},"searchAfterMap":{"type":"object","description":"Map accounts search after values - stores next page sort values per account.\nThere is no need to store searchBeforeMap as [current page searchBefore] equals to [prev page searchAfter]\nMore, there is no way to generate correct searchBefore from current page as some tenants may not appear at all.\nThe map is relevant in proxy mode and used by tenants, each tenant extracts the searchAfter keys from the map.","additionalProperties":{"type":"array","items":{"type":"string"}}},"searchAfterMapOrder":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}},"searchBefore":{"type":"array","description":"Efficient prev page, pass min sort value from next page","items":{"type":"string"}},"searchBeforeElastic":{"type":"array","description":"Efficient prev page, pass min ES sort value from next page","items":{"type":"string"}},"size":{"type":"integer","description":"Size is limited to 1000, if not passed it defaults to 0, and no results will return","format":"int64"},"sort":{"type":"array","description":"The sort order","items":{"$ref":"#/components/schemas/Order"}},"status":{"type":"array","items":{"$ref":"#/components/schemas/IncidentStatus"}},"systems":{"type":"array","items":{"type":"string"}},"timeFrame":{"$ref":"#/components/schemas/Duration"},"toActivatedDate":{"type":"string","format":"date-time"},"toClosedDate":{"type":"string","format":"date-time"},"toDate":{"type":"string","format":"date-time"},"toDueDate":{"type":"string","format":"date-time"},"toReminder":{"type":"string","format":"date-time"},"totalOnly":{"type":"boolean"},"trim_events":{"type":"integer","format":"int64"},"type":{"type":"array","items":{"type":"string"}},"urls":{"type":"array","items":{"type":"string"}},"users":{"type":"array","items":{"type":"string"}}}},"Severity":{"type":"number","description":"Severity is the incident severity","format":"double","minimum":0,"multipleOf":4},"IncidentStatus":{"type":"number","description":"IncidentStatus is the status of the incident","format":"double","minimum":0,"maximum":2},"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"}}},"Order":{"type":"object","description":"Order struct holds a sort field and the direction of sorting","properties":{"asc":{"type":"boolean"},"field":{"type":"string"},"fieldType":{"type":"string"}}},"Duration":{"type":"integer","description":"A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.","format":"int64"},"IncidentSearchResponseWrapper":{"type":"object","description":"IncidentSearchResponseWrapper is an extension for the IncidentSearchResponse type, which holds list of IncidentWrapper(s)","properties":{"accountErrors":{"type":"array","items":{"type":"string"}},"data":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/IncidentWrapper"}},"notUpdated":{"type":"integer","format":"uint64"},"searchAfter":{"type":"array","items":{"type":"string"}},"searchAfterElastic":{"type":"array","items":{"type":"string"}},"searchBefore":{"type":"array","items":{"type":"string"}},"searchBeforeElastic":{"type":"array","items":{"type":"string"}},"total":{"type":"integer","format":"int64"},"totalAccounts":{"type":"integer","format":"int64"}}},"IncidentWrapper":{"type":"object","description":"IncidentWrapper is an extension of the Incident entity, which includes an additional field of changed-status for the web client","properties":{"ShardID":{"type":"integer","format":"int64"},"account":{"type":"string","description":"Account holds the tenant name so that slicing and dicing on the master can leverage bleve"},"activated":{"type":"string","description":"When was this activated","format":"date-time"},"activatingingUserId":{"type":"string","description":"The user that activated this investigation"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"attachment":{"type":"array","description":"Attachments","items":{"$ref":"#/components/schemas/Attachment"}},"autime":{"type":"integer","description":"AlmostUniqueTime is an attempt to have a unique sortable ID for an incident","format":"int64"},"cacheVersn":{"type":"integer","format":"int64"},"canvases":{"type":"array","description":"Canvases of the incident","items":{"type":"string"}},"category":{"type":"string","description":"Category"},"changeStatus":{"type":"string"},"closeNotes":{"type":"string","description":"Notes for closing the incident"},"closeReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"closed":{"type":"string","description":"When was this closed","format":"date-time"},"closingUserId":{"type":"string","description":"The user ID that closed this investigation"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"dbotCurrentDirtyFields":{"type":"array","description":"For mirroring, manage a list of current dirty fields so that we can send delta to outgoing integration","items":{"type":"string"}},"dbotDirtyFields":{"type":"array","description":"For mirroring, manage a list of dirty fields to not override them from the source of the incident","items":{"type":"string"}},"dbotMirrorDirection":{"type":"string","description":"DBotMirrorDirection of how to mirror the incident (in/out/both)"},"dbotMirrorId":{"type":"string","description":"DBotMirrorID of a remote system we are syncing with"},"dbotMirrorInstance":{"type":"string","description":"DBotMirrorInstance name of a mirror integration instance"},"dbotMirrorLastSync":{"type":"string","description":"The last time we synced this incident even if we did not update anything","format":"date-time"},"dbotMirrorTags":{"type":"array","description":"The entry tags I want to sync to remote system","items":{"type":"string"}},"details":{"type":"string","description":"The details of the incident - reason, etc."},"droppedCount":{"type":"integer","description":"DroppedCount ...","format":"int64"},"dueDate":{"type":"string","description":"SLA","format":"date-time"},"feedBased":{"type":"boolean","description":"If this incident was triggered by a feed job"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"insights":{"type":"integer","format":"uint64"},"investigationId":{"type":"string","description":"Investigation that was opened as a result of the incoming event"},"isDebug":{"type":"boolean","description":"IsDebug ..."},"isPlayground":{"type":"boolean","description":"IsPlayGround"},"labels":{"type":"array","description":"Labels related to incident - each label is composed of a type and value","items":{"$ref":"#/components/schemas/Label"}},"lastJobRunTime":{"type":"string","description":"If this incident was triggered by a job, this would be the time the **previous** job started","format":"date-time"},"lastOpen":{"type":"string","format":"date-time"},"linkedCount":{"type":"integer","description":"LinkedCount ...","format":"int64"},"linkedIncidents":{"type":"array","description":"LinkedIncidents incidents that were marked as linked by user","items":{"type":"string"}},"modified":{"type":"string","format":"date-time"},"name":{"type":"string","description":"Incident Name - given by user"},"notifyTime":{"type":"string","description":"Incdicates when last this field was changed with a value that supposed to send a notification","format":"date-time"},"numericId":{"type":"integer","format":"int64"},"occurred":{"type":"string","description":"When this incident has really occurred","format":"date-time"},"openDuration":{"type":"integer","description":"Duration incident was open","format":"int64"},"owner":{"type":"string","description":"The user who owns this incident"},"parent":{"type":"string","description":"Parent"},"phase":{"type":"string","description":"Phase"},"playbookId":{"type":"string","description":"The associated playbook for this incident"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"rawCategory":{"type":"string"},"rawCloseReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"rawJSON":{"type":"string"},"rawName":{"type":"string","description":"Incident RawName"},"rawPhase":{"type":"string","description":"RawPhase"},"rawType":{"type":"string","description":"Incident raw type"},"reason":{"type":"string","description":"The reason for the resolve"},"reminder":{"type":"string","description":"When if at all to send a reminder","format":"date-time"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"runStatus":{"$ref":"#/components/schemas/RunStatus"},"sequenceNumber":{"type":"integer","format":"int64"},"severity":{"$ref":"#/components/schemas/Severity"},"sizeInBytes":{"type":"integer","format":"int64"},"sla":{"$ref":"#/components/schemas/SLAState"},"sortValues":{"type":"array","items":{"type":"string"}},"sourceBrand":{"type":"string","description":"SourceBrand ..."},"sourceInstance":{"type":"string","description":"SourceInstance ..."},"status":{"$ref":"#/components/schemas/IncidentStatus"},"syncHash":{"type":"string"},"todoTaskIds":{"type":"array","description":"ToDoTaskIDs list of to do task ids","items":{"type":"string"}},"type":{"type":"string","description":"Incident type"},"version":{"type":"integer","format":"int64"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"Attachment":{"type":"object","title":"Attachment ...","properties":{"description":{"type":"string"},"isTempPath":{"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"},"showMediaFile":{"type":"boolean"},"type":{"type":"string"}}},"Label":{"type":"object","title":"Label ...","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"RunStatus":{"type":"string","description":"RunStatus of a job"},"SLAState":{"type":"number","description":"SLAState is the incident sla at closure time, in minutes.","format":"double"}}},"paths":{"/incident/batch":{"post":{"summary":"Update incidents in a batch","description":"Update a batch of incidents.\nTo update incident custom fields you should lowercase them and remove all spaces. For example: Scan IP -> scanip\nTo get the actual key name you can also go to Cortex XSOAR CLI and run /incident_add and look for the key that you would like to update","operationId":"createIncidentsBatch","requestBody":{"$ref":"#/components/requestBodies/UpdateDataBatch"},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentSearchResponseWrapper"}}}}},"tags":["Incidents"]}}}}
```

## Batch export incidents to csv

> Exports an incidents batch to CSV file (returns file ID)

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incidents","description":"APIs for managing incidents"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"requestBodies":{"UpdateDataBatch":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDataBatch"}},"application/xml":{"schema":{"$ref":"#/components/schemas/UpdateDataBatch"}}}}},"schemas":{"UpdateDataBatch":{"type":"object","title":"UpdateDataBatch ...","properties":{"CustomFields":{"type":"object","additionalProperties":{"type":"object"}},"all":{"type":"boolean"},"closeNotes":{"type":"string"},"closeReason":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"data":{"type":"object","additionalProperties":{"type":"object"}},"filter":{"$ref":"#/components/schemas/IncidentFilter"},"force":{"type":"boolean"},"ids":{"type":"array","items":{"type":"string"}},"line":{"type":"string"},"originalIncidentId":{"type":"string"},"overrideInvestigation":{"type":"boolean"}}},"IncidentFilter":{"type":"object","title":"IncidentFilter allows for very simple filtering.","properties":{"Cache":{"type":"object","description":"Cache of join functions","additionalProperties":{"type":"array","items":{"type":"string"}}},"accounts":{"type":"object","additionalProperties":{"type":"object"}},"andOp":{"type":"boolean"},"category":{"type":"array","items":{"type":"string"}},"details":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"string"}},"filterobjectquery":{"type":"string"},"fromActivatedDate":{"type":"string","format":"date-time"},"fromClosedDate":{"type":"string","format":"date-time"},"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"fromDueDate":{"type":"string","format":"date-time"},"fromReminder":{"type":"string","format":"date-time"},"id":{"type":"array","items":{"type":"string"}},"ignoreWorkers":{"type":"boolean","description":"Do not use workers mechanism while searching bleve"},"includeTmp":{"type":"boolean"},"investigation":{"type":"array","items":{"type":"string"}},"level":{"type":"array","items":{"$ref":"#/components/schemas/Severity"}},"name":{"type":"array","items":{"type":"string"}},"notCategory":{"type":"array","items":{"type":"string"}},"notInvestigation":{"type":"array","items":{"type":"string"}},"notStatus":{"type":"array","items":{"$ref":"#/components/schemas/IncidentStatus"}},"page":{"type":"integer","description":"0-based page","format":"int64"},"parent":{"type":"array","items":{"type":"string"}},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string","description":"If you include the `query` parameter, all other filter fields will be ignored. \nTo include the other filter fields, they must be included as part of the query used as the `query` value."},"reason":{"type":"array","items":{"type":"string"}},"searchAfter":{"type":"array","description":"Efficient next page, pass max sort value from previous page","items":{"type":"string"}},"searchAfterElastic":{"type":"array","description":"Efficient next page, pass max ES sort value from previous page","items":{"type":"string"}},"searchAfterMap":{"type":"object","description":"Map accounts search after values - stores next page sort values per account.\nThere is no need to store searchBeforeMap as [current page searchBefore] equals to [prev page searchAfter]\nMore, there is no way to generate correct searchBefore from current page as some tenants may not appear at all.\nThe map is relevant in proxy mode and used by tenants, each tenant extracts the searchAfter keys from the map.","additionalProperties":{"type":"array","items":{"type":"string"}}},"searchAfterMapOrder":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}},"searchBefore":{"type":"array","description":"Efficient prev page, pass min sort value from next page","items":{"type":"string"}},"searchBeforeElastic":{"type":"array","description":"Efficient prev page, pass min ES sort value from next page","items":{"type":"string"}},"size":{"type":"integer","description":"Size is limited to 1000, if not passed it defaults to 0, and no results will return","format":"int64"},"sort":{"type":"array","description":"The sort order","items":{"$ref":"#/components/schemas/Order"}},"status":{"type":"array","items":{"$ref":"#/components/schemas/IncidentStatus"}},"systems":{"type":"array","items":{"type":"string"}},"timeFrame":{"$ref":"#/components/schemas/Duration"},"toActivatedDate":{"type":"string","format":"date-time"},"toClosedDate":{"type":"string","format":"date-time"},"toDate":{"type":"string","format":"date-time"},"toDueDate":{"type":"string","format":"date-time"},"toReminder":{"type":"string","format":"date-time"},"totalOnly":{"type":"boolean"},"trim_events":{"type":"integer","format":"int64"},"type":{"type":"array","items":{"type":"string"}},"urls":{"type":"array","items":{"type":"string"}},"users":{"type":"array","items":{"type":"string"}}}},"Severity":{"type":"number","description":"Severity is the incident severity","format":"double","minimum":0,"multipleOf":4},"IncidentStatus":{"type":"number","description":"IncidentStatus is the status of the incident","format":"double","minimum":0,"maximum":2},"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"}}},"Order":{"type":"object","description":"Order struct holds a sort field and the direction of sorting","properties":{"asc":{"type":"boolean"},"field":{"type":"string"},"fieldType":{"type":"string"}}},"Duration":{"type":"integer","description":"A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.","format":"int64"}}},"paths":{"/incident/batch/exportToCsv":{"post":{"summary":"Batch export incidents to csv","description":"Exports an incidents batch to CSV file (returns file ID)","operationId":"exportIncidentsToCsvBatch","requestBody":{"$ref":"#/components/requestBodies/UpdateDataBatch"},"responses":{"200":{"description":"csv file name","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Incidents"]}}}}
```

## Batch close incidents

> Closes an incidents batch\
> To update incident custom fields you should lowercase them and remove all spaces. For example: Scan IP -> scanip\
> To get the actual key name you can also go to Cortex XSOAR CLI and run /incident\_add and look for the key that you would like to update

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incidents","description":"APIs for managing incidents"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"requestBodies":{"UpdateDataBatch":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDataBatch"}},"application/xml":{"schema":{"$ref":"#/components/schemas/UpdateDataBatch"}}}}},"schemas":{"UpdateDataBatch":{"type":"object","title":"UpdateDataBatch ...","properties":{"CustomFields":{"type":"object","additionalProperties":{"type":"object"}},"all":{"type":"boolean"},"closeNotes":{"type":"string"},"closeReason":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"data":{"type":"object","additionalProperties":{"type":"object"}},"filter":{"$ref":"#/components/schemas/IncidentFilter"},"force":{"type":"boolean"},"ids":{"type":"array","items":{"type":"string"}},"line":{"type":"string"},"originalIncidentId":{"type":"string"},"overrideInvestigation":{"type":"boolean"}}},"IncidentFilter":{"type":"object","title":"IncidentFilter allows for very simple filtering.","properties":{"Cache":{"type":"object","description":"Cache of join functions","additionalProperties":{"type":"array","items":{"type":"string"}}},"accounts":{"type":"object","additionalProperties":{"type":"object"}},"andOp":{"type":"boolean"},"category":{"type":"array","items":{"type":"string"}},"details":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"string"}},"filterobjectquery":{"type":"string"},"fromActivatedDate":{"type":"string","format":"date-time"},"fromClosedDate":{"type":"string","format":"date-time"},"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"fromDueDate":{"type":"string","format":"date-time"},"fromReminder":{"type":"string","format":"date-time"},"id":{"type":"array","items":{"type":"string"}},"ignoreWorkers":{"type":"boolean","description":"Do not use workers mechanism while searching bleve"},"includeTmp":{"type":"boolean"},"investigation":{"type":"array","items":{"type":"string"}},"level":{"type":"array","items":{"$ref":"#/components/schemas/Severity"}},"name":{"type":"array","items":{"type":"string"}},"notCategory":{"type":"array","items":{"type":"string"}},"notInvestigation":{"type":"array","items":{"type":"string"}},"notStatus":{"type":"array","items":{"$ref":"#/components/schemas/IncidentStatus"}},"page":{"type":"integer","description":"0-based page","format":"int64"},"parent":{"type":"array","items":{"type":"string"}},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string","description":"If you include the `query` parameter, all other filter fields will be ignored. \nTo include the other filter fields, they must be included as part of the query used as the `query` value."},"reason":{"type":"array","items":{"type":"string"}},"searchAfter":{"type":"array","description":"Efficient next page, pass max sort value from previous page","items":{"type":"string"}},"searchAfterElastic":{"type":"array","description":"Efficient next page, pass max ES sort value from previous page","items":{"type":"string"}},"searchAfterMap":{"type":"object","description":"Map accounts search after values - stores next page sort values per account.\nThere is no need to store searchBeforeMap as [current page searchBefore] equals to [prev page searchAfter]\nMore, there is no way to generate correct searchBefore from current page as some tenants may not appear at all.\nThe map is relevant in proxy mode and used by tenants, each tenant extracts the searchAfter keys from the map.","additionalProperties":{"type":"array","items":{"type":"string"}}},"searchAfterMapOrder":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}},"searchBefore":{"type":"array","description":"Efficient prev page, pass min sort value from next page","items":{"type":"string"}},"searchBeforeElastic":{"type":"array","description":"Efficient prev page, pass min ES sort value from next page","items":{"type":"string"}},"size":{"type":"integer","description":"Size is limited to 1000, if not passed it defaults to 0, and no results will return","format":"int64"},"sort":{"type":"array","description":"The sort order","items":{"$ref":"#/components/schemas/Order"}},"status":{"type":"array","items":{"$ref":"#/components/schemas/IncidentStatus"}},"systems":{"type":"array","items":{"type":"string"}},"timeFrame":{"$ref":"#/components/schemas/Duration"},"toActivatedDate":{"type":"string","format":"date-time"},"toClosedDate":{"type":"string","format":"date-time"},"toDate":{"type":"string","format":"date-time"},"toDueDate":{"type":"string","format":"date-time"},"toReminder":{"type":"string","format":"date-time"},"totalOnly":{"type":"boolean"},"trim_events":{"type":"integer","format":"int64"},"type":{"type":"array","items":{"type":"string"}},"urls":{"type":"array","items":{"type":"string"}},"users":{"type":"array","items":{"type":"string"}}}},"Severity":{"type":"number","description":"Severity is the incident severity","format":"double","minimum":0,"multipleOf":4},"IncidentStatus":{"type":"number","description":"IncidentStatus is the status of the incident","format":"double","minimum":0,"maximum":2},"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"}}},"Order":{"type":"object","description":"Order struct holds a sort field and the direction of sorting","properties":{"asc":{"type":"boolean"},"field":{"type":"string"},"fieldType":{"type":"string"}}},"Duration":{"type":"integer","description":"A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.","format":"int64"},"IncidentSearchResponseWrapper":{"type":"object","description":"IncidentSearchResponseWrapper is an extension for the IncidentSearchResponse type, which holds list of IncidentWrapper(s)","properties":{"accountErrors":{"type":"array","items":{"type":"string"}},"data":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/IncidentWrapper"}},"notUpdated":{"type":"integer","format":"uint64"},"searchAfter":{"type":"array","items":{"type":"string"}},"searchAfterElastic":{"type":"array","items":{"type":"string"}},"searchBefore":{"type":"array","items":{"type":"string"}},"searchBeforeElastic":{"type":"array","items":{"type":"string"}},"total":{"type":"integer","format":"int64"},"totalAccounts":{"type":"integer","format":"int64"}}},"IncidentWrapper":{"type":"object","description":"IncidentWrapper is an extension of the Incident entity, which includes an additional field of changed-status for the web client","properties":{"ShardID":{"type":"integer","format":"int64"},"account":{"type":"string","description":"Account holds the tenant name so that slicing and dicing on the master can leverage bleve"},"activated":{"type":"string","description":"When was this activated","format":"date-time"},"activatingingUserId":{"type":"string","description":"The user that activated this investigation"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"attachment":{"type":"array","description":"Attachments","items":{"$ref":"#/components/schemas/Attachment"}},"autime":{"type":"integer","description":"AlmostUniqueTime is an attempt to have a unique sortable ID for an incident","format":"int64"},"cacheVersn":{"type":"integer","format":"int64"},"canvases":{"type":"array","description":"Canvases of the incident","items":{"type":"string"}},"category":{"type":"string","description":"Category"},"changeStatus":{"type":"string"},"closeNotes":{"type":"string","description":"Notes for closing the incident"},"closeReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"closed":{"type":"string","description":"When was this closed","format":"date-time"},"closingUserId":{"type":"string","description":"The user ID that closed this investigation"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"dbotCurrentDirtyFields":{"type":"array","description":"For mirroring, manage a list of current dirty fields so that we can send delta to outgoing integration","items":{"type":"string"}},"dbotDirtyFields":{"type":"array","description":"For mirroring, manage a list of dirty fields to not override them from the source of the incident","items":{"type":"string"}},"dbotMirrorDirection":{"type":"string","description":"DBotMirrorDirection of how to mirror the incident (in/out/both)"},"dbotMirrorId":{"type":"string","description":"DBotMirrorID of a remote system we are syncing with"},"dbotMirrorInstance":{"type":"string","description":"DBotMirrorInstance name of a mirror integration instance"},"dbotMirrorLastSync":{"type":"string","description":"The last time we synced this incident even if we did not update anything","format":"date-time"},"dbotMirrorTags":{"type":"array","description":"The entry tags I want to sync to remote system","items":{"type":"string"}},"details":{"type":"string","description":"The details of the incident - reason, etc."},"droppedCount":{"type":"integer","description":"DroppedCount ...","format":"int64"},"dueDate":{"type":"string","description":"SLA","format":"date-time"},"feedBased":{"type":"boolean","description":"If this incident was triggered by a feed job"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"insights":{"type":"integer","format":"uint64"},"investigationId":{"type":"string","description":"Investigation that was opened as a result of the incoming event"},"isDebug":{"type":"boolean","description":"IsDebug ..."},"isPlayground":{"type":"boolean","description":"IsPlayGround"},"labels":{"type":"array","description":"Labels related to incident - each label is composed of a type and value","items":{"$ref":"#/components/schemas/Label"}},"lastJobRunTime":{"type":"string","description":"If this incident was triggered by a job, this would be the time the **previous** job started","format":"date-time"},"lastOpen":{"type":"string","format":"date-time"},"linkedCount":{"type":"integer","description":"LinkedCount ...","format":"int64"},"linkedIncidents":{"type":"array","description":"LinkedIncidents incidents that were marked as linked by user","items":{"type":"string"}},"modified":{"type":"string","format":"date-time"},"name":{"type":"string","description":"Incident Name - given by user"},"notifyTime":{"type":"string","description":"Incdicates when last this field was changed with a value that supposed to send a notification","format":"date-time"},"numericId":{"type":"integer","format":"int64"},"occurred":{"type":"string","description":"When this incident has really occurred","format":"date-time"},"openDuration":{"type":"integer","description":"Duration incident was open","format":"int64"},"owner":{"type":"string","description":"The user who owns this incident"},"parent":{"type":"string","description":"Parent"},"phase":{"type":"string","description":"Phase"},"playbookId":{"type":"string","description":"The associated playbook for this incident"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"rawCategory":{"type":"string"},"rawCloseReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"rawJSON":{"type":"string"},"rawName":{"type":"string","description":"Incident RawName"},"rawPhase":{"type":"string","description":"RawPhase"},"rawType":{"type":"string","description":"Incident raw type"},"reason":{"type":"string","description":"The reason for the resolve"},"reminder":{"type":"string","description":"When if at all to send a reminder","format":"date-time"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"runStatus":{"$ref":"#/components/schemas/RunStatus"},"sequenceNumber":{"type":"integer","format":"int64"},"severity":{"$ref":"#/components/schemas/Severity"},"sizeInBytes":{"type":"integer","format":"int64"},"sla":{"$ref":"#/components/schemas/SLAState"},"sortValues":{"type":"array","items":{"type":"string"}},"sourceBrand":{"type":"string","description":"SourceBrand ..."},"sourceInstance":{"type":"string","description":"SourceInstance ..."},"status":{"$ref":"#/components/schemas/IncidentStatus"},"syncHash":{"type":"string"},"todoTaskIds":{"type":"array","description":"ToDoTaskIDs list of to do task ids","items":{"type":"string"}},"type":{"type":"string","description":"Incident type"},"version":{"type":"integer","format":"int64"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"Attachment":{"type":"object","title":"Attachment ...","properties":{"description":{"type":"string"},"isTempPath":{"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"},"showMediaFile":{"type":"boolean"},"type":{"type":"string"}}},"Label":{"type":"object","title":"Label ...","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"RunStatus":{"type":"string","description":"RunStatus of a job"},"SLAState":{"type":"number","description":"SLAState is the incident sla at closure time, in minutes.","format":"double"}}},"paths":{"/incident/batchClose":{"post":{"summary":"Batch close incidents","description":"Closes an incidents batch\nTo update incident custom fields you should lowercase them and remove all spaces. For example: Scan IP -> scanip\nTo get the actual key name you can also go to Cortex XSOAR CLI and run /incident_add and look for the key that you would like to update","operationId":"closeIncidentsBatch","requestBody":{"$ref":"#/components/requestBodies/UpdateDataBatch"},"responses":{"200":{"description":"IncidentSearchResponseWrapper","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentSearchResponseWrapper"}}}}},"tags":["Incidents"]}}}}
```

## Batch delete incidents

> Deletes an incidents batch

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incidents","description":"APIs for managing incidents"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"requestBodies":{"UpdateDataBatch":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDataBatch"}},"application/xml":{"schema":{"$ref":"#/components/schemas/UpdateDataBatch"}}}}},"schemas":{"UpdateDataBatch":{"type":"object","title":"UpdateDataBatch ...","properties":{"CustomFields":{"type":"object","additionalProperties":{"type":"object"}},"all":{"type":"boolean"},"closeNotes":{"type":"string"},"closeReason":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"data":{"type":"object","additionalProperties":{"type":"object"}},"filter":{"$ref":"#/components/schemas/IncidentFilter"},"force":{"type":"boolean"},"ids":{"type":"array","items":{"type":"string"}},"line":{"type":"string"},"originalIncidentId":{"type":"string"},"overrideInvestigation":{"type":"boolean"}}},"IncidentFilter":{"type":"object","title":"IncidentFilter allows for very simple filtering.","properties":{"Cache":{"type":"object","description":"Cache of join functions","additionalProperties":{"type":"array","items":{"type":"string"}}},"accounts":{"type":"object","additionalProperties":{"type":"object"}},"andOp":{"type":"boolean"},"category":{"type":"array","items":{"type":"string"}},"details":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"string"}},"filterobjectquery":{"type":"string"},"fromActivatedDate":{"type":"string","format":"date-time"},"fromClosedDate":{"type":"string","format":"date-time"},"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"fromDueDate":{"type":"string","format":"date-time"},"fromReminder":{"type":"string","format":"date-time"},"id":{"type":"array","items":{"type":"string"}},"ignoreWorkers":{"type":"boolean","description":"Do not use workers mechanism while searching bleve"},"includeTmp":{"type":"boolean"},"investigation":{"type":"array","items":{"type":"string"}},"level":{"type":"array","items":{"$ref":"#/components/schemas/Severity"}},"name":{"type":"array","items":{"type":"string"}},"notCategory":{"type":"array","items":{"type":"string"}},"notInvestigation":{"type":"array","items":{"type":"string"}},"notStatus":{"type":"array","items":{"$ref":"#/components/schemas/IncidentStatus"}},"page":{"type":"integer","description":"0-based page","format":"int64"},"parent":{"type":"array","items":{"type":"string"}},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string","description":"If you include the `query` parameter, all other filter fields will be ignored. \nTo include the other filter fields, they must be included as part of the query used as the `query` value."},"reason":{"type":"array","items":{"type":"string"}},"searchAfter":{"type":"array","description":"Efficient next page, pass max sort value from previous page","items":{"type":"string"}},"searchAfterElastic":{"type":"array","description":"Efficient next page, pass max ES sort value from previous page","items":{"type":"string"}},"searchAfterMap":{"type":"object","description":"Map accounts search after values - stores next page sort values per account.\nThere is no need to store searchBeforeMap as [current page searchBefore] equals to [prev page searchAfter]\nMore, there is no way to generate correct searchBefore from current page as some tenants may not appear at all.\nThe map is relevant in proxy mode and used by tenants, each tenant extracts the searchAfter keys from the map.","additionalProperties":{"type":"array","items":{"type":"string"}}},"searchAfterMapOrder":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}},"searchBefore":{"type":"array","description":"Efficient prev page, pass min sort value from next page","items":{"type":"string"}},"searchBeforeElastic":{"type":"array","description":"Efficient prev page, pass min ES sort value from next page","items":{"type":"string"}},"size":{"type":"integer","description":"Size is limited to 1000, if not passed it defaults to 0, and no results will return","format":"int64"},"sort":{"type":"array","description":"The sort order","items":{"$ref":"#/components/schemas/Order"}},"status":{"type":"array","items":{"$ref":"#/components/schemas/IncidentStatus"}},"systems":{"type":"array","items":{"type":"string"}},"timeFrame":{"$ref":"#/components/schemas/Duration"},"toActivatedDate":{"type":"string","format":"date-time"},"toClosedDate":{"type":"string","format":"date-time"},"toDate":{"type":"string","format":"date-time"},"toDueDate":{"type":"string","format":"date-time"},"toReminder":{"type":"string","format":"date-time"},"totalOnly":{"type":"boolean"},"trim_events":{"type":"integer","format":"int64"},"type":{"type":"array","items":{"type":"string"}},"urls":{"type":"array","items":{"type":"string"}},"users":{"type":"array","items":{"type":"string"}}}},"Severity":{"type":"number","description":"Severity is the incident severity","format":"double","minimum":0,"multipleOf":4},"IncidentStatus":{"type":"number","description":"IncidentStatus is the status of the incident","format":"double","minimum":0,"maximum":2},"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"}}},"Order":{"type":"object","description":"Order struct holds a sort field and the direction of sorting","properties":{"asc":{"type":"boolean"},"field":{"type":"string"},"fieldType":{"type":"string"}}},"Duration":{"type":"integer","description":"A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.","format":"int64"},"IncidentSearchResponseWrapper":{"type":"object","description":"IncidentSearchResponseWrapper is an extension for the IncidentSearchResponse type, which holds list of IncidentWrapper(s)","properties":{"accountErrors":{"type":"array","items":{"type":"string"}},"data":{"type":"array","description":"in: body","items":{"$ref":"#/components/schemas/IncidentWrapper"}},"notUpdated":{"type":"integer","format":"uint64"},"searchAfter":{"type":"array","items":{"type":"string"}},"searchAfterElastic":{"type":"array","items":{"type":"string"}},"searchBefore":{"type":"array","items":{"type":"string"}},"searchBeforeElastic":{"type":"array","items":{"type":"string"}},"total":{"type":"integer","format":"int64"},"totalAccounts":{"type":"integer","format":"int64"}}},"IncidentWrapper":{"type":"object","description":"IncidentWrapper is an extension of the Incident entity, which includes an additional field of changed-status for the web client","properties":{"ShardID":{"type":"integer","format":"int64"},"account":{"type":"string","description":"Account holds the tenant name so that slicing and dicing on the master can leverage bleve"},"activated":{"type":"string","description":"When was this activated","format":"date-time"},"activatingingUserId":{"type":"string","description":"The user that activated this investigation"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"attachment":{"type":"array","description":"Attachments","items":{"$ref":"#/components/schemas/Attachment"}},"autime":{"type":"integer","description":"AlmostUniqueTime is an attempt to have a unique sortable ID for an incident","format":"int64"},"cacheVersn":{"type":"integer","format":"int64"},"canvases":{"type":"array","description":"Canvases of the incident","items":{"type":"string"}},"category":{"type":"string","description":"Category"},"changeStatus":{"type":"string"},"closeNotes":{"type":"string","description":"Notes for closing the incident"},"closeReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"closed":{"type":"string","description":"When was this closed","format":"date-time"},"closingUserId":{"type":"string","description":"The user ID that closed this investigation"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"dbotCurrentDirtyFields":{"type":"array","description":"For mirroring, manage a list of current dirty fields so that we can send delta to outgoing integration","items":{"type":"string"}},"dbotDirtyFields":{"type":"array","description":"For mirroring, manage a list of dirty fields to not override them from the source of the incident","items":{"type":"string"}},"dbotMirrorDirection":{"type":"string","description":"DBotMirrorDirection of how to mirror the incident (in/out/both)"},"dbotMirrorId":{"type":"string","description":"DBotMirrorID of a remote system we are syncing with"},"dbotMirrorInstance":{"type":"string","description":"DBotMirrorInstance name of a mirror integration instance"},"dbotMirrorLastSync":{"type":"string","description":"The last time we synced this incident even if we did not update anything","format":"date-time"},"dbotMirrorTags":{"type":"array","description":"The entry tags I want to sync to remote system","items":{"type":"string"}},"details":{"type":"string","description":"The details of the incident - reason, etc."},"droppedCount":{"type":"integer","description":"DroppedCount ...","format":"int64"},"dueDate":{"type":"string","description":"SLA","format":"date-time"},"feedBased":{"type":"boolean","description":"If this incident was triggered by a feed job"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"insights":{"type":"integer","format":"uint64"},"investigationId":{"type":"string","description":"Investigation that was opened as a result of the incoming event"},"isDebug":{"type":"boolean","description":"IsDebug ..."},"isPlayground":{"type":"boolean","description":"IsPlayGround"},"labels":{"type":"array","description":"Labels related to incident - each label is composed of a type and value","items":{"$ref":"#/components/schemas/Label"}},"lastJobRunTime":{"type":"string","description":"If this incident was triggered by a job, this would be the time the **previous** job started","format":"date-time"},"lastOpen":{"type":"string","format":"date-time"},"linkedCount":{"type":"integer","description":"LinkedCount ...","format":"int64"},"linkedIncidents":{"type":"array","description":"LinkedIncidents incidents that were marked as linked by user","items":{"type":"string"}},"modified":{"type":"string","format":"date-time"},"name":{"type":"string","description":"Incident Name - given by user"},"notifyTime":{"type":"string","description":"Incdicates when last this field was changed with a value that supposed to send a notification","format":"date-time"},"numericId":{"type":"integer","format":"int64"},"occurred":{"type":"string","description":"When this incident has really occurred","format":"date-time"},"openDuration":{"type":"integer","description":"Duration incident was open","format":"int64"},"owner":{"type":"string","description":"The user who owns this incident"},"parent":{"type":"string","description":"Parent"},"phase":{"type":"string","description":"Phase"},"playbookId":{"type":"string","description":"The associated playbook for this incident"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"rawCategory":{"type":"string"},"rawCloseReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"rawJSON":{"type":"string"},"rawName":{"type":"string","description":"Incident RawName"},"rawPhase":{"type":"string","description":"RawPhase"},"rawType":{"type":"string","description":"Incident raw type"},"reason":{"type":"string","description":"The reason for the resolve"},"reminder":{"type":"string","description":"When if at all to send a reminder","format":"date-time"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"runStatus":{"$ref":"#/components/schemas/RunStatus"},"sequenceNumber":{"type":"integer","format":"int64"},"severity":{"$ref":"#/components/schemas/Severity"},"sizeInBytes":{"type":"integer","format":"int64"},"sla":{"$ref":"#/components/schemas/SLAState"},"sortValues":{"type":"array","items":{"type":"string"}},"sourceBrand":{"type":"string","description":"SourceBrand ..."},"sourceInstance":{"type":"string","description":"SourceInstance ..."},"status":{"$ref":"#/components/schemas/IncidentStatus"},"syncHash":{"type":"string"},"todoTaskIds":{"type":"array","description":"ToDoTaskIDs list of to do task ids","items":{"type":"string"}},"type":{"type":"string","description":"Incident type"},"version":{"type":"integer","format":"int64"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"Attachment":{"type":"object","title":"Attachment ...","properties":{"description":{"type":"string"},"isTempPath":{"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"},"showMediaFile":{"type":"boolean"},"type":{"type":"string"}}},"Label":{"type":"object","title":"Label ...","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"RunStatus":{"type":"string","description":"RunStatus of a job"},"SLAState":{"type":"number","description":"SLAState is the incident sla at closure time, in minutes.","format":"double"}}},"paths":{"/incident/batchDelete":{"post":{"summary":"Batch delete incidents","description":"Deletes an incidents batch","operationId":"deleteIncidentsBatch","requestBody":{"$ref":"#/components/requestBodies/UpdateDataBatch"},"responses":{"200":{"description":"IncidentSearchResponseWrapper","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentSearchResponseWrapper"}}}}},"tags":["Incidents"]}}}}
```

## Get incident as CSV

> Get an incident CSV file that was exported, by ID

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incidents","description":"APIs for managing incidents"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}}},"paths":{"/incident/csv/{id}":{"get":{"summary":"Get incident as CSV","description":"Get an incident CSV file that was exported, by ID","operationId":"getIncidentAsCsv","parameters":[{"name":"id","in":"path","description":"CSV file to fetch (returned from batch export to csv call)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Return Csv file"}},"tags":["Incidents"]}}}}
```

## Create incident from JSON

> Create single incident from raw JSON, builds incident according to default mapping

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incidents","description":"APIs for managing incidents"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"IncidentWrapper":{"type":"object","description":"IncidentWrapper is an extension of the Incident entity, which includes an additional field of changed-status for the web client","properties":{"ShardID":{"type":"integer","format":"int64"},"account":{"type":"string","description":"Account holds the tenant name so that slicing and dicing on the master can leverage bleve"},"activated":{"type":"string","description":"When was this activated","format":"date-time"},"activatingingUserId":{"type":"string","description":"The user that activated this investigation"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"attachment":{"type":"array","description":"Attachments","items":{"$ref":"#/components/schemas/Attachment"}},"autime":{"type":"integer","description":"AlmostUniqueTime is an attempt to have a unique sortable ID for an incident","format":"int64"},"cacheVersn":{"type":"integer","format":"int64"},"canvases":{"type":"array","description":"Canvases of the incident","items":{"type":"string"}},"category":{"type":"string","description":"Category"},"changeStatus":{"type":"string"},"closeNotes":{"type":"string","description":"Notes for closing the incident"},"closeReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"closed":{"type":"string","description":"When was this closed","format":"date-time"},"closingUserId":{"type":"string","description":"The user ID that closed this investigation"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"dbotCurrentDirtyFields":{"type":"array","description":"For mirroring, manage a list of current dirty fields so that we can send delta to outgoing integration","items":{"type":"string"}},"dbotDirtyFields":{"type":"array","description":"For mirroring, manage a list of dirty fields to not override them from the source of the incident","items":{"type":"string"}},"dbotMirrorDirection":{"type":"string","description":"DBotMirrorDirection of how to mirror the incident (in/out/both)"},"dbotMirrorId":{"type":"string","description":"DBotMirrorID of a remote system we are syncing with"},"dbotMirrorInstance":{"type":"string","description":"DBotMirrorInstance name of a mirror integration instance"},"dbotMirrorLastSync":{"type":"string","description":"The last time we synced this incident even if we did not update anything","format":"date-time"},"dbotMirrorTags":{"type":"array","description":"The entry tags I want to sync to remote system","items":{"type":"string"}},"details":{"type":"string","description":"The details of the incident - reason, etc."},"droppedCount":{"type":"integer","description":"DroppedCount ...","format":"int64"},"dueDate":{"type":"string","description":"SLA","format":"date-time"},"feedBased":{"type":"boolean","description":"If this incident was triggered by a feed job"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"insights":{"type":"integer","format":"uint64"},"investigationId":{"type":"string","description":"Investigation that was opened as a result of the incoming event"},"isDebug":{"type":"boolean","description":"IsDebug ..."},"isPlayground":{"type":"boolean","description":"IsPlayGround"},"labels":{"type":"array","description":"Labels related to incident - each label is composed of a type and value","items":{"$ref":"#/components/schemas/Label"}},"lastJobRunTime":{"type":"string","description":"If this incident was triggered by a job, this would be the time the **previous** job started","format":"date-time"},"lastOpen":{"type":"string","format":"date-time"},"linkedCount":{"type":"integer","description":"LinkedCount ...","format":"int64"},"linkedIncidents":{"type":"array","description":"LinkedIncidents incidents that were marked as linked by user","items":{"type":"string"}},"modified":{"type":"string","format":"date-time"},"name":{"type":"string","description":"Incident Name - given by user"},"notifyTime":{"type":"string","description":"Incdicates when last this field was changed with a value that supposed to send a notification","format":"date-time"},"numericId":{"type":"integer","format":"int64"},"occurred":{"type":"string","description":"When this incident has really occurred","format":"date-time"},"openDuration":{"type":"integer","description":"Duration incident was open","format":"int64"},"owner":{"type":"string","description":"The user who owns this incident"},"parent":{"type":"string","description":"Parent"},"phase":{"type":"string","description":"Phase"},"playbookId":{"type":"string","description":"The associated playbook for this incident"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"rawCategory":{"type":"string"},"rawCloseReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"rawJSON":{"type":"string"},"rawName":{"type":"string","description":"Incident RawName"},"rawPhase":{"type":"string","description":"RawPhase"},"rawType":{"type":"string","description":"Incident raw type"},"reason":{"type":"string","description":"The reason for the resolve"},"reminder":{"type":"string","description":"When if at all to send a reminder","format":"date-time"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"runStatus":{"$ref":"#/components/schemas/RunStatus"},"sequenceNumber":{"type":"integer","format":"int64"},"severity":{"$ref":"#/components/schemas/Severity"},"sizeInBytes":{"type":"integer","format":"int64"},"sla":{"$ref":"#/components/schemas/SLAState"},"sortValues":{"type":"array","items":{"type":"string"}},"sourceBrand":{"type":"string","description":"SourceBrand ..."},"sourceInstance":{"type":"string","description":"SourceInstance ..."},"status":{"$ref":"#/components/schemas/IncidentStatus"},"syncHash":{"type":"string"},"todoTaskIds":{"type":"array","description":"ToDoTaskIDs list of to do task ids","items":{"type":"string"}},"type":{"type":"string","description":"Incident type"},"version":{"type":"integer","format":"int64"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"Attachment":{"type":"object","title":"Attachment ...","properties":{"description":{"type":"string"},"isTempPath":{"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"},"showMediaFile":{"type":"boolean"},"type":{"type":"string"}}},"Label":{"type":"object","title":"Label ...","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"RunStatus":{"type":"string","description":"RunStatus of a job"},"Severity":{"type":"number","description":"Severity is the incident severity","format":"double","minimum":0,"multipleOf":4},"SLAState":{"type":"number","description":"SLAState is the incident sla at closure time, in minutes.","format":"double"},"IncidentStatus":{"type":"number","description":"IncidentStatus is the status of the incident","format":"double","minimum":0,"maximum":2}}},"paths":{"/incident/json":{"post":{"summary":"Create incident from JSON","description":"Create single incident from raw JSON, builds incident according to default mapping","operationId":"createIncidentJson","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentWrapper"}}}}},"tags":["Incidents"]}}}}
```

## POST /incident/upload/{id}

> Add file attachement to an incidents

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incidents","description":"APIs for managing incidents"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"IncidentWrapper":{"type":"object","description":"IncidentWrapper is an extension of the Incident entity, which includes an additional field of changed-status for the web client","properties":{"ShardID":{"type":"integer","format":"int64"},"account":{"type":"string","description":"Account holds the tenant name so that slicing and dicing on the master can leverage bleve"},"activated":{"type":"string","description":"When was this activated","format":"date-time"},"activatingingUserId":{"type":"string","description":"The user that activated this investigation"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"attachment":{"type":"array","description":"Attachments","items":{"$ref":"#/components/schemas/Attachment"}},"autime":{"type":"integer","description":"AlmostUniqueTime is an attempt to have a unique sortable ID for an incident","format":"int64"},"cacheVersn":{"type":"integer","format":"int64"},"canvases":{"type":"array","description":"Canvases of the incident","items":{"type":"string"}},"category":{"type":"string","description":"Category"},"changeStatus":{"type":"string"},"closeNotes":{"type":"string","description":"Notes for closing the incident"},"closeReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"closed":{"type":"string","description":"When was this closed","format":"date-time"},"closingUserId":{"type":"string","description":"The user ID that closed this investigation"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"dbotCurrentDirtyFields":{"type":"array","description":"For mirroring, manage a list of current dirty fields so that we can send delta to outgoing integration","items":{"type":"string"}},"dbotDirtyFields":{"type":"array","description":"For mirroring, manage a list of dirty fields to not override them from the source of the incident","items":{"type":"string"}},"dbotMirrorDirection":{"type":"string","description":"DBotMirrorDirection of how to mirror the incident (in/out/both)"},"dbotMirrorId":{"type":"string","description":"DBotMirrorID of a remote system we are syncing with"},"dbotMirrorInstance":{"type":"string","description":"DBotMirrorInstance name of a mirror integration instance"},"dbotMirrorLastSync":{"type":"string","description":"The last time we synced this incident even if we did not update anything","format":"date-time"},"dbotMirrorTags":{"type":"array","description":"The entry tags I want to sync to remote system","items":{"type":"string"}},"details":{"type":"string","description":"The details of the incident - reason, etc."},"droppedCount":{"type":"integer","description":"DroppedCount ...","format":"int64"},"dueDate":{"type":"string","description":"SLA","format":"date-time"},"feedBased":{"type":"boolean","description":"If this incident was triggered by a feed job"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"insights":{"type":"integer","format":"uint64"},"investigationId":{"type":"string","description":"Investigation that was opened as a result of the incoming event"},"isDebug":{"type":"boolean","description":"IsDebug ..."},"isPlayground":{"type":"boolean","description":"IsPlayGround"},"labels":{"type":"array","description":"Labels related to incident - each label is composed of a type and value","items":{"$ref":"#/components/schemas/Label"}},"lastJobRunTime":{"type":"string","description":"If this incident was triggered by a job, this would be the time the **previous** job started","format":"date-time"},"lastOpen":{"type":"string","format":"date-time"},"linkedCount":{"type":"integer","description":"LinkedCount ...","format":"int64"},"linkedIncidents":{"type":"array","description":"LinkedIncidents incidents that were marked as linked by user","items":{"type":"string"}},"modified":{"type":"string","format":"date-time"},"name":{"type":"string","description":"Incident Name - given by user"},"notifyTime":{"type":"string","description":"Incdicates when last this field was changed with a value that supposed to send a notification","format":"date-time"},"numericId":{"type":"integer","format":"int64"},"occurred":{"type":"string","description":"When this incident has really occurred","format":"date-time"},"openDuration":{"type":"integer","description":"Duration incident was open","format":"int64"},"owner":{"type":"string","description":"The user who owns this incident"},"parent":{"type":"string","description":"Parent"},"phase":{"type":"string","description":"Phase"},"playbookId":{"type":"string","description":"The associated playbook for this incident"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"rawCategory":{"type":"string"},"rawCloseReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"rawJSON":{"type":"string"},"rawName":{"type":"string","description":"Incident RawName"},"rawPhase":{"type":"string","description":"RawPhase"},"rawType":{"type":"string","description":"Incident raw type"},"reason":{"type":"string","description":"The reason for the resolve"},"reminder":{"type":"string","description":"When if at all to send a reminder","format":"date-time"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"runStatus":{"$ref":"#/components/schemas/RunStatus"},"sequenceNumber":{"type":"integer","format":"int64"},"severity":{"$ref":"#/components/schemas/Severity"},"sizeInBytes":{"type":"integer","format":"int64"},"sla":{"$ref":"#/components/schemas/SLAState"},"sortValues":{"type":"array","items":{"type":"string"}},"sourceBrand":{"type":"string","description":"SourceBrand ..."},"sourceInstance":{"type":"string","description":"SourceInstance ..."},"status":{"$ref":"#/components/schemas/IncidentStatus"},"syncHash":{"type":"string"},"todoTaskIds":{"type":"array","description":"ToDoTaskIDs list of to do task ids","items":{"type":"string"}},"type":{"type":"string","description":"Incident type"},"version":{"type":"integer","format":"int64"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"Attachment":{"type":"object","title":"Attachment ...","properties":{"description":{"type":"string"},"isTempPath":{"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"},"showMediaFile":{"type":"boolean"},"type":{"type":"string"}}},"Label":{"type":"object","title":"Label ...","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"RunStatus":{"type":"string","description":"RunStatus of a job"},"Severity":{"type":"number","description":"Severity is the incident severity","format":"double","minimum":0,"multipleOf":4},"SLAState":{"type":"number","description":"SLAState is the incident sla at closure time, in minutes.","format":"double"},"IncidentStatus":{"type":"number","description":"IncidentStatus is the status of the incident","format":"double","minimum":0,"maximum":2}}},"paths":{"/incident/upload/{id}":{"post":{"description":"Add file attachement to an incidents","operationId":"incidentFileUpload","parameters":[{"name":"id","in":"path","description":"Incident id to update","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"fileName":{"description":"file name","type":"string"},"fileComment":{"description":"file comment","type":"string"},"field":{"description":"field name to hold the attachment details. If not specified, `attachment` will be used.","type":"string"},"showMediaFile":{"description":"show media file","type":"boolean"},"last":{"description":"If set to true will create an investigation. Used for uploading after creating incident.","type":"boolean"},"file":{"description":"file","type":"string"}}}}}},"responses":{"200":{"description":"IncidentWrapper","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentWrapper"}}}}},"tags":["Incidents"]}}}}
```

## Search incidents by filter

> Search incidents across all indices. You can filter by multiple options.> \\
>
> \
> \*\*Note:\*\* You cannot paginate results in a multi-tenant environment.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incidents","description":"APIs for managing incidents"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"SearchIncidentsData":{"type":"object","title":"SearchIncidentsData ...","properties":{"filter":{"$ref":"#/components/schemas/IncidentFilter"},"userFilter":{"type":"boolean"}}},"IncidentFilter":{"type":"object","title":"IncidentFilter allows for very simple filtering.","properties":{"Cache":{"type":"object","description":"Cache of join functions","additionalProperties":{"type":"array","items":{"type":"string"}}},"accounts":{"type":"object","additionalProperties":{"type":"object"}},"andOp":{"type":"boolean"},"category":{"type":"array","items":{"type":"string"}},"details":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"type":"string"}},"filterobjectquery":{"type":"string"},"fromActivatedDate":{"type":"string","format":"date-time"},"fromClosedDate":{"type":"string","format":"date-time"},"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"fromDueDate":{"type":"string","format":"date-time"},"fromReminder":{"type":"string","format":"date-time"},"id":{"type":"array","items":{"type":"string"}},"ignoreWorkers":{"type":"boolean","description":"Do not use workers mechanism while searching bleve"},"includeTmp":{"type":"boolean"},"investigation":{"type":"array","items":{"type":"string"}},"level":{"type":"array","items":{"$ref":"#/components/schemas/Severity"}},"name":{"type":"array","items":{"type":"string"}},"notCategory":{"type":"array","items":{"type":"string"}},"notInvestigation":{"type":"array","items":{"type":"string"}},"notStatus":{"type":"array","items":{"$ref":"#/components/schemas/IncidentStatus"}},"page":{"type":"integer","description":"0-based page","format":"int64"},"parent":{"type":"array","items":{"type":"string"}},"period":{"$ref":"#/components/schemas/Period"},"query":{"type":"string","description":"If you include the `query` parameter, all other filter fields will be ignored. \nTo include the other filter fields, they must be included as part of the query used as the `query` value."},"reason":{"type":"array","items":{"type":"string"}},"searchAfter":{"type":"array","description":"Efficient next page, pass max sort value from previous page","items":{"type":"string"}},"searchAfterElastic":{"type":"array","description":"Efficient next page, pass max ES sort value from previous page","items":{"type":"string"}},"searchAfterMap":{"type":"object","description":"Map accounts search after values - stores next page sort values per account.\nThere is no need to store searchBeforeMap as [current page searchBefore] equals to [prev page searchAfter]\nMore, there is no way to generate correct searchBefore from current page as some tenants may not appear at all.\nThe map is relevant in proxy mode and used by tenants, each tenant extracts the searchAfter keys from the map.","additionalProperties":{"type":"array","items":{"type":"string"}}},"searchAfterMapOrder":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}},"searchBefore":{"type":"array","description":"Efficient prev page, pass min sort value from next page","items":{"type":"string"}},"searchBeforeElastic":{"type":"array","description":"Efficient prev page, pass min ES sort value from next page","items":{"type":"string"}},"size":{"type":"integer","description":"Size is limited to 1000, if not passed it defaults to 0, and no results will return","format":"int64"},"sort":{"type":"array","description":"The sort order","items":{"$ref":"#/components/schemas/Order"}},"status":{"type":"array","items":{"$ref":"#/components/schemas/IncidentStatus"}},"systems":{"type":"array","items":{"type":"string"}},"timeFrame":{"$ref":"#/components/schemas/Duration"},"toActivatedDate":{"type":"string","format":"date-time"},"toClosedDate":{"type":"string","format":"date-time"},"toDate":{"type":"string","format":"date-time"},"toDueDate":{"type":"string","format":"date-time"},"toReminder":{"type":"string","format":"date-time"},"totalOnly":{"type":"boolean"},"trim_events":{"type":"integer","format":"int64"},"type":{"type":"array","items":{"type":"string"}},"urls":{"type":"array","items":{"type":"string"}},"users":{"type":"array","items":{"type":"string"}}}},"Severity":{"type":"number","description":"Severity is the incident severity","format":"double","minimum":0,"multipleOf":4},"IncidentStatus":{"type":"number","description":"IncidentStatus is the status of the incident","format":"double","minimum":0,"maximum":2},"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"}}},"Order":{"type":"object","description":"Order struct holds a sort field and the direction of sorting","properties":{"asc":{"type":"boolean"},"field":{"type":"string"},"fieldType":{"type":"string"}}},"Duration":{"type":"integer","description":"A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.","format":"int64"},"Incident":{"type":"object","title":"Incident details.","description":"An incident can be manually opened algorithmically or arrive from an external source like SIEM.\nNote: CustomFields (an optional generic object type) is missing from swagger properties definition.","properties":{"ShardID":{"type":"integer","format":"int64"},"account":{"type":"string","description":"Account holds the tenant name so that slicing and dicing on the master can leverage bleve"},"activated":{"type":"string","description":"When was this activated","format":"date-time"},"activatingingUserId":{"type":"string","description":"The user that activated this investigation"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"attachment":{"type":"array","description":"Attachments","items":{"$ref":"#/components/schemas/Attachment"}},"autime":{"type":"integer","description":"AlmostUniqueTime is an attempt to have a unique sortable ID for an incident","format":"int64"},"cacheVersn":{"type":"integer","format":"int64"},"canvases":{"type":"array","description":"Canvases of the incident","items":{"type":"string"}},"category":{"type":"string","description":"Category"},"closeNotes":{"type":"string","description":"Notes for closing the incident"},"closeReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"closed":{"type":"string","description":"When was this closed","format":"date-time"},"closingUserId":{"type":"string","description":"The user ID that closed this investigation"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"dbotCurrentDirtyFields":{"type":"array","description":"For mirroring, manage a list of current dirty fields so that we can send delta to outgoing integration","items":{"type":"string"}},"dbotDirtyFields":{"type":"array","description":"For mirroring, manage a list of dirty fields to not override them from the source of the incident","items":{"type":"string"}},"dbotMirrorDirection":{"type":"string","description":"DBotMirrorDirection of how to mirror the incident (in/out/both)"},"dbotMirrorId":{"type":"string","description":"DBotMirrorID of a remote system we are syncing with"},"dbotMirrorInstance":{"type":"string","description":"DBotMirrorInstance name of a mirror integration instance"},"dbotMirrorLastSync":{"type":"string","description":"The last time we synced this incident even if we did not update anything","format":"date-time"},"dbotMirrorTags":{"type":"array","description":"The entry tags I want to sync to remote system","items":{"type":"string"}},"details":{"type":"string","description":"The details of the incident - reason, etc."},"droppedCount":{"type":"integer","description":"DroppedCount ...","format":"int64"},"dueDate":{"type":"string","description":"SLA","format":"date-time"},"feedBased":{"type":"boolean","description":"If this incident was triggered by a feed job"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"investigationId":{"type":"string","description":"Investigation that was opened as a result of the incoming event"},"isDebug":{"type":"boolean","description":"IsDebug ..."},"isPlayground":{"type":"boolean","description":"IsPlayGround"},"labels":{"type":"array","description":"Labels related to incident - each label is composed of a type and value","items":{"$ref":"#/components/schemas/Label"}},"lastJobRunTime":{"type":"string","description":"If this incident was triggered by a job, this would be the time the **previous** job started","format":"date-time"},"lastOpen":{"type":"string","format":"date-time"},"linkedCount":{"type":"integer","description":"LinkedCount ...","format":"int64"},"linkedIncidents":{"type":"array","description":"LinkedIncidents incidents that were marked as linked by user","items":{"type":"string"}},"modified":{"type":"string","format":"date-time"},"name":{"type":"string","description":"Incident Name - given by user"},"notifyTime":{"type":"string","description":"Incdicates when last this field was changed with a value that supposed to send a notification","format":"date-time"},"numericId":{"type":"integer","format":"int64"},"occurred":{"type":"string","description":"When this incident has really occurred","format":"date-time"},"openDuration":{"type":"integer","description":"Duration incident was open","format":"int64"},"owner":{"type":"string","description":"The user who owns this incident"},"parent":{"type":"string","description":"Parent"},"phase":{"type":"string","description":"Phase"},"playbookId":{"type":"string","description":"The associated playbook for this incident"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"rawCategory":{"type":"string"},"rawCloseReason":{"type":"string","description":"The reason for closing the incident (select from existing predefined values)"},"rawJSON":{"type":"string"},"rawName":{"type":"string","description":"Incident RawName"},"rawPhase":{"type":"string","description":"RawPhase"},"rawType":{"type":"string","description":"Incident raw type"},"reason":{"type":"string","description":"The reason for the resolve"},"reminder":{"type":"string","description":"When if at all to send a reminder","format":"date-time"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"runStatus":{"$ref":"#/components/schemas/RunStatus"},"sequenceNumber":{"type":"integer","format":"int64"},"severity":{"$ref":"#/components/schemas/Severity"},"sizeInBytes":{"type":"integer","format":"int64"},"sla":{"$ref":"#/components/schemas/SLAState"},"sortValues":{"type":"array","items":{"type":"string"}},"sourceBrand":{"type":"string","description":"SourceBrand ..."},"sourceInstance":{"type":"string","description":"SourceInstance ..."},"status":{"$ref":"#/components/schemas/IncidentStatus"},"syncHash":{"type":"string"},"todoTaskIds":{"type":"array","description":"ToDoTaskIDs list of to do task ids","items":{"type":"string"}},"type":{"type":"string","description":"Incident type"},"version":{"type":"integer","format":"int64"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"Attachment":{"type":"object","title":"Attachment ...","properties":{"description":{"type":"string"},"isTempPath":{"type":"boolean"},"name":{"type":"string"},"path":{"type":"string"},"showMediaFile":{"type":"boolean"},"type":{"type":"string"}}},"Label":{"type":"object","title":"Label ...","properties":{"type":{"type":"string"},"value":{"type":"string"}}},"RunStatus":{"type":"string","description":"RunStatus of a job"},"SLAState":{"type":"number","description":"SLAState is the incident sla at closure time, in minutes.","format":"double"}}},"paths":{"/incidents/search":{"post":{"summary":"Search incidents by filter","description":"Search incidents across all indices. You can filter by multiple options.\r\n\r\n**Note:** You cannot paginate results in a multi-tenant environment.","operationId":"searchIncidents","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchIncidentsData"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SearchIncidentsData"}}},"required":true},"responses":{"200":{"description":"incidentSearchResponse","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Incident"}},"total":{"type":"integer"}}}}}}},"tags":["Incidents"]}}}}
```

## Create new Incident Type

> API to create new Incident Type

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incidents","description":"APIs for managing incidents"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"IncidentType":{"type":"object","title":"IncidentType ...","properties":{"autorun":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"closureScript":{"type":"string"},"color":{"type":"string"},"commitMessage":{"type":"string"},"created":{"type":"string","format":"date-time"},"days":{"type":"integer","format":"int64"},"daysR":{"type":"integer","format":"int64"},"default":{"type":"boolean"},"definitionId":{"type":"string"},"detached":{"type":"boolean"},"disabled":{"type":"boolean"},"extractSettings":{"$ref":"#/components/schemas/IncidentTypeExtractSettings"},"fromServerVersion":{"$ref":"#/components/schemas/Version"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"hours":{"type":"integer","format":"int64"},"hoursR":{"type":"integer","format":"int64"},"id":{"type":"string"},"indexName":{"type":"string"},"itemVersion":{"$ref":"#/components/schemas/Version"},"layout":{"type":"string"},"locked":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"onChangeRepAlg":{"$ref":"#/components/schemas/ReputationCalcAlg"},"packID":{"type":"string"},"packName":{"type":"string"},"packPropagationLabels":{"type":"array","items":{"type":"string"}},"playbookId":{"type":"string"},"preProcessingScript":{"type":"string"},"prevName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"propagationLabels":{"type":"array","items":{"type":"string"}},"readonly":{"type":"boolean"},"remote":{"type":"boolean"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"sequenceNumber":{"type":"integer","format":"int64"},"shouldCommit":{"type":"boolean"},"sizeInBytes":{"type":"integer","format":"int64"},"sla":{"type":"integer","format":"int64"},"slaReminder":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"system":{"type":"boolean"},"toServerVersion":{"$ref":"#/components/schemas/Version"},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"version":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"},"weeksR":{"type":"integer","format":"int64"}}},"IncidentTypeExtractSettings":{"type":"object","title":"IncidentTypeExtractSettings ...","properties":{"fieldCliNameToExtractSettings":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldExtractSetting"}},"mode":{"$ref":"#/components/schemas/ExtractSettingsMode"}}},"FieldExtractSetting":{"type":"object","title":"FieldExtractSetting ...","properties":{"extractAsIsIndicatorTypeId":{"type":"string"},"extractIndicatorTypesIDs":{"type":"array","items":{"type":"string"}},"isExtractingAllIndicatorTypes":{"type":"boolean"}}},"ExtractSettingsMode":{"type":"string","title":"ExtractSettingsMode ..."},"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"}}},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"}}},"paths":{"/incidenttype":{"post":{"summary":"Create new Incident Type","description":"API to create new Incident Type","operationId":"createOrUpdateIncidentType","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentType"}},"application/xml":{"schema":{"$ref":"#/components/schemas/IncidentType"}}}},"responses":{"200":{"description":"IncidentType","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentType"}}}}},"tags":["Incidents"]}}}}
```

## Import an incident type

> Import an incident type to Cortex XSOAR.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incidents","description":"APIs for managing incidents"}],"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":{"incidentTypesWithErrors":{"type":"object","properties":{"error":{"type":"string"},"incidentTypes":{"type":"array","items":{"$ref":"#/components/schemas/IncidentType"}}}},"IncidentType":{"type":"object","title":"IncidentType ...","properties":{"autorun":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"closureScript":{"type":"string"},"color":{"type":"string"},"commitMessage":{"type":"string"},"created":{"type":"string","format":"date-time"},"days":{"type":"integer","format":"int64"},"daysR":{"type":"integer","format":"int64"},"default":{"type":"boolean"},"definitionId":{"type":"string"},"detached":{"type":"boolean"},"disabled":{"type":"boolean"},"extractSettings":{"$ref":"#/components/schemas/IncidentTypeExtractSettings"},"fromServerVersion":{"$ref":"#/components/schemas/Version"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"hours":{"type":"integer","format":"int64"},"hoursR":{"type":"integer","format":"int64"},"id":{"type":"string"},"indexName":{"type":"string"},"itemVersion":{"$ref":"#/components/schemas/Version"},"layout":{"type":"string"},"locked":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"onChangeRepAlg":{"$ref":"#/components/schemas/ReputationCalcAlg"},"packID":{"type":"string"},"packName":{"type":"string"},"packPropagationLabels":{"type":"array","items":{"type":"string"}},"playbookId":{"type":"string"},"preProcessingScript":{"type":"string"},"prevName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"propagationLabels":{"type":"array","items":{"type":"string"}},"readonly":{"type":"boolean"},"remote":{"type":"boolean"},"reputationCalc":{"$ref":"#/components/schemas/ReputationCalcAlg"},"sequenceNumber":{"type":"integer","format":"int64"},"shouldCommit":{"type":"boolean"},"sizeInBytes":{"type":"integer","format":"int64"},"sla":{"type":"integer","format":"int64"},"slaReminder":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"system":{"type":"boolean"},"toServerVersion":{"$ref":"#/components/schemas/Version"},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"version":{"type":"integer","format":"int64"},"weeks":{"type":"integer","format":"int64"},"weeksR":{"type":"integer","format":"int64"}}},"IncidentTypeExtractSettings":{"type":"object","title":"IncidentTypeExtractSettings ...","properties":{"fieldCliNameToExtractSettings":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldExtractSetting"}},"mode":{"$ref":"#/components/schemas/ExtractSettingsMode"}}},"FieldExtractSetting":{"type":"object","title":"FieldExtractSetting ...","properties":{"extractAsIsIndicatorTypeId":{"type":"string"},"extractIndicatorTypesIDs":{"type":"array","items":{"type":"string"}},"isExtractingAllIndicatorTypes":{"type":"boolean"}}},"ExtractSettingsMode":{"type":"string","title":"ExtractSettingsMode ..."},"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"}}},"ReputationCalcAlg":{"type":"number","title":"ReputationCalcAlg ...","format":"double"}}},"paths":{"/incidenttypes/import":{"post":{"summary":"Import an incident type","description":"Import an incident type to Cortex XSOAR.","operationId":"importIncidentTypesHandler","requestBody":{"$ref":"#/components/requestBodies/importScript"},"responses":{"200":{"description":"The saved incident type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/incidentTypesWithErrors"}}}}},"tags":["Incidents"]}}}}
```


---

# 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/incidents.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.
