> 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/xdr-5-api/cortex-platform/correlation-rules.md).

# Correlation Rules

APIs for managing Correlation Rules

## Get Correlation Rules

> Return a list of correlation rules. You can return all correlation rules or filter results. You can also return extended results with all details included.> \
> \- The response is concatenated using AND condition (OR is not supported).> \
> \- The maximum result set size is >100.> \
> \- Offset is the zero-based number of incidents from the start of the result set.> \\
>
> \
> Requires the granular RBAC permission for this feature. <br>

```json
{"openapi":"3.0.0","info":{"title":"Cortex XDR Platform APIs","version":"Cortex XDR 5.2"},"tags":[{"name":"Correlation Rules","description":"APIs for managing Correlation Rules"}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/correlations/get":{"post":{"tags":["Correlation Rules"],"summary":"Get Correlation Rules","description":"Return a list of correlation rules. You can return all correlation rules or filter results. You can also return extended results with all details included.\r\n- The response is concatenated using AND condition (OR is not supported).\r\n- The maximum result set size is >100.\r\n- Offset is the zero-based number of incidents from the start of the result set.\r\n\r\nRequires the granular RBAC permission for this feature.\r\n","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"{api_key}","required":true},{"schema":{"type":"string"},"in":"header","name":"x-xdr-auth-id","description":"{api_key_id}","required":true}],"operationId":"post-public_api-v1-correlations-get","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["request_data"],"properties":{"request_data":{"type":"object","properties":{"extended_view":{"type":"boolean"},"filters":{"type":"array","description":"An array of filter fields.","items":{"type":"object","properties":{"field":{"enum":["name","severity","xql_query","is_enabled","description","alert_name","alert_category","alert_description","alert_fields","execution_mode","search_window","simple_schedule","timezone","crontab","suppression_enabled","suppression_duration","suppression_fields","dataset","user_defined_severity","user_defined_category","mitre_defs","investigation_query_link","drilldown_query_timeframe","mapping_strategy","alert_domain"],"description":"Identifies the correlation rule field the filter is matching. Filters are based on the following keywords:\r\n- `name`: Correlation rule name.\r\n- `severity`: Correlation rule severity.\r\n- `xql_query`: Correlation rule XQL query.\r\n- `is_enabled`: Whether the correlation rule is enabled or disabled.\r\n- `description`: Correlation rule description.\r\n- `alert_name`: Alert name.\r\n- `alert_category`: Alert category.\r\n- `alert_description`: Alert description.\r\n- `alert_fields`: Alert fields.\r\n- `execution_mode`: Whether execution mode is scheduled or real time.\r\n- `search_window`: Amount of time for search window.\r\n- `simple_schedule`: Correlation rule schedule.\r\n- `timezone`: Correlation rule timezone.\r\n- `crontab`: Linux scheduling for correlation rule.\r\n- `suppression_enabled`: Whether suppression is enabled for correlation rule.\r\n- `suppression_duration`: Duration of correlation rule suppression.\r\n- `suppression_fields`: Suppression fields.\r\n- `dataset`: Correlation rule dataset.\r\n- `user_defined_severity`: User-defined severity.\r\n- `user_defined_category`: User-defined category.\r\n- `mitre_defs`: MITRE definitions.\r\n- `investigation_query_link`: Investigation query link.\r\n- `drilldown_query_timeframe`: Whether the drilldown query timeframe is query or alert.\r\n- `mapping_strategy`: Whether the mapping strategy is auto or custom.\r\n- `alert_domain`: Alert domain."},"operator":{"enum":["EQ","NEQ","IN","GTE","LTE"],"description":"Identifies the comparison operator you want to use for this filter. Valid keywords are:\r\n`EQ` / `NEQ`\r\n- `name`: String\r\n- `severity`: String\r\n- `xql_query`: String\r\n- `is_enabled`: Boolean\r\n- `description`: String\r\n- `alert_name`: String\r\n- `alert_category`: String\r\n- `alert_description`: String\r\n- `alert_fields`: String or dictionary\r\n- `execution_mode`: String\r\n- `search_window`: String\r\n- `simple_schedule`: String\r\n- `timezone`: String\r\n- `crontab`: String\r\n- `suppression_enabled`: Boolean\r\n- `suppression_duration`: String\r\n- `dataset`: String\r\n- `user_defined_severity`: String\r\n- `user_defined_category`: String\r\n- `investigation_query_link`: String\r\n- `drilldown_query_timeframe`: String\r\n- `mapping_strategy`: String\r\n- `alert_domain`: String\r\n`IN`\r\n- `suppression_fields`: List of strings\r\n- `mitre_defs`: List of strings"},"value":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{}}],"description":"Value that this filter must match. The contents of this field will differ depending on the correlation rule field that you specified for this filter:\r\n- `name`, `xql_query`, `description`, `alert_name`, `alert_description`, `alert_fields`, `suppression_duration`, `dataset`, `user_defined_severity`, `user_defined_category`, `investigation_query_link`: String.\r\n- `severity`: String, can be one of the following: `SEV_010_INFO`, `SEV_020_LOW`, `SEV_030_MEDIUM`, `SEV_040_HIGH`\r\n- `is_enabled`: String, can be one of the following: `enabled` or `disabled`.\r\n- `alert_category`: String, can be one of the following: `other`, `persistence`, `evasion`, `tampering`, `file_type_obfuscation`, `privilege_escalation`, `credential_access`, `lateral_movement`, `execution`, `collection`, `exfiltration`, `infiltration`, `dropper`, `file_privilege_manipulation`, `reconnaissance`, `discovery`.\r\n- `alert_fields`: Dictionary.\r\n- `execution_mode`: String, can be one of the following: `scheduled` or `real_time`.\r\n- `search_window`: String, for example: \"2 hours\".\r\n- `simple_schedule`: String, for example: \"5 minutes\".\r\n- `timezone`: String, for example: \"Asia/Jerusalem\".\r\n- `crontab`: String, for example: \"*/10 * * * *\".\r\n- `suppression_enabled`: Boolean: `true` or `false`.\r\n- `suppression_fields`: List of strings.\r\n- `mitre_defs`: List of strings or dictionary.\r\n- `drilldown_query_timeframe`: String, can be one of the following: `query` or `alert`.\r\n- `mapping_strategy`: String, can be one of the following: `auto` or `custom`.\r\n- `alert_domain`: String, can be one of the following: `domain_security`, `domain_it`, `domain_hunting`."}}}},"search_from":{"type":"integer","description":"Integer representing the starting offset within the query result set from which you want correlation rules returned.\r\nCorrelation rules are returned as a zero-based list. Any correlation rule indexed less than this value is not returned in the final result set and defaults to zero."},"search_to":{"type":"integer","description":"Integer representing the end offset within the result set after which you do not want BIOCs returned.\r\nBIOCs in the BIOC list that are indexed higher than this value are not returned in the final results set. Defaults to >100, which returns all BIOCs to the end of the list."}}}}}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"objects_count":{"type":"integer"},"objects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"severity":{"type":"string"},"xql_query":{"type":"string"},"is_enabled":{"type":"string"},"description":{"type":"string"},"alert_name":{"type":"string"},"alert_category":{"type":"string"},"alert_fields":{"type":"object","properties":{}},"execution_mode":{"type":"string"},"search_window":{"type":"string"},"simple_schedule":{"type":"string"},"timezone":{"type":"string"},"crontab":{"type":"string"},"suppression_enabled":{"type":"boolean"},"suppression_fields":{"type":"array","items":{"type":"string"}},"dataset":{"type":"string"},"mitre_defs":{"type":"object","properties":{"TA0005 - Defense Evasion":{"type":"array","items":{"type":"string"}}}},"drilldown_query_timeframe":{"type":"string"},"mapping_strategy":{"type":"string"}}}},"objects_type":{"type":"string"}}}}}},"400":{"description":"Bad Request. Got invalid JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}},"401":{"description":"Unauthorized access. An issue occurred during authentication. This can indicate an incorrect key, id, or other invalid authentication parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}},"402":{"description":"Unauthorized access. User does not have the required license type to run this API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}},"403":{"description":"Forbidden access. The provided API Key does not have the required RBAC permissions to run this API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}},"500":{"description":"Internal server error. A unified status for API communication type errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}}}}}},"components":{"schemas":{"reply":{"type":"object","title":"reply","description":"The query result upon error.","properties":{"err_code":{"type":"string","description":"HTTP response code."},"err_msg":{"type":"string","description":"Error message."},"err_extra":{"type":"string","description":"Additional information describing the error."}}}}}}
```

