> For the complete documentation index, see [llms.txt](https://guardian.hedera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guardian.hedera.com/api-reference-guardian/guardian-policies/analytics.md).

# Analytics

Query and export usage analytics across the platform.

## Search policies.

> Search policies. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"FilterSearchPoliciesDTO":{"type":"object","properties":{"policyId":{"type":"string"},"type":{"type":"string","enum":["Owned","Local","Global"]},"owner":{"type":"string"},"minVcCount":{"type":"number"},"minVpCount":{"type":"number"},"minTokensCount":{"type":"number"},"text":{"type":"string"},"threshold":{"type":"number","minimum":0,"maximum":100},"toolMessageIds":{"type":"array","items":{"type":"string"}},"toolName":{"type":"string"},"toolVersion":{"type":"string"}}},"SearchPoliciesDTO":{"type":"object","properties":{"target":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/SearchPolicyDTO"}]},"result":{"type":"array","items":{"$ref":"#/components/schemas/SearchPolicyDTO"}}},"required":["result"]},"SearchPolicyDTO":{"type":"object","properties":{"type":{"type":"string","enum":["Local","Global"]},"id":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"owner":{"type":"string"},"tags":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"vcCount":{"type":"number"},"vpCount":{"type":"number"},"tokensCount":{"type":"number"},"rate":{"type":"number"}},"required":["tags"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/search/policies":{"post":{"description":"Search policies. Only users with the Standard Registry role are allowed to make the request.","operationId":"AnalyticsApi_searchPolicies","parameters":[],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterSearchPoliciesDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchPoliciesDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Search policies.","tags":["analytics"]}}}}
```

## Compare policies.

> Compare policies. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"FilterPoliciesDTO":{"type":"object","properties":{"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]},"eventsLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"propLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"childrenLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"policyId1":{"type":"string"},"policyId2":{"type":"string"},"policyIds":{"type":"array","items":{"type":"string"}},"policies":{"type":"array","items":{"$ref":"#/components/schemas/FilterPolicyDTO"}}}},"FilterPolicyDTO":{"type":"object","properties":{"type":{"type":"string","description":"Identifier type","enum":["id","message","file"]},"value":{"oneOf":[{"type":"string","description":"Policy ID"},{"type":"string","description":"Policy Message ID"},{"$ref":"#/components/schemas/CompareFileDTO","description":"Policy File"}]}},"required":["type","value"]},"CompareFileDTO":{"type":"object","properties":{"id":{"type":"string","description":"File ID"},"name":{"type":"string","description":"File Name"},"value":{"type":"string","description":"Buffer"}},"required":["id","name","value"]},"ComparePoliciesDTO":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/ComparePoliciesItemDTO"},"right":{"$ref":"#/components/schemas/ComparePoliciesItemDTO"},"total":{"type":"number"},"blocks":{"$ref":"#/components/schemas/ComparePoliciesBlocksSectionDTO"},"roles":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"groups":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"topics":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"tokens":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"tools":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"}},"required":["left","right","total","blocks","roles","groups","topics","tokens","tools"]},"ComparePoliciesItemDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instanceTopicId":{"type":"string","nullable":true},"version":{"type":"string"},"type":{"type":"string"}},"required":["id","name","description","type"]},"ComparePoliciesBlocksSectionDTO":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesColumnDTO"}},"report":{"description":"Rows may include additional dynamic fields in multi-compare mode","type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesBlocksReportRowDTO"}}},"required":["columns","report"]},"ComparePoliciesColumnDTO":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"display":{"type":"string"}},"required":["name","label","type"]},"ComparePoliciesBlocksReportRowDTO":{"type":"object","properties":{"lvl":{"type":"number"},"type":{"type":"string"},"block_type":{"type":"string"},"left_index":{"type":"number"},"left_type":{"type":"string"},"left_tag":{"type":"string"},"right_index":{"type":"number"},"right_type":{"type":"string"},"right_tag":{"type":"string"},"index_rate":{"type":"string"},"permission_rate":{"type":"string"},"prop_rate":{"type":"string"},"event_rate":{"type":"string"},"artifacts_rate":{"type":"string"},"total_rate":{"type":"string"},"left":{"$ref":"#/components/schemas/ComparePoliciesBlockSideDTO"},"right":{"$ref":"#/components/schemas/ComparePoliciesBlockSideDTO"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"events":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"size":{"type":"number","description":"Present in merged multi-compare report rows"}}},"ComparePoliciesBlockSideDTO":{"type":"object","properties":{"index":{"type":"number"},"blockType":{"type":"string"},"tag":{"type":"string"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesPropertyValueDTO"}},"events":{"description":"Block events payloads","type":"array","items":{"type":"object"}}},"required":["index","blockType","tag","properties","events"]},"ComparePoliciesPropertyValueDTO":{"type":"object","properties":{"name":{"type":"string"},"lvl":{"type":"number"},"path":{"type":"string"},"type":{"type":"string"},"value":{"type":"object","description":"Arbitrary property value"}},"required":["name","lvl","path","type","value"]},"ComparePoliciesRateEntryDTO":{"type":"object","properties":{"type":{"type":"string"},"totalRate":{"type":"number"},"items":{"description":"Pair of compared values, can include null","type":"array","items":{"type":"object"}},"name":{"type":"string"},"path":{"type":"string"},"lvl":{"type":"number"}},"required":["type","totalRate","items"]},"ComparePoliciesPropsSectionDTO":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesColumnDTO"}},"report":{"description":"Rows may include additional dynamic fields in multi-compare mode","type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesPropsReportRowDTO"}}},"required":["columns","report"]},"ComparePoliciesPropsReportRowDTO":{"type":"object","properties":{"left_name":{"type":"string"},"right_name":{"type":"string"},"total_rate":{"type":"string"},"left":{"type":"object"},"right":{"type":"object"},"type":{"type":"string"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"size":{"type":"number","description":"Present in merged multi-compare report rows"}}},"ComparePoliciesMultiDTO":{"type":"object","properties":{"size":{"type":"number"},"left":{"$ref":"#/components/schemas/ComparePoliciesItemDTO"},"rights":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesItemDTO"}},"totals":{"type":"array","items":{"type":"object"}},"blocks":{"$ref":"#/components/schemas/ComparePoliciesBlocksSectionDTO"},"roles":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"groups":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"topics":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"tokens":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"tools":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"}},"required":["size","left","rights","totals","blocks","roles","groups","topics","tokens","tools"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/compare/policies":{"post":{"description":"Compare policies. Only users with the Standard Registry role are allowed to make the request.","operationId":"AnalyticsApi_comparePolicies","parameters":[],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterPoliciesDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ComparePoliciesDTO"},{"$ref":"#/components/schemas/ComparePoliciesMultiDTO"}]}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Compare policies.","tags":["analytics"]}}}}
```

## Compare policies with original state.

> Compare policies with original state. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CompareOriginalPolicyFilterDTO":{"type":"object","properties":{"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]},"eventsLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"propLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"childrenLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]}}},"ComparePoliciesDTO":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/ComparePoliciesItemDTO"},"right":{"$ref":"#/components/schemas/ComparePoliciesItemDTO"},"total":{"type":"number"},"blocks":{"$ref":"#/components/schemas/ComparePoliciesBlocksSectionDTO"},"roles":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"groups":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"topics":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"tokens":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"tools":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"}},"required":["left","right","total","blocks","roles","groups","topics","tokens","tools"]},"ComparePoliciesItemDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instanceTopicId":{"type":"string","nullable":true},"version":{"type":"string"},"type":{"type":"string"}},"required":["id","name","description","type"]},"ComparePoliciesBlocksSectionDTO":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesColumnDTO"}},"report":{"description":"Rows may include additional dynamic fields in multi-compare mode","type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesBlocksReportRowDTO"}}},"required":["columns","report"]},"ComparePoliciesColumnDTO":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"display":{"type":"string"}},"required":["name","label","type"]},"ComparePoliciesBlocksReportRowDTO":{"type":"object","properties":{"lvl":{"type":"number"},"type":{"type":"string"},"block_type":{"type":"string"},"left_index":{"type":"number"},"left_type":{"type":"string"},"left_tag":{"type":"string"},"right_index":{"type":"number"},"right_type":{"type":"string"},"right_tag":{"type":"string"},"index_rate":{"type":"string"},"permission_rate":{"type":"string"},"prop_rate":{"type":"string"},"event_rate":{"type":"string"},"artifacts_rate":{"type":"string"},"total_rate":{"type":"string"},"left":{"$ref":"#/components/schemas/ComparePoliciesBlockSideDTO"},"right":{"$ref":"#/components/schemas/ComparePoliciesBlockSideDTO"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"events":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"size":{"type":"number","description":"Present in merged multi-compare report rows"}}},"ComparePoliciesBlockSideDTO":{"type":"object","properties":{"index":{"type":"number"},"blockType":{"type":"string"},"tag":{"type":"string"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesPropertyValueDTO"}},"events":{"description":"Block events payloads","type":"array","items":{"type":"object"}}},"required":["index","blockType","tag","properties","events"]},"ComparePoliciesPropertyValueDTO":{"type":"object","properties":{"name":{"type":"string"},"lvl":{"type":"number"},"path":{"type":"string"},"type":{"type":"string"},"value":{"type":"object","description":"Arbitrary property value"}},"required":["name","lvl","path","type","value"]},"ComparePoliciesRateEntryDTO":{"type":"object","properties":{"type":{"type":"string"},"totalRate":{"type":"number"},"items":{"description":"Pair of compared values, can include null","type":"array","items":{"type":"object"}},"name":{"type":"string"},"path":{"type":"string"},"lvl":{"type":"number"}},"required":["type","totalRate","items"]},"ComparePoliciesPropsSectionDTO":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesColumnDTO"}},"report":{"description":"Rows may include additional dynamic fields in multi-compare mode","type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesPropsReportRowDTO"}}},"required":["columns","report"]},"ComparePoliciesPropsReportRowDTO":{"type":"object","properties":{"left_name":{"type":"string"},"right_name":{"type":"string"},"total_rate":{"type":"string"},"left":{"type":"object"},"right":{"type":"object"},"type":{"type":"string"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"size":{"type":"number","description":"Present in merged multi-compare report rows"}}},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/compare/policy/original/{policyId}":{"post":{"description":"Compare policies with original state. Only users with the Standard Registry role are allowed to make the request.","operationId":"AnalyticsApi_compareOriginalPolicy","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareOriginalPolicyFilterDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparePoliciesDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Compare policies with original state.","tags":["analytics"]}}}}
```

## Compare modules.

> Compare modules. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"FilterModulesDTO":{"type":"object","properties":{"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]},"eventsLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"propLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"childrenLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"moduleId1":{"type":"string"},"moduleId2":{"type":"string"}},"required":["moduleId1","moduleId2"]},"CompareModulesDTO":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/CompareModulesItemDTO"},"right":{"$ref":"#/components/schemas/CompareModulesItemDTO"},"total":{"type":"number"},"blocks":{"$ref":"#/components/schemas/CompareModulesSectionDTO"},"inputEvents":{"$ref":"#/components/schemas/CompareModulesSectionDTO"},"outputEvents":{"$ref":"#/components/schemas/CompareModulesSectionDTO"},"variables":{"$ref":"#/components/schemas/CompareModulesSectionDTO"}},"required":["left","right","total","blocks","inputEvents","outputEvents","variables"]},"CompareModulesItemDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","name","description"]},"CompareModulesSectionDTO":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesColumnDTO"}},"report":{"type":"array","items":{"type":"object"}}},"required":["columns","report"]},"ComparePoliciesColumnDTO":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"display":{"type":"string"}},"required":["name","label","type"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/compare/modules":{"post":{"description":"Compare modules. Only users with the Standard Registry role are allowed to make the request.","operationId":"AnalyticsApi_compareModules","parameters":[],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterModulesDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareModulesDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Compare modules.","tags":["analytics"]}}}}
```

## Compare schemas.

> Compare schemas. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CompareSchemasByIdsRequestDTO":{"type":"object","properties":{"schemaId1":{"type":"string"},"schemaId2":{"type":"string"},"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]}},"required":["schemaId1","schemaId2"]},"CompareSchemasByListRequestDTO":{"type":"object","properties":{"schemas":{"type":"array","items":{"$ref":"#/components/schemas/FilterSchemaDTO"}},"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]}},"required":["schemas"]},"FilterSchemaDTO":{"type":"object","properties":{"type":{"type":"string","description":"Identifier type","enum":["id","policy-message","policy-file"]},"value":{"type":"string","description":"Schema ID"},"policy":{"oneOf":[{"description":"Policy Message ID","type":"string"},{"$ref":"#/components/schemas/CompareFileDTO","description":"Policy File"}]}},"required":["type","value"]},"CompareFileDTO":{"type":"object","properties":{"id":{"type":"string","description":"File ID"},"name":{"type":"string","description":"File Name"},"value":{"type":"string","description":"Buffer"}},"required":["id","name","value"]},"CompareSchemasDTO":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/CompareSchemasItemDTO"},"right":{"$ref":"#/components/schemas/CompareSchemasItemDTO"},"total":{"type":"number"},"fields":{"$ref":"#/components/schemas/CompareSchemasSectionDTO"}},"required":["left","right","total","fields"]},"CompareSchemasItemDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"uuid":{"type":"string"},"topicId":{"type":"string","nullable":true},"version":{"type":"string"},"iri":{"type":"string"},"policy":{"type":"object"}},"required":["id","name","description","uuid","version","iri"]},"CompareSchemasSectionDTO":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesColumnDTO"}},"report":{"type":"array","items":{"type":"object"}}},"required":["columns","report"]},"ComparePoliciesColumnDTO":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"display":{"type":"string"}},"required":["name","label","type"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/compare/schemas":{"post":{"description":"Compare schemas. Only users with the Standard Registry role are allowed to make the request.","operationId":"AnalyticsApi_compareSchemas","parameters":[],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CompareSchemasByIdsRequestDTO"},{"$ref":"#/components/schemas/CompareSchemasByListRequestDTO"}]}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareSchemasDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Compare schemas.","tags":["analytics"]}}}}
```

## Compare documents.

> Compare documents. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CompareDocumentsByIdsRequestDTO":{"type":"object","properties":{"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]},"eventsLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"propLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"childrenLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"documentId1":{"type":"string"},"documentId2":{"type":"string"}},"required":["documentId1","documentId2"]},"CompareDocumentsByListRequestDTO":{"type":"object","properties":{"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]},"eventsLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"propLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"childrenLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"documentIds":{"type":"array","items":{"type":"string"}}},"required":["documentIds"]},"CompareDocumentsDTO":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/CompareDocumentItemDTO"},"right":{"$ref":"#/components/schemas/CompareDocumentItemDTO"},"total":{"type":"number"},"documents":{"$ref":"#/components/schemas/CompareDocumentsSectionDTO"}},"required":["left","right","total","documents"]},"CompareDocumentItemDTO":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"owner":{"type":"string"},"policy":{"type":"string","nullable":true}},"required":["id","type","owner"]},"CompareDocumentsSectionDTO":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesColumnDTO"}},"report":{"type":"array","items":{"type":"object"}}},"required":["columns","report"]},"ComparePoliciesColumnDTO":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"display":{"type":"string"}},"required":["name","label","type"]},"CompareDocumentsMultiDTO":{"type":"object","properties":{"size":{"type":"number"},"left":{"$ref":"#/components/schemas/CompareDocumentItemDTO"},"rights":{"type":"array","items":{"$ref":"#/components/schemas/CompareDocumentItemDTO"}},"totals":{"type":"array","items":{"type":"number"}},"documents":{"$ref":"#/components/schemas/CompareDocumentsSectionDTO"}},"required":["size","left","rights","totals","documents"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/compare/documents":{"post":{"description":"Compare documents. Only users with the Standard Registry role are allowed to make the request.","operationId":"AnalyticsApi_compareDocuments","parameters":[],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CompareDocumentsByIdsRequestDTO"},{"$ref":"#/components/schemas/CompareDocumentsByListRequestDTO"}]}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CompareDocumentsDTO"},{"$ref":"#/components/schemas/CompareDocumentsMultiDTO"}]}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Compare documents.","tags":["analytics"]}}}}
```

## Compare tools.

> Compare tools. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CompareToolsByIdsRequestDTO":{"type":"object","properties":{"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]},"eventsLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"propLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"childrenLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"toolId1":{"type":"string"},"toolId2":{"type":"string"}},"required":["toolId1","toolId2"]},"CompareToolsByListRequestDTO":{"type":"object","properties":{"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]},"eventsLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"propLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"childrenLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"toolIds":{"type":"array","items":{"type":"string"}}},"required":["toolIds"]},"CompareToolsDTO":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/CompareToolItemDTO"},"right":{"$ref":"#/components/schemas/CompareToolItemDTO"},"total":{"type":"number"},"blocks":{"$ref":"#/components/schemas/ComparePoliciesBlocksSectionDTO"},"inputEvents":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"outputEvents":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"variables":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"}},"required":["left","right","total","blocks","inputEvents","outputEvents","variables"]},"CompareToolItemDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"hash":{"type":"string","nullable":true},"messageId":{"type":"string","nullable":true}},"required":["id","name"]},"ComparePoliciesBlocksSectionDTO":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesColumnDTO"}},"report":{"description":"Rows may include additional dynamic fields in multi-compare mode","type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesBlocksReportRowDTO"}}},"required":["columns","report"]},"ComparePoliciesColumnDTO":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"display":{"type":"string"}},"required":["name","label","type"]},"ComparePoliciesBlocksReportRowDTO":{"type":"object","properties":{"lvl":{"type":"number"},"type":{"type":"string"},"block_type":{"type":"string"},"left_index":{"type":"number"},"left_type":{"type":"string"},"left_tag":{"type":"string"},"right_index":{"type":"number"},"right_type":{"type":"string"},"right_tag":{"type":"string"},"index_rate":{"type":"string"},"permission_rate":{"type":"string"},"prop_rate":{"type":"string"},"event_rate":{"type":"string"},"artifacts_rate":{"type":"string"},"total_rate":{"type":"string"},"left":{"$ref":"#/components/schemas/ComparePoliciesBlockSideDTO"},"right":{"$ref":"#/components/schemas/ComparePoliciesBlockSideDTO"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"events":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"size":{"type":"number","description":"Present in merged multi-compare report rows"}}},"ComparePoliciesBlockSideDTO":{"type":"object","properties":{"index":{"type":"number"},"blockType":{"type":"string"},"tag":{"type":"string"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesPropertyValueDTO"}},"events":{"description":"Block events payloads","type":"array","items":{"type":"object"}}},"required":["index","blockType","tag","properties","events"]},"ComparePoliciesPropertyValueDTO":{"type":"object","properties":{"name":{"type":"string"},"lvl":{"type":"number"},"path":{"type":"string"},"type":{"type":"string"},"value":{"type":"object","description":"Arbitrary property value"}},"required":["name","lvl","path","type","value"]},"ComparePoliciesRateEntryDTO":{"type":"object","properties":{"type":{"type":"string"},"totalRate":{"type":"number"},"items":{"description":"Pair of compared values, can include null","type":"array","items":{"type":"object"}},"name":{"type":"string"},"path":{"type":"string"},"lvl":{"type":"number"}},"required":["type","totalRate","items"]},"ComparePoliciesPropsSectionDTO":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesColumnDTO"}},"report":{"description":"Rows may include additional dynamic fields in multi-compare mode","type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesPropsReportRowDTO"}}},"required":["columns","report"]},"ComparePoliciesPropsReportRowDTO":{"type":"object","properties":{"left_name":{"type":"string"},"right_name":{"type":"string"},"total_rate":{"type":"string"},"left":{"type":"object"},"right":{"type":"object"},"type":{"type":"string"},"properties":{"type":"array","items":{"$ref":"#/components/schemas/ComparePoliciesRateEntryDTO"}},"size":{"type":"number","description":"Present in merged multi-compare report rows"}}},"CompareToolsMultiDTO":{"type":"object","properties":{"size":{"type":"number"},"left":{"$ref":"#/components/schemas/CompareToolItemDTO"},"rights":{"type":"array","items":{"$ref":"#/components/schemas/CompareToolItemDTO"}},"totals":{"type":"array","items":{"type":"number"}},"blocks":{"$ref":"#/components/schemas/ComparePoliciesBlocksSectionDTO"},"inputEvents":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"outputEvents":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"},"variables":{"$ref":"#/components/schemas/ComparePoliciesPropsSectionDTO"}},"required":["size","left","rights","totals","blocks","inputEvents","outputEvents","variables"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/compare/tools":{"post":{"description":"Compare tools. Only users with the Standard Registry role are allowed to make the request.","operationId":"AnalyticsApi_compareTools","parameters":[],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CompareToolsByIdsRequestDTO"},{"$ref":"#/components/schemas/CompareToolsByListRequestDTO"}]}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CompareToolsDTO"},{"$ref":"#/components/schemas/CompareToolsMultiDTO"}]}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Compare tools.","tags":["analytics"]}}}}
```

## Compare policies.

> Compare policies. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"FilterPoliciesDTO":{"type":"object","properties":{"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]},"eventsLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"propLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"childrenLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"policyId1":{"type":"string"},"policyId2":{"type":"string"},"policyIds":{"type":"array","items":{"type":"string"}},"policies":{"type":"array","items":{"$ref":"#/components/schemas/FilterPolicyDTO"}}}},"FilterPolicyDTO":{"type":"object","properties":{"type":{"type":"string","description":"Identifier type","enum":["id","message","file"]},"value":{"oneOf":[{"type":"string","description":"Policy ID"},{"type":"string","description":"Policy Message ID"},{"$ref":"#/components/schemas/CompareFileDTO","description":"Policy File"}]}},"required":["type","value"]},"CompareFileDTO":{"type":"object","properties":{"id":{"type":"string","description":"File ID"},"name":{"type":"string","description":"File Name"},"value":{"type":"string","description":"Buffer"}},"required":["id","name","value"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/compare/policies/export":{"post":{"description":"Compare policies. Only users with the Standard Registry role are allowed to make the request.","operationId":"AnalyticsApi_comparePoliciesExport","parameters":[{"name":"type","required":true,"in":"query","description":"File type","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterPoliciesDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"text/csv":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Compare policies.","tags":["analytics"]}}}}
```

