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

# Incident Fields

APIs for managing incident fields

## Set tags field

> Sets the select values of a specific tags field. The values passed to the route override the existing select\
> values of the field. To reset the select values pass an empty array.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incident Fields","description":"APIs for managing incident fields"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"tagsFieldValues":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}}}}}},"paths":{"/incidentfield/tags/reset/{id}":{"post":{"summary":"Set tags field","description":"Sets the select values of a specific tags field. The values passed to the route override the existing select\nvalues of the field. To reset the select values pass an empty array.","operationId":"setTagsField","parameters":[{"name":"id","in":"path","description":"The machine name of the field prefixed with the type. For example indicator_tags or incident_dbotmirrortags","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tagsFieldValues"}},"application/xml":{"schema":{"$ref":"#/components/schemas/tagsFieldValues"}}},"description":"The new select values of the field","required":true},"responses":{"200":{"description":"empty"}},"tags":["Incident Fields"]}}}}
```

## Get all incident fields associated with incident type

> Get all incident fields associated with incident type

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incident Fields","description":"APIs for managing incident fields"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"IncidentField":{"type":"object","title":"IncidentField ...","properties":{"aliasTo":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/FieldsAlias"}},"associatedToAll":{"type":"boolean"},"associatedTypes":{"type":"array","description":"AssociatedTypes - list of incident (case) types IDs related to specific incident field","items":{"type":"string"}},"autoCompleteTags":{"type":"array","items":{"type":"string"}},"breachScript":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"caseInsensitive":{"type":"boolean"},"cliName":{"type":"string"},"closeForm":{"type":"boolean"},"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"commitMessage":{"type":"string"},"content":{"type":"boolean"},"created":{"type":"string","format":"date-time"},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"definitionId":{"type":"string"},"description":{"type":"string"},"editForm":{"type":"boolean"},"fieldCalcScript":{"type":"string"},"fromServerVersion":{"$ref":"#/components/schemas/Version"},"group":{"$ref":"#/components/schemas/FieldGroup"},"hidden":{"type":"boolean"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isReadOnly":{"type":"boolean"},"itemVersion":{"$ref":"#/components/schemas/Version"},"locked":{"type":"boolean"},"mergeStrategy":{"$ref":"#/components/schemas/FieldMergeStrategy"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"neverSetAsRequired":{"type":"boolean"},"numericId":{"type":"integer","format":"int64"},"openEnded":{"type":"boolean"},"orgType":{"type":"string"},"ownerOnly":{"type":"boolean"},"packID":{"type":"string"},"packName":{"type":"string"},"packPropagationLabels":{"type":"array","items":{"type":"string"}},"placeholder":{"type":"string"},"prevName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"propagationLabels":{"type":"array","items":{"type":"string"}},"remote":{"type":"boolean"},"required":{"type":"boolean"},"runScriptAfterUpdate":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"shouldCommit":{"type":"boolean"},"sizeInBytes":{"type":"integer","format":"int64"},"sla":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"system":{"type":"boolean"},"systemAssociatedTypes":{"type":"array","items":{"type":"string"}},"template":{"type":"string"},"threshold":{"type":"number","format":"double"},"toServerVersion":{"$ref":"#/components/schemas/Version"},"type":{"type":"string"},"unmapped":{"type":"boolean"},"unsearchable":{"type":"boolean"},"useAsKpi":{"type":"boolean"},"validatedError":{"type":"string"},"validationRegex":{"type":"string"},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"version":{"type":"integer","format":"int64"},"x2_fields":{"type":"string"}}},"FieldsAlias":{"type":"object","title":"FieldsAlias ...","properties":{"cliName":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"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"}}},"FieldGroup":{"type":"number","description":"FieldGroup is the field group","format":"double"},"FieldMergeStrategy":{"type":"string","description":"FieldMergeStrategy strategy for merging of indicator fields"}}},"paths":{"/incidentfields/associatedTypes/{type}":{"get":{"summary":"Get all incident fields associated with incident type","description":"Get all incident fields associated with incident type","operationId":"getIncidentsFieldsByIncidentType","parameters":[{"name":"type","in":"path","description":"the name (case sensitive) of the incident type","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a list of incident fields associated with the incident type","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IncidentField"}}}}}},"tags":["Incident Fields"]}}}}
```

