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

# IOCs

APIs for managing IOCs

## Get Indicators (IOCs)

> Get a list of IOCs. You can return all IOCs 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.> \\
>
> \
> You must have \*\*Rules Edit\*\* permissions to run this endpoint. <br>

```json
{"openapi":"3.0.0","info":{"title":"Cortex XDR Platform APIs","version":"Cortex XDR 5.2"},"tags":[{"name":"IOCs","description":"APIs for managing IOCs"}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/indicators/get":{"post":{"tags":["IOCs"],"summary":"Get Indicators (IOCs)","description":"Get a list of IOCs. You can return all IOCs 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\nYou must have **Rules Edit** permissions to run this endpoint.\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-indicators-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":{"type":"string","enum":["indicator","type","severity","expiration_date","default_expiration_enabled","comment","reputation","reliability"],"description":"Identifies the IOC field the filter is matching. Filters are based on the following keywords:\r\n- `indicator`: Indicator.\r\n- `type`: Indicator type.\r\n- `severity`: Indicator severity.\r\n- `expiration_date`: Expiration date in epoch milliseconds.\r\n- `default_expiration_enabled`: Whether the default expiration is enabled.\r\n- `comment`: Comment.\r\n- `reputation`: Reputation level.\r\n- `reliability`: Reliability level."},"operator":{"type":"string","enum":["EQ","NEQ","IN","GTE","LTE"],"description":"Identifies the comparison operator you want to use for this filter. Valid keywords are:\r\n`gte` / `lte`\r\n- `expiration_date`: Integer in timestamp epoch milliseconds\r\n`EQ` / `NEQ`\r\n- `indicator`: String\r\n- `type`: String\r\n- `severity`: String\r\n- `default_expiration_enabled`: Boolean\r\n- `comment`: String\r\n- `reputation`: String\r\n- `reliability`: String"},"value":{"oneOf":[{"type":"array","items":{}},{"type":"integer"},{"type":"string"},{"type":"boolean"}],"description":"Value that this filter must match. The contents of this field will differ depending on the IOC field that you specified for this filter:\r\n- `indicator`, `comment`: String.\r\n- `type`: String, can be one of the following: `hash`, `ip`, `path`, `domain_name`, `filename`, `mixed`.\r\n- `severity`: String, can be one of the following: `SEV_010_INFO`, `SEV_020_LOW`, `SEV_030_MEDIUM`, `SEV_040_HIGH`\r\n- `expiration_date`: Integer representing the number of milliseconds after the Unix epoch, UTC timezone.\r\n- `default_expiration_enabled`: Boolean value: `true` or `false`.\r\n- `comment`: String.\r\n- `reputation`: String, can be one of the following: `good`, `bad`, `suspicious`, `unknown`, `no_reputation`.\r\n- `reliability`: String, can be one of the following: `A`, `B`, `C`, `D`, `E`, `F`, `G`."}}}},"search_from":{"type":"integer","description":"Integer representing the starting offset within the query result set from which you want indicators returned.\r\nIndicators are returned as a zero-based list. Any indicator 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 indicators returned.\r\nIndicators in the indicator list that are indexed higher than this value are not returned in the final results set. Defaults to >100, which returns all indicators 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":{"rule_id":{"type":"integer"},"indicator":{"type":"string"},"type":{"type":"string"},"severity":{"type":"string"},"expiration_date":{"type":"integer"},"comment":{"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 IOCs

> Insert new IOCs or update existing IOCs.\
> \
> \*\*Note:\*\* The IOC \`rule\_id\` is tenant specific and can't be used across tenants. Inserting IOCs with the same \`rule\_id\` as an existing IOC on that tenant will overwrite the existing IOC.\
> \
> 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":"IOCs","description":"APIs for managing IOCs"}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/indicators/insert":{"post":{"tags":["IOCs"],"summary":"Insert or update IOCs","description":"Insert new IOCs or update existing IOCs.\n\n**Note:** The IOC `rule_id` is tenant specific and can't be used across tenants. Inserting IOCs with the same `rule_id` as an existing IOC on that tenant will overwrite the existing IOC.\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-indicators-insert","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["request_data"],"properties":{"request_data":{"type":"array","items":{"type":"object","properties":{"rule_id":{"type":"number"},"indicator":{"type":"string"},"type":{"enum":["HASH","IP","PATH","DOMAIN_NAME","FILENAME","MIXED"]},"severity":{"enum":["SEV_010_INFO","SEV_020_LOW","SEV_030_MEDIUM","SEV_040_HIGH"]},"expiration_date":{"type":"integer"},"default_expiration_enabled":{"type":"boolean"},"comment":{"type":"string"},"reputation":{"enum":["GOOD","BAD","SUSPICIOUS","UNKNOWN","NO_REPUTATION"]},"reliability":{"enum":["A","B","C","D","E","F","G"]}}}}}}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"added_objects":{"type":"array","description":"List of IOC objects added.","items":{"type":"object","properties":{"id":{"type":"integer"},"status":{"type":"string"}}}},"updated_objects":{"type":"array","description":"List of IOC objects updated.","items":{"type":"object","properties":{"id":{"type":"integer"},"status":{"type":"string"}}}},"errors":{"type":"array","description":"List of errors, if 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 Indicators (IOCs)

> Delete IOCs 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":"IOCs","description":"APIs for managing IOCs"}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/indicators/delete":{"post":{"tags":["IOCs"],"summary":"Delete Indicators (IOCs)","description":"Delete IOCs selected by filter.\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-indicators-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":{"enum":["indicator","type","severity","expiration_date","default_expiration_enabled","comment","reputation","reliability"],"description":"Identifies the IOC field the filter is matching. Filters are based on the following keywords:\r\n- `indicator`: Indicator.\r\n- `type`: Indicator type.\r\n- `severity`: Indicator severity.\r\n- `expiration_date`: Expiration date in epoch milliseconds.\r\n- `default_expiration_enabled`: Whether the default expiration is enabled.\r\n- `comment`: Comment.\r\n- `reputation`: Reputation level.\r\n- `reliability`: Reliability level."},"operator":{"type":"string","enum":["EQ","NEQ","IN","GTE","LTE"],"description":"Identifies the comparison operator you want to use for this filter. Valid keywords are:\r\n`gte` / `lte`\r\n- `expiration_date`: Integer in timestamp epoch milliseconds\r\n`EQ` / `NEQ`\r\n- `indicator`: String\r\n- `type`: String\r\n- `severity`: String\r\n- `default_expiration_enabled`: Boolean\r\n- `comment`: String\r\n- `reputation`: String\r\n- `reliability`: String"},"value":{"oneOf":[{"type":"integer"},{"type":"boolean"},{"type":"string"},{"type":"array","items":{}}],"description":"Value that this filter must match. The contents of this field will differ depending on the IOC field that you specified for this filter:\r\n- `indicator`, `comment`: String.\r\n- `type`: String, can be one of the following: `hash`, `ip`, `path`, `domain_name`, `filename`, `mixed`.\r\n- `severity`: String, can be one of the following: `SEV_010_INFO`, `SEV_020_LOW`, `SEV_030_MEDIUM`, `SEV_040_HIGH`\r\n- `expiration_date`: Integer representing the number of milliseconds after the Unix epoch, UTC timezone.\r\n- `default_expiration_enabled`: Boolean value: `true` or `false`.\r\n- `comment`: String.\r\n- `reputation`: String, can be one of the following: `good`, `bad`, `suspicious`, `unknown`, `no_reputation`.\r\n- `reliability`: String, can be one of the following: `A`, `B`, `C`, `D`, `E`, `F`, `G`."}}}}}}}}}},"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"}}}}}}}},"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/iocs.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.