## Insert or update Correlation Rules

> Insert new Correlation Rules or update existing Correlation Rules.\
> \
> \*\*Note:\*\* The Correlation Rule \`id\` is tenant specific and can't be used across tenants. Inserting Correlation Rules with the same \`id\` as an existing Correlation Rule on that tenant will overwrite the existing Correlation Rule.\
> \
> Requires the granular RBAC permission for this feature.

```json
{"openapi":"3.0.0","info":{"title":"Cortex XDR Platform APIs","version":"Cortex XDR 5.2"},"tags":[{"name":"Correlation Rules","description":"APIs for managing Correlation Rules"}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/correlations/insert":{"post":{"tags":["Correlation Rules"],"summary":"Insert or update Correlation Rules","description":"Insert new Correlation Rules or update existing Correlation Rules.\n\n**Note:** The Correlation Rule `id` is tenant specific and can't be used across tenants. Inserting Correlation Rules with the same `id` as an existing Correlation Rule on that tenant will overwrite the existing Correlation Rule.\n\nRequires the granular RBAC permission for this feature.","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"{api_key}","required":true},{"schema":{"type":"string"},"in":"header","name":"x-xdr-auth-id","description":"{api_key_id}","required":true}],"operationId":"post-public_api-v1-correlations-insert","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["request_data"],"properties":{"request_data":{"type":"array","items":{"type":"object","properties":{"rule_id":{"type":"integer"},"name":{"type":"string","description":"Correlation rule name."},"severity":{"enum":["SEV_010_INFO","SEV_020_LOW","SEV_030_MEDIUM","SEV_040_HIGH"],"description":"Correlation rule severity."},"xql_query":{"type":"string","description":"Correlation rule XQL query."},"is_enabled":{"type":"boolean","description":"Whether the correlation rule is enabled or disabled."},"description":{"type":"string","description":"Correlation rule description."},"alert_name":{"type":"string","description":"Alert name."},"alert_category":{"enum":["OTHER","PERSISTENCE","EVASION","TAMPERING","FILE_TYPE_OBFUSCATION","PRIVILEGE_ESCALATION","CREDENTIAL_ACCESS","LATERAL_MOVEMENT","EXECUTION","COLLECTION","EXFILTRATION","INFILTRATION","DROPPER","FILE_PRIVILEGE_MANIPULATION","RECONNAISSANCE","DISCOVERY"],"description":"Alert category."},"alert_description":{"type":"string","description":"Alert description."},"alert_fields":{"type":"object","description":"Alert fields.","additionalProperties":{}},"execution_mode":{"enum":["SCHEDULED","REAL_TIME"],"description":"Correlation rule execution mode."},"search_window":{"type":"string","description":"Search window."},"simple_schedule":{"type":"string","description":"Correlation rule simple schedule."},"timezone":{"type":"string","description":"Correlation rule timezone."},"crontab":{"type":"string","description":"Linux scheduling for correlation rule."},"suppression_enabled":{"type":"boolean"},"suppression_duration":{"type":"string"},"suppression_fields":{"type":"array","items":{"type":"string"}},"dataset":{"type":"string"},"user_defined_severity":{"type":"string","nullable":true},"user_defined_category":{"type":"string","nullable":true},"mitre_defs":{"type":"object","additionalProperties":{}},"investigation_query_link":{"type":"string"},"drilldown_query_timeframe":{"enum":["QUERY","ALERT"]},"mapping_strategy":{"enum":["AUTO","CUSTOM"]}}}}}}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"added_objects":{"type":"array","description":"List of Correlation Rule objects added.","items":{"type":"object","properties":{"id":{"type":"integer"},"status":{"type":"string"}}}},"updated_objects":{"type":"array","description":"List of Correlation Rule objects updated.","items":{"type":"object","properties":{"id":{"type":"integer"},"status":{"type":"string"}}}},"errors":{"type":"array","description":"List of error messages, if there are any.","items":{"type":"string"}}}}}}},"400":{"description":"Bad Request. Got invalid JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}},"401":{"description":"Unauthorized access. An issue occurred during authentication. This can indicate an incorrect key, id, or other invalid authentication parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}},"402":{"description":"Unauthorized access. User does not have the required license type to run this API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}},"403":{"description":"Forbidden access. The provided API Key does not have the required RBAC permissions to run this API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}},"500":{"description":"Internal server error. A unified status for API communication type errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}}}}}},"components":{"schemas":{"reply":{"type":"object","title":"reply","description":"The query result upon error.","properties":{"err_code":{"type":"string","description":"HTTP response code."},"err_msg":{"type":"string","description":"Error message."},"err_extra":{"type":"string","description":"Additional information describing the error."}}}}}}
```

## Delete Correlation Rules

> Delete correlation rules selected by filter.\
> \
> Requires the granular RBAC permission for this feature.

```json
{"openapi":"3.0.0","info":{"title":"Cortex XDR Platform APIs","version":"Cortex XDR 5.2"},"tags":[{"name":"Correlation Rules","description":"APIs for managing Correlation Rules"}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/correlations/delete":{"post":{"tags":["Correlation Rules"],"summary":"Delete Correlation Rules","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"{api_key}","required":true},{"schema":{"type":"string"},"in":"header","name":"x-xdr-auth-id","description":"{api_key_id}","required":true}],"operationId":"post-public_api-v1-correlations-delete","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["request_data"],"properties":{"request_data":{"type":"object","properties":{"filters":{"type":"array","description":"An array of filter fields.","items":{"type":"object","properties":{"field":{"type":"string","enum":["name","severity","xql_query","is_enabled","description","alert_name","alert_category","alert_description","alert_fields","execution_mode","search_window","simple_schedule","timezone","crontab","suppression_enabled","suppression_duration","suppression_fields","dataset","user_defined_severity","user_defined_category","mitre_defs","investigation_query_link","drilldown_query_timeframe","mapping_strategy","alert_domain"],"description":"Identifies the correlation rule field the filter is matching. Filters are based on the following keywords:\r\n- `name`: Correlation rule name.\r\n- `severity`: Correlation rule severity.\r\n- `xql_query`: Correlation rule XQL query.\r\n- `is_enabled`: Whether the correlation rule is enabled or disabled.\r\n- `description`: Correlation rule description.\r\n- `alert_name`: Alert name.\r\n- `alert_category`: Alert category.\r\n- `alert_description`: Alert description.\r\n- `alert_fields`: Alert fields.\r\n- `execution_mode`: Whether execution mode is scheduled or real time.\r\n- `search_window`: Amount of time for search window.\r\n- `simple_schedule`: Correlation rule schedule.\r\n- `timezone`: Correlation rule timezone.\r\n- `crontab`: Linux scheduling for correlation rule.\r\n- `suppression_enabled`: Whether suppression is enabled for correlation rule.\r\n- `suppression_duration`: Duration of correlation rule suppression.\r\n- `suppression_fields`: Suppression fields.\r\n- `dataset`: Correlation rule dataset.\r\n- `user_defined_severity`: User-defined severity.\r\n- `user_defined_category`: User-defined category.\r\n- `mitre_defs`: MITRE definitions.\r\n- `investigation_query_link`: Investigation query link.\r\n- `drilldown_query_timeframe`: Whether the drilldown query timeframe is query or alert.\r\n- `mapping_strategy`: Whether the mapping strategy is auto or custom.\r\n- `alert_domain`: Alert domain."},"operator":{"type":"string","enum":["EQ","IN","GTE","LTE"],"description":"Identifies the comparison operator you want to use for this filter. Valid keywords are:\r\n`EQ`\r\n- `name`: String\r\n- `severity`: String\r\n- `xql_query`: String\r\n- `is_enabled`: Boolean\r\n- `description`: String\r\n- `alert_name`: String\r\n- `alert_category`: String\r\n- `alert_description`: String\r\n- `alert_fields`: String or dictionary\r\n- `execution_mode`: String\r\n- `search_window`: String\r\n- `simple_schedule`: String\r\n- `timezone`: String\r\n- `crontab`: String\r\n- `suppression_enabled`: Boolean\r\n- `suppression_duration`: String\r\n- `dataset`: String\r\n- `user_defined_severity`: String\r\n- `user_defined_category`: String\r\n- `investigation_query_link`: String\r\n- `drilldown_query_timeframe`: String\r\n- `mapping_strategy`: String\r\n- `alert_domain`: String\r\n`IN`\r\n- `suppression_fields`: List of strings\r\n- `mitre_defs`: List of strings"},"value":{"oneOf":[{"type":"string"},{"type":"array","items":{}},{"type":"boolean"},{"type":"integer"}],"description":"Value that this filter must match. The contents of this field will differ depending on the correlation rule field that you specified for this filter:\r\n- `name`, `xql_query`, `description`, `alert_name`, `alert_description`, `alert_fields`, `suppression_duration`, `dataset`, `user_defined_severity`, `user_defined_category`, `investigation_query_link`: String.\r\n- `severity`: String, can be one of the following: `SEV_010_INFO`, `SEV_020_LOW`, `SEV_030_MEDIUM`, `SEV_040_HIGH`\r\n- `is_enabled`: String, can be one of the following: `enabled` or `disabled`.\r\n- `alert_category`: String, can be one of the following: `other`, `persistence`, `evasion`, `tampering`, `file_type_obfuscation`, `privilege_escalation`, `credential_access`, `lateral_movement`, `execution`, `collection`, `exfiltration`, `infiltration`, `dropper`, `file_privilege_manipulation`, `reconnaissance`, `discovery`.\r\n- `alert_fields`: Dictionary.\r\n- `execution_mode`: String, can be one of the following: `scheduled` or `real_time`.\r\n- `search_window`: String, for example: \"2 hours\".\r\n- `simple_schedule`: String, for example: \"5 minutes\".\r\n- `timezone`: String, for example: \"Asia/Jerusalem\".\r\n- `crontab`: String, for example: \"*/10 * * * *\".\r\n- `suppression_enabled`: Boolean: `true` or `false`.\r\n- `suppression_fields`: List of strings.\r\n- `mitre_defs`: List of strings or dictionary.\r\n- `drilldown_query_timeframe`: String, can be one of the following: `query` or `alert`.\r\n- `mapping_strategy`: String, can be one of the following: `auto` or `custom`.\r\n- `alert_domain`: String, can be one of the following: `domain_security`, `domain_it`, `domain_hunting`."}}}}}}}}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"objects_count":{"type":"integer"},"objects":{"type":"array","items":{"type":"integer"}}}}}}},"400":{"description":"Bad Request. Got invalid JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}},"401":{"description":"Unauthorized access. An issue occurred during authentication. This can indicate an incorrect key, id, or other invalid authentication parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}},"402":{"description":"Unauthorized access. User does not have the required license type to run this API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}},"403":{"description":"Forbidden access. The provided API Key does not have the required RBAC permissions to run this API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}},"500":{"description":"Internal server error. A unified status for API communication type errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}}},"description":"Delete correlation rules selected by filter.\n\nRequires the granular RBAC permission for this feature."}}},"components":{"schemas":{"reply":{"type":"object","title":"reply","description":"The query result upon error.","properties":{"err_code":{"type":"string","description":"HTTP response code."},"err_msg":{"type":"string","description":"Error message."},"err_extra":{"type":"string","description":"Additional information describing the error."}}}}}}
```


---

# 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/xdr-5-api/cortex-platform/correlation-rules.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.