## Import an incident field

> Import an incident field to Cortex XSOAR

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Incident Fields","description":"APIs for managing incident fields"}],"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":{"incidentFieldsWithErrors":{"type":"object","properties":{"error":{"type":"string"},"incidentFields":{"type":"array","items":{"$ref":"#/components/schemas/IncidentField"}}}},"IncidentField":{"type":"object","title":"IncidentField ...","properties":{"aliasTo":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/FieldsAlias"}},"associatedToAll":{"type":"boolean"},"associatedTypes":{"type":"array","description":"AssociatedTypes - list of incident (case) types IDs related to specific incident field","items":{"type":"string"}},"autoCompleteTags":{"type":"array","items":{"type":"string"}},"breachScript":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"caseInsensitive":{"type":"boolean"},"cliName":{"type":"string"},"closeForm":{"type":"boolean"},"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"commitMessage":{"type":"string"},"content":{"type":"boolean"},"created":{"type":"string","format":"date-time"},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"definitionId":{"type":"string"},"description":{"type":"string"},"editForm":{"type":"boolean"},"fieldCalcScript":{"type":"string"},"fromServerVersion":{"$ref":"#/components/schemas/Version"},"group":{"$ref":"#/components/schemas/FieldGroup"},"hidden":{"type":"boolean"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isReadOnly":{"type":"boolean"},"itemVersion":{"$ref":"#/components/schemas/Version"},"locked":{"type":"boolean"},"mergeStrategy":{"$ref":"#/components/schemas/FieldMergeStrategy"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"neverSetAsRequired":{"type":"boolean"},"numericId":{"type":"integer","format":"int64"},"openEnded":{"type":"boolean"},"orgType":{"type":"string"},"ownerOnly":{"type":"boolean"},"packID":{"type":"string"},"packName":{"type":"string"},"packPropagationLabels":{"type":"array","items":{"type":"string"}},"placeholder":{"type":"string"},"prevName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"propagationLabels":{"type":"array","items":{"type":"string"}},"remote":{"type":"boolean"},"required":{"type":"boolean"},"runScriptAfterUpdate":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"shouldCommit":{"type":"boolean"},"sizeInBytes":{"type":"integer","format":"int64"},"sla":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"system":{"type":"boolean"},"systemAssociatedTypes":{"type":"array","items":{"type":"string"}},"template":{"type":"string"},"threshold":{"type":"number","format":"double"},"toServerVersion":{"$ref":"#/components/schemas/Version"},"type":{"type":"string"},"unmapped":{"type":"boolean"},"unsearchable":{"type":"boolean"},"useAsKpi":{"type":"boolean"},"validatedError":{"type":"string"},"validationRegex":{"type":"string"},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"version":{"type":"integer","format":"int64"},"x2_fields":{"type":"string"}}},"FieldsAlias":{"type":"object","title":"FieldsAlias ...","properties":{"cliName":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"type":"object","title":"GridColumn ...","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"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"}}},"FieldGroup":{"type":"number","description":"FieldGroup is the field group","format":"double"},"FieldMergeStrategy":{"type":"string","description":"FieldMergeStrategy strategy for merging of indicator fields"}}},"paths":{"/incidentfields/import":{"post":{"summary":"Import an incident field","description":"Import an incident field to Cortex XSOAR","operationId":"importIncidentFields","requestBody":{"$ref":"#/components/requestBodies/importScript"},"responses":{"200":{"description":"The saved incident field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/incidentFieldsWithErrors"}}}}},"tags":["Incident Fields"]}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