## Compare modules.

> Compare modules. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"FilterModulesDTO":{"type":"object","properties":{"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]},"eventsLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"propLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"childrenLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"moduleId1":{"type":"string"},"moduleId2":{"type":"string"}},"required":["moduleId1","moduleId2"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/compare/modules/export":{"post":{"description":"Compare modules. Only users with the Standard Registry role are allowed to make the request.","operationId":"AnalyticsApi_compareModulesExport","parameters":[{"name":"type","required":true,"in":"query","description":"File type","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterModulesDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"text/csv":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Compare modules.","tags":["analytics"]}}}}
```

## Compare schemas.

> Compare schemas. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CompareSchemasByIdsRequestDTO":{"type":"object","properties":{"schemaId1":{"type":"string"},"schemaId2":{"type":"string"},"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]}},"required":["schemaId1","schemaId2"]},"CompareSchemasByListRequestDTO":{"type":"object","properties":{"schemas":{"type":"array","items":{"$ref":"#/components/schemas/FilterSchemaDTO"}},"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]}},"required":["schemas"]},"FilterSchemaDTO":{"type":"object","properties":{"type":{"type":"string","description":"Identifier type","enum":["id","policy-message","policy-file"]},"value":{"type":"string","description":"Schema ID"},"policy":{"oneOf":[{"description":"Policy Message ID","type":"string"},{"$ref":"#/components/schemas/CompareFileDTO","description":"Policy File"}]}},"required":["type","value"]},"CompareFileDTO":{"type":"object","properties":{"id":{"type":"string","description":"File ID"},"name":{"type":"string","description":"File Name"},"value":{"type":"string","description":"Buffer"}},"required":["id","name","value"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/compare/schemas/export":{"post":{"description":"Compare schemas. Only users with the Standard Registry role are allowed to make the request.","operationId":"AnalyticsApi_compareSchemasExport","parameters":[{"name":"type","required":true,"in":"query","description":"File type","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CompareSchemasByIdsRequestDTO"},{"$ref":"#/components/schemas/CompareSchemasByListRequestDTO"}]}}}},"responses":{"200":{"description":"Successful operation.","content":{"text/csv":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Compare schemas.","tags":["analytics"]}}}}
```

## Compare documents.

> Compare documents. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CompareDocumentsByIdsRequestDTO":{"type":"object","properties":{"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]},"eventsLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"propLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"childrenLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"documentId1":{"type":"string"},"documentId2":{"type":"string"}},"required":["documentId1","documentId2"]},"CompareDocumentsByListRequestDTO":{"type":"object","properties":{"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]},"eventsLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"propLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"childrenLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"documentIds":{"type":"array","items":{"type":"string"}}},"required":["documentIds"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/compare/documents/export":{"post":{"description":"Compare documents. Only users with the Standard Registry role are allowed to make the request.","operationId":"AnalyticsApi_compareDocumentsExport","parameters":[{"name":"type","required":true,"in":"query","description":"File type","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CompareDocumentsByIdsRequestDTO"},{"$ref":"#/components/schemas/CompareDocumentsByListRequestDTO"}]}}}},"responses":{"200":{"description":"Successful operation.","content":{"text/csv":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Compare documents.","tags":["analytics"]}}}}
```

## Compare tools.

> Compare tools. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CompareToolsByIdsRequestDTO":{"type":"object","properties":{"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]},"eventsLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"propLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"childrenLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"toolId1":{"type":"string"},"toolId2":{"type":"string"}},"required":["toolId1","toolId2"]},"CompareToolsByListRequestDTO":{"type":"object","properties":{"idLvl":{"oneOf":[{"type":"string","enum":["0","1"]},{"type":"number","enum":[0,1]}]},"eventsLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"propLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"childrenLvl":{"oneOf":[{"type":"string","enum":["0","1","2"]},{"type":"number","enum":[0,1,2]}]},"toolIds":{"type":"array","items":{"type":"string"}}},"required":["toolIds"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/compare/tools/export":{"post":{"description":"Compare tools. Only users with the Standard Registry role are allowed to make the request.","operationId":"AnalyticsApi_compareToolsExport","parameters":[{"name":"type","required":true,"in":"query","description":"File type","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CompareToolsByIdsRequestDTO"},{"$ref":"#/components/schemas/CompareToolsByListRequestDTO"}]}}}},"responses":{"200":{"description":"Successful operation.","content":{"text/csv":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Compare tools.","tags":["analytics"]}}}}
```

## Search same blocks.

> Search same blocks. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"FilterSearchBlocksDTO":{"type":"object","properties":{"id":{"type":"string"},"config":{"type":"object","description":"Root block config to search for similar blocks in published policies.","additionalProperties":true,"properties":{"id":{"type":"string"},"blockType":{"type":"string"},"uiMetaData":{"type":"object","additionalProperties":true},"permissions":{"type":"array","items":{"type":"string"}},"defaultActive":{"type":"boolean"},"onErrorAction":{"type":"string"},"tag":{"type":"string"},"children":{"type":"array","items":{"type":"object","additionalProperties":true}},"events":{"type":"array","items":{"type":"object","additionalProperties":true}},"artifacts":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"required":["id","config"]},"SearchBlocksDTO":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string"},"hash":{"type":"number"},"chains":{"type":"array","items":{"$ref":"#/components/schemas/SearchBlocksChainDTO"}}},"required":["name","description","version","owner","topicId","messageId","hash","chains"]},"SearchBlocksChainDTO":{"type":"object","properties":{"hash":{"type":"number"},"target":{"$ref":"#/components/schemas/SearchBlocksNodeDTO"},"pairs":{"type":"array","items":{"$ref":"#/components/schemas/SearchBlocksPairDTO"}}},"required":["hash","target","pairs"]},"SearchBlocksNodeDTO":{"type":"object","properties":{"id":{"type":"string"},"tag":{"type":"string"},"blockType":{"type":"string"},"config":{"type":"object","description":"Original block config (free-form object)","additionalProperties":true},"path":{"type":"array","items":{"type":"number"}}},"required":["id","tag","blockType","config","path"]},"SearchBlocksPairDTO":{"type":"object","properties":{"hash":{"type":"number"},"source":{"$ref":"#/components/schemas/SearchBlocksNodeDTO"},"filter":{"$ref":"#/components/schemas/SearchBlocksNodeDTO"}},"required":["hash","source","filter"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/search/blocks":{"post":{"description":"Search same blocks. Only users with the Standard Registry role are allowed to make the request.","operationId":"AnalyticsApi_searchBlocks","parameters":[],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterSearchBlocksDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SearchBlocksDTO"}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Search same blocks.","tags":["analytics"]}}}}
```

## Get Indexer Availability.

> Returns Indexer Availability (true/false).

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"analytics","description":"Query and export usage analytics across the platform.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/analytics/checkIndexer":{"get":{"description":"Returns Indexer Availability (true/false).","operationId":"AnalyticsApi_checkIndexerAvailability","parameters":[],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"boolean"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Get Indexer Availability.","tags":["analytics"]}}}}
```


---

# 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://guardian.hedera.com/api-reference-guardian/guardian-policies/analytics.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.
