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

# Evidence

APIs for managing evidence entities

## Save evidence

> Save an evidence entity\
> To update evidence custom fields you should lowercase them and remove all spaces. For example: Scan IP -> scanip

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Evidence","description":"APIs for managing evidence entities"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Evidence":{"type":"object","title":"Evidence details.","properties":{"ShardID":{"type":"integer","format":"int64"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"description":{"type":"string","description":"The description for the resolve"},"entryId":{"type":"string","description":"The entry ID"},"fetched":{"type":"string","description":"when the evidence entry was fetched","format":"date-time"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentId":{"type":"string","description":"The incident ID"},"indexName":{"type":"string"},"markedBy":{"type":"string","description":"the user that marked this evidence"},"markedDate":{"type":"string","description":"when this evidence was marked","format":"date-time"},"modified":{"type":"string","format":"date-time"},"numericId":{"type":"integer","format":"int64"},"occurred":{"type":"string","description":"When this evidence has occurred","format":"date-time"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","description":"Tags","items":{"type":"string"}},"tagsRaw":{"type":"array","description":"TagsRaw","items":{"type":"string"}},"taskId":{"type":"string","description":"when the evidence entry was fetched"},"version":{"type":"integer","format":"int64"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}}}},"paths":{"/evidence":{"post":{"summary":"Save evidence","description":"Save an evidence entity\nTo update evidence custom fields you should lowercase them and remove all spaces. For example: Scan IP -> scanip","operationId":"saveEvidence","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evidence"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Evidence"}}}},"responses":{"200":{"description":"The new / updated Evidence","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evidence"}}}}},"tags":["Evidence"]}}}}
```

## delete evidence

> Delete an evidence entity

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Evidence","description":"APIs for managing evidence entities"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"deleteEvidence":{"type":"object","properties":{"evidenceID":{"type":"string"}}}}},"paths":{"/evidence/delete":{"post":{"summary":"delete evidence","description":"Delete an evidence entity","operationId":"deleteEvidenceOp","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/deleteEvidence"}},"application/xml":{"schema":{"$ref":"#/components/schemas/deleteEvidence"}}}},"responses":{"200":{"description":"Deleted evidence ID"}},"tags":["Evidence"]}}}}
```

## Search evidence

> Search for an evidence entutiy by filter

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Evidence","description":"APIs for managing evidence entities"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"evidencesFilterWrapper":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/GenericStringDateFilter"},"incidentID":{"type":"string"}}},"GenericStringDateFilter":{"type":"object","description":"GenericStringDateFilter is a general filter that will fetch entities using the Query value and a date filter","properties":{"Cache":{"type":"object","description":"Cache of join functions","additionalProperties":{"type":"array","items":{"type":"string"}}},"accounts":{"type":"object","additionalProperties":{"type":"object"}},"fields":{"type":"array","items":{"type":"string"}},"filterobjectquery":{"type":"string"},"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"ignoreWorkers":{"type":"boolean","description":"Do not use workers mechanism while searching bleve"},"page":{"type":"integer","description":"0-based page","format":"int64"},"period":{"$ref":"#/components/schemas/Period"},"query":{"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"}},"timeFrame":{"$ref":"#/components/schemas/Duration"},"toDate":{"type":"string","format":"date-time"},"trim_events":{"type":"integer","format":"int64"}}},"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"},"EvidencesSearchResponse":{"type":"object","description":"EvidencesSearchResponse returns the response from the evidences search","properties":{"evidences":{"$ref":"#/components/schemas/Evidences"},"total":{"type":"integer","format":"int64"}}},"Evidences":{"type":"array","description":"Evidences is a list of evidence entities","items":{"$ref":"#/components/schemas/Evidence"}},"Evidence":{"type":"object","title":"Evidence details.","properties":{"ShardID":{"type":"integer","format":"int64"},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"description":{"type":"string","description":"The description for the resolve"},"entryId":{"type":"string","description":"The entry ID"},"fetched":{"type":"string","description":"when the evidence entry was fetched","format":"date-time"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"incidentId":{"type":"string","description":"The incident ID"},"indexName":{"type":"string"},"markedBy":{"type":"string","description":"the user that marked this evidence"},"markedDate":{"type":"string","description":"when this evidence was marked","format":"date-time"},"modified":{"type":"string","format":"date-time"},"numericId":{"type":"integer","format":"int64"},"occurred":{"type":"string","description":"When this evidence has occurred","format":"date-time"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"tags":{"type":"array","description":"Tags","items":{"type":"string"}},"tagsRaw":{"type":"array","description":"TagsRaw","items":{"type":"string"}},"taskId":{"type":"string","description":"when the evidence entry was fetched"},"version":{"type":"integer","format":"int64"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}}}},"paths":{"/evidence/search":{"post":{"summary":"Search evidence","description":"Search for an evidence entutiy by filter","operationId":"searchEvidence","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/evidencesFilterWrapper"}},"application/xml":{"schema":{"$ref":"#/components/schemas/evidencesFilterWrapper"}}}},"responses":{"200":{"description":"EvidencesSearchResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencesSearchResponse"}}}}},"tags":["Evidence"]}}}}
```


---

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