> 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/data-security-posture-management/inventory.md).

# Inventory

The Cortex Cloud Data Security solution is an agentless multi-cloud data security platform that discovers, classifies, protects, and governs sensitive data.

## Get data pattern inventory

> Get all data patterns found in the environment, including high-level aggregations for each of them.\
> \
> \*\*Required license:\*\* Requires the Cortex Cloud Posture Management add-on.

```json
{"openapi":"3.1.0","info":{"title":"Data Security Posture Management APIs","version":"Cortex XDR 5.1"},"tags":[{"name":"Inventory","description":"The Cortex Cloud Data Security solution is an agentless multi-cloud data security platform that discovers, classifies, protects, and governs sensitive data."}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/data-security/data-patterns":{"post":{"description":"Get all data patterns found in the environment, including high-level aggregations for each of them.\n\n**Required license:** Requires the Cortex Cloud Posture Management add-on.","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}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DasRequestBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DasResponseBody"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get data pattern inventory","operationId":"postGetDataPatternInventory","tags":["Inventory"]}}},"components":{"schemas":{"DasRequestBody":{"type":"object","properties":{"filter":{"type":"object","properties":{}},"sort":{"type":"array","properties":{}},"next_page_token":{"type":"string","properties":{}}}},"DasResponseBody":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/JsonArray"},"metadata":{"$ref":"#/components/schemas/DasResponseBodyMetadata"}},"required":["data","metadata"]},"JsonArray":{"type":"array","properties":{}},"DasResponseBodyMetadata":{"type":"object","properties":{"total_count":{"type":"integer","format":"int32"},"filter_count":{"type":"integer","format":"int32"},"next_page_token":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"err_msg":{"type":"string"},"err_extra":{"$ref":"#/components/schemas/JsonArray"}},"required":["err_msg","err_extra"]}}}}
```

## Get field inventory details

> \*\*Required license:\*\* Requires the Cortex Cloud Posture Management add-on.

```json
{"openapi":"3.1.0","info":{"title":"Data Security Posture Management APIs","version":"Cortex XDR 5.1"},"tags":[{"name":"Inventory","description":"The Cortex Cloud Data Security solution is an agentless multi-cloud data security platform that discovers, classifies, protects, and governs sensitive data."}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/data-security/objects/fields":{"post":{"description":"**Required license:** Requires the Cortex Cloud Posture Management add-on.","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}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DasRequestBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DasResponseBody"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get field inventory details","operationId":"postGetFieldInventoryDetails","tags":["Inventory"]}}},"components":{"schemas":{"DasRequestBody":{"type":"object","properties":{"filter":{"type":"object","properties":{}},"sort":{"type":"array","properties":{}},"next_page_token":{"type":"string","properties":{}}}},"DasResponseBody":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/JsonArray"},"metadata":{"$ref":"#/components/schemas/DasResponseBodyMetadata"}},"required":["data","metadata"]},"JsonArray":{"type":"array","properties":{}},"DasResponseBodyMetadata":{"type":"object","properties":{"total_count":{"type":"integer","format":"int32"},"filter_count":{"type":"integer","format":"int32"},"next_page_token":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"err_msg":{"type":"string"},"err_extra":{"$ref":"#/components/schemas/JsonArray"}},"required":["err_msg","err_extra"]}}}}
```

## Get file inventory details

> \*\*Required license:\*\* Requires the Cortex Cloud Posture Management add-on.

```json
{"openapi":"3.1.0","info":{"title":"Data Security Posture Management APIs","version":"Cortex XDR 5.1"},"tags":[{"name":"Inventory","description":"The Cortex Cloud Data Security solution is an agentless multi-cloud data security platform that discovers, classifies, protects, and governs sensitive data."}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/data-security/objects/files":{"post":{"description":"**Required license:** Requires the Cortex Cloud Posture Management add-on.","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}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DasRequestBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DasResponseBody"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get file inventory details","operationId":"postGetFileInventoryDetails","tags":["Inventory"]}}},"components":{"schemas":{"DasRequestBody":{"type":"object","properties":{"filter":{"type":"object","properties":{}},"sort":{"type":"array","properties":{}},"next_page_token":{"type":"string","properties":{}}}},"DasResponseBody":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/JsonArray"},"metadata":{"$ref":"#/components/schemas/DasResponseBodyMetadata"}},"required":["data","metadata"]},"JsonArray":{"type":"array","properties":{}},"DasResponseBodyMetadata":{"type":"object","properties":{"total_count":{"type":"integer","format":"int32"},"filter_count":{"type":"integer","format":"int32"},"next_page_token":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"err_msg":{"type":"string"},"err_extra":{"$ref":"#/components/schemas/JsonArray"}},"required":["err_msg","err_extra"]}}}}
```


---

# 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/data-security-posture-management/inventory.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.
