# Policies

## Return a list of all policies.

> Returns all policies. Add Api-Version: 2 header to use status filter. Each item may include userGroups (all group rows for this user on that policy, including inactive) and userGroup (the last active group in server order—handy for UI labels, e.g. groupLabel or uuid). Typically, for Standard Registry on dry-run policies, userRole and userGroup reflect the last active role (often a virtual user), and userGroups contains the group rows for that role; when the last active role is Administrator, userGroups is \[]. For regular users, userGroups usually show roles on published policies.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"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":{"/policies":{"get":{"description":"Returns all policies. Add Api-Version: 2 header to use status filter. Each item may include userGroups (all group rows for this user on that policy, including inactive) and userGroup (the last active group in server order—handy for UI labels, e.g. groupLabel or uuid). Typically, for Standard Registry on dry-run policies, userRole and userGroup reflect the last active role (often a virtual user), and userGroups contains the group rows for that role; when the last active role is Administrator, userGroups is []. For regular users, userGroups usually show roles on published policies.","operationId":"PolicyApi_getPoliciesV2_2","parameters":[{"name":"pageIndex","required":false,"in":"query","description":"The number of pages to skip before starting to collect the result set","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"The numbers of items to return","schema":{"type":"number"}},{"name":"type","required":false,"in":"query","description":"Policy type","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","explode":false,"description":"Policy status. Multiple values are passed as a comma-separated list. In Swagger UI, select several values from the list by holding Ctrl (Windows/Linux) or Command (macOS).","schema":{"type":"array","items":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]}}},{"name":"Api-Version","in":"header","description":"Use \"2\" for this endpoint (supports status filter).","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation. Two examples: regular user (userGroups usually reflect roles on published policies) and Standard Registry (dry-run: last active role and its userGroups; Administrator has userGroups []). Other combinations are possible depending on policy state and assignments.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyDTO"}}}}},"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":"Return a list of all policies.","tags":["policies"]}}}}
```

## Creates a new policy.

> Creates a new policy. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"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":{"/policies":{"post":{"description":"Creates a new policy. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_createPolicy","parameters":[],"requestBody":{"required":true,"description":"Policy configuration (methodology fields, category ids, etc.). Server fills ids, roles, tools, and other persisted fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDTO"}}}},"responses":{"201":{"description":"Successful operation. Returns the full policy list (same as GET /policies) after creation.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyDTO"}}}}},"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":"Creates a new policy.","tags":["policies"]}}}}
```

## Return a list of all policies with imported records (excluding one policy).

> Returns policies that have a records topic (draft/dry-run/demo/view), \*\*excluding\*\* the policy identified by \`policyId\`. There is \*\*no request body\*\*—only the path segment. The path value is used to omit that policy from the result (e.g. the record-import dialog so “another policy” does not include the one you are open on).

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"BasePolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"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":{"/policies/with-imported-records/{policyId}":{"get":{"description":"Returns policies that have a records topic (draft/dry-run/demo/view), **excluding** the policy identified by `policyId`. There is **no request body**—only the path segment. The path value is used to omit that policy from the result (e.g. the record-import dialog so “another policy” does not include the one you are open on).","operationId":"PolicyApi_getPoliciesWithImportedRecords","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy id to **exclude** from the returned list. Pass the current policy id from the client context; the server uses this value only for that exclusion filter.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BasePolicyDTO"}}}}},"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":"Return a list of all policies with imported records (excluding one policy).","tags":["policies"]}}}}
```

## Migrate policy data.

> Migrate policy data. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"MigrationConfigDTO":{"type":"object","properties":{"policies":{"$ref":"#/components/schemas/MigrationConfigPoliciesDTO"},"vcs":{"type":"array","items":{"type":"string"}},"vps":{"type":"array","items":{"type":"string"}},"schemas":{"type":"object","additionalProperties":{"type":"string"}},"groups":{"type":"object","additionalProperties":{"type":"string"}},"roles":{"type":"object","additionalProperties":{"type":"string"}},"blocks":{"type":"object","additionalProperties":{"type":"string"}},"tokens":{"type":"object","additionalProperties":{"type":"string"}},"tokensMap":{"type":"object","additionalProperties":{"type":"string"}},"migrateState":{"type":"boolean"},"migrateRetirePools":{"type":"boolean"},"editedVCs":{"type":"object","additionalProperties":{"type":"string"}},"retireContractId":{"type":"string"},"mode":{"type":"string","enum":["start_new","resume","retry_failed"],"default":"start_new"},"runId":{"type":"string"}},"required":["policies","vcs","vps","schemas","groups","roles","blocks","tokens","tokensMap","migrateState","migrateRetirePools","editedVCs","retireContractId"]},"MigrationConfigPoliciesDTO":{"type":"object","properties":{"src":{"type":"string"},"dst":{"type":"string"}},"required":["src","dst"]},"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":{"/policies/migrate-data":{"post":{"description":"Migrate policy data. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_migrateData","parameters":[],"requestBody":{"required":true,"description":"Migration config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationConfigDTO"}}}},"responses":{"200":{"description":"Array of migration issues per document. Empty array when migration completed without per-document errors. Each item includes id and message (e.g. JSON_SCHEMA_VALIDATION_ERROR).","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Document or entity id related to the error"},"message":{"type":"string","description":"Error message"}}}}}}},"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":"Migrate policy data.","tags":["policies"]}}}}
```

## Migrate policy data asynchronous.

> Migrate policy data asynchronous. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"MigrationConfigDTO":{"type":"object","properties":{"policies":{"$ref":"#/components/schemas/MigrationConfigPoliciesDTO"},"vcs":{"type":"array","items":{"type":"string"}},"vps":{"type":"array","items":{"type":"string"}},"schemas":{"type":"object","additionalProperties":{"type":"string"}},"groups":{"type":"object","additionalProperties":{"type":"string"}},"roles":{"type":"object","additionalProperties":{"type":"string"}},"blocks":{"type":"object","additionalProperties":{"type":"string"}},"tokens":{"type":"object","additionalProperties":{"type":"string"}},"tokensMap":{"type":"object","additionalProperties":{"type":"string"}},"migrateState":{"type":"boolean"},"migrateRetirePools":{"type":"boolean"},"editedVCs":{"type":"object","additionalProperties":{"type":"string"}},"retireContractId":{"type":"string"},"mode":{"type":"string","enum":["start_new","resume","retry_failed"],"default":"start_new"},"runId":{"type":"string"}},"required":["policies","vcs","vps","schemas","groups","roles","blocks","tokens","tokensMap","migrateState","migrateRetirePools","editedVCs","retireContractId"]},"MigrationConfigPoliciesDTO":{"type":"object","properties":{"src":{"type":"string"},"dst":{"type":"string"}},"required":["src","dst"]},"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"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":{"/policies/push/migrate-data":{"post":{"description":"Migrate policy data asynchronous. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_migrateDataAsync","parameters":[],"requestBody":{"required":true,"description":"Migration configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationConfigDTO"}}}},"responses":{"202":{"description":"Created task.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"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":"Migrate policy data asynchronous.","tags":["policies"]}}}}
```

## Resume migration asynchronous.

> Resume migration asynchronous. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"BadRequestErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"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":{"/policies/push/migrate-data/resume":{"post":{"description":"Resume migration asynchronous. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_resumeMigrateDataAsync","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["runId"],"properties":{"runId":{"type":"string"}}}}}},"responses":{"202":{"description":"Created task.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"400":{"description":"Missing or empty `runId` in body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDTO"}}}},"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":"Resume migration asynchronous.","tags":["policies"]}}}}
```

## Retry failed migration items asynchronous.

> Retry failed migration items asynchronous. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"BadRequestErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"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":{"/policies/push/migrate-data/retry-failed":{"post":{"description":"Retry failed migration items asynchronous. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_retryFailedMigrateDataAsync","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["runId"],"properties":{"runId":{"type":"string","description":"Migration run id whose failed items should be retried."}}}}}},"responses":{"202":{"description":"Created task.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"400":{"description":"Missing or empty `runId` in body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDTO"}}}},"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":"Retry failed migration items asynchronous.","tags":["policies"]}}}}
```

## Get migration status by policy pair.

> Returns latest migration run status for source/destination pair. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"MigrationStatusResponseDTO":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MigrationRunStatusDTO"}}},"required":["items"]},"MigrationRunStatusDTO":{"type":"object","properties":{"runId":{"type":"string"},"srcPolicyId":{"type":"string"},"dstPolicyId":{"type":"string"},"status":{"type":"string","enum":["running","completed","failed","stopped"]},"isDryRun":{"type":"boolean"},"startedAt":{"type":"string","format":"date-time","nullable":true},"finishedAt":{"type":"string","format":"date-time","nullable":true},"summary":{"type":"object","additionalProperties":true},"failedItems":{"type":"array","items":{"$ref":"#/components/schemas/MigrationFailedItemDTO"}}},"required":["runId","srcPolicyId","dstPolicyId","status","startedAt","finishedAt","summary"]},"MigrationFailedItemDTO":{"type":"object","properties":{"srcPolicyId":{"type":"string"},"dstPolicyId":{"type":"string"},"entityType":{"type":"string"},"srcEntityId":{"type":"string"},"runId":{"type":"string"},"attemptCount":{"type":"number"},"errorCode":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true},"firstFailedAt":{"type":"string","format":"date-time"},"lastFailedAt":{"type":"string","format":"date-time"}},"required":["srcPolicyId","dstPolicyId","entityType","srcEntityId","runId","attemptCount","errorCode","errorMessage","firstFailedAt","lastFailedAt"]},"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":{"/policies/migrate-data/status":{"get":{"description":"Returns latest migration run status for source/destination pair. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getMigrationStatus","parameters":[{"name":"srcPolicyId","required":true,"in":"query","schema":{"type":"string"}},{"name":"dstPolicyId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Migration run status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationStatusResponseDTO"}}}},"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 migration status by policy pair.","tags":["policies"]}}}}
```

## Get migration runs list.

> Returns migration runs.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"MigrationRunsResponseDTO":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MigrationRunStatusDTO"}},"count":{"type":"number"},"pageIndex":{"type":"number"},"pageSize":{"type":"number"}},"required":["items","count","pageIndex","pageSize"]},"MigrationRunStatusDTO":{"type":"object","properties":{"runId":{"type":"string"},"srcPolicyId":{"type":"string"},"dstPolicyId":{"type":"string"},"status":{"type":"string","enum":["running","completed","failed","stopped"]},"isDryRun":{"type":"boolean"},"startedAt":{"type":"string","format":"date-time","nullable":true},"finishedAt":{"type":"string","format":"date-time","nullable":true},"summary":{"type":"object","additionalProperties":true},"failedItems":{"type":"array","items":{"$ref":"#/components/schemas/MigrationFailedItemDTO"}}},"required":["runId","srcPolicyId","dstPolicyId","status","startedAt","finishedAt","summary"]},"MigrationFailedItemDTO":{"type":"object","properties":{"srcPolicyId":{"type":"string"},"dstPolicyId":{"type":"string"},"entityType":{"type":"string"},"srcEntityId":{"type":"string"},"runId":{"type":"string"},"attemptCount":{"type":"number"},"errorCode":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true},"firstFailedAt":{"type":"string","format":"date-time"},"lastFailedAt":{"type":"string","format":"date-time"}},"required":["srcPolicyId","dstPolicyId","entityType","srcEntityId","runId","attemptCount","errorCode","errorMessage","firstFailedAt","lastFailedAt"]},"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":{"/policies/migrate-data/runs":{"get":{"description":"Returns migration runs.","operationId":"PolicyApi_getMigrationRuns","parameters":[{"name":"pageIndex","required":false,"in":"query","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"type":"number"}},{"name":"status","required":false,"in":"query","explode":false,"description":"Filter by migration run status: `running`, `completed`, `failed`, `stopped`. Multiple values are passed as a comma-separated list. In Swagger UI, select several values from the list by holding Ctrl (Windows/Linux) or Command (macOS).","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Migration runs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationRunsResponseDTO"}}}},"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 migration runs list.","tags":["policies"]}}}}
```

## Creates a new policy.

> Creates a new policy. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"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":{"/policies/push":{"post":{"description":"Creates a new policy. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_createPolicyAsync","parameters":[],"requestBody":{"required":true,"description":"Policy configuration (methodology fields, category ids, etc.). Server fills ids, roles, tools, and other persisted fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDTO"}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"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":"Creates a new policy.","tags":["policies"]}}}}
```

## Clones policy.

> Clones policy. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"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":{"/policies/push/{policyId}":{"post":{"description":"Clones policy. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_updatePolicyAsync","parameters":[{"name":"policyId","required":true,"in":"path","description":"Source policy id to clone. The new policy is created asynchronously; optional overrides in the body apply `name`, `topicDescription`, `description`, and `policyTag` (see clone/import flow).","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Policy configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDTO"}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"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":"Clones policy.","tags":["policies"]}}}}
```

## Remove policy.

> Remove policy. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"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":{"/policies/push/{policyId}":{"delete":{"description":"Remove policy. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_deletePolicyAsync","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"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":"Remove policy.","tags":["policies"]}}}}
```

## Remove multiple policies.

> Remove multiple policies by their IDs. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"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":{"/policies/push/delete-multiple":{"post":{"description":"Remove multiple policies by their IDs. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_deletePoliciesAsync","parameters":[],"requestBody":{"required":true,"description":"List of policy IDs to delete.","content":{"application/json":{"schema":{"type":"object","required":["policyIds"],"properties":{"policyIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"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":"Remove multiple policies.","tags":["policies"]}}}}
```

## Retrieves policy configuration.

> Retrieves policy configuration for the specified policy ID for users who have API permission to read, execute, manage, or audit policies and access to that policy.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"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":{"/policies/{policyId}":{"get":{"description":"Retrieves policy configuration for the specified policy ID for users who have API permission to read, execute, manage, or audit policies and access to that policy.","operationId":"PolicyApi_getPolicy","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Policy configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDTO"}}}},"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":"Retrieves policy configuration.","tags":["policies"]}}}}
```

## Updates policy configuration.

> Updates policy configuration for the specified policy ID. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"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"]},"NotFoundErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policies/{policyId}":{"put":{"description":"Updates policy configuration for the specified policy ID. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_updatePolicy","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Policy configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDTO"}}}},"responses":{"200":{"description":"Policy configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Updates policy configuration.","tags":["policies"]}}}}
```

## Disconnected policy state for the current user.

> Returns JSON \`null\` when the current user is \*\*not\*\* in a local disconnected state for this policy. Returns the policy configuration (\`PolicyDTO\`) when the user \*\*is\*\* disconnected (same enrichment as policy info for the viewer).

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"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":{"/policies/{policyId}/disconnected":{"get":{"description":"Returns JSON `null` when the current user is **not** in a local disconnected state for this policy. Returns the policy configuration (`PolicyDTO`) when the user **is** disconnected (same enrichment as policy info for the viewer).","operationId":"PolicyApi_getDisconnectedPolicy","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"`null` if not disconnected; otherwise the policy object for the disconnected user.","content":{"application/json":{"schema":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PolicyDTO"}]}}}},"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":"Disconnected policy state for the current user.","tags":["policies"]}}}}
```

## Returns auto-generated API documentation for the policy.

> Returns a list of documented API actions with relative URLs for the specified policy.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/about":{"get":{"description":"Returns a list of documented API actions with relative URLs for the specified policy.","operationId":"PolicyApi_getPolicyDocumentation","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Policy documentation entries.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}},"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":"Returns auto-generated API documentation for the policy.","tags":["policies"]}}}}
```

## Publishes the policy onto IPFS.

> Publishes the policy with the specified (internal) policy ID onto IPFS, sends a message featuring its IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyVersionDTO":{"type":"object","properties":{"policyVersion":{"type":"string"},"policyAvailability":{"type":"string","enum":["private","public"]},"recordingEnabled":{"type":"boolean","description":"Record policy actions"}},"required":["policyVersion"]},"PoliciesValidationDTO":{"type":"object","properties":{"policies":{"type":"array","items":{"$ref":"#/components/schemas/PolicyDTO"}},"isValid":{"type":"string"},"errors":{"$ref":"#/components/schemas/ValidationErrorsDTO"}},"required":["policies","isValid","errors"]},"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"ValidationErrorsDTO":{"type":"object","properties":{"blocks":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/BlockErrorsDTO"}},"errors":{"nullable":true,"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"infos":{"type":"array","items":{"type":"string"}},"id":{"type":"string","description":"Config block ID (for tool validation)"},"tools":{"type":"array","items":{"type":"object"},"description":"Tool-level errors (for tool validation)"},"isValid":{"type":"boolean","description":"Overall validation result (for tool validation)"}},"required":["blocks","errors","tools","isValid"]},"BlockErrorsDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"infos":{"type":"array","items":{"type":"string"}},"isValid":{"type":"boolean"}},"required":["id","name","errors","isValid"]},"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":{"/policies/{policyId}/publish":{"put":{"description":"Publishes the policy with the specified (internal) policy ID onto IPFS, sends a message featuring its IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_publishPolicy","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Options.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyVersionDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoliciesValidationDTO"}}}},"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":"Publishes the policy onto IPFS.","tags":["policies"]}}}}
```

## Publishes the policy onto IPFS.

> Publishes the policy with the specified (internal) policy ID onto IPFS, sends a message featuring its IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyVersionDTO":{"type":"object","properties":{"policyVersion":{"type":"string"},"policyAvailability":{"type":"string","enum":["private","public"]},"recordingEnabled":{"type":"boolean","description":"Record policy actions"}},"required":["policyVersion"]},"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"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":{"/policies/push/{policyId}/publish":{"put":{"description":"Publishes the policy with the specified (internal) policy ID onto IPFS, sends a message featuring its IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_publishPolicyAsync","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Options.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyVersionDTO"}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"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":"Publishes the policy onto IPFS.","tags":["policies"]}}}}
```

## Dry Run policy.

> Switches the specified policy into dry-run mode and returns the resulting validation payload. Dry-run mode is intended for testing and simulation without executing real transactions. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Object":{"type":"object","properties":{}},"PoliciesValidationDTO":{"type":"object","properties":{"policies":{"type":"array","items":{"$ref":"#/components/schemas/PolicyDTO"}},"isValid":{"type":"string"},"errors":{"$ref":"#/components/schemas/ValidationErrorsDTO"}},"required":["policies","isValid","errors"]},"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"ValidationErrorsDTO":{"type":"object","properties":{"blocks":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/BlockErrorsDTO"}},"errors":{"nullable":true,"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"infos":{"type":"array","items":{"type":"string"}},"id":{"type":"string","description":"Config block ID (for tool validation)"},"tools":{"type":"array","items":{"type":"object"},"description":"Tool-level errors (for tool validation)"},"isValid":{"type":"boolean","description":"Overall validation result (for tool validation)"}},"required":["blocks","errors","tools","isValid"]},"BlockErrorsDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"infos":{"type":"array","items":{"type":"string"}},"isValid":{"type":"boolean"}},"required":["id","name","errors","isValid"]},"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":{"/policies/{policyId}/dry-run":{"put":{"description":"Switches the specified policy into dry-run mode and returns the resulting validation payload. Dry-run mode is intended for testing and simulation without executing real transactions. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_dryRunPolicy","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Options.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoliciesValidationDTO"}}}},"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":"Dry Run policy.","tags":["policies"]}}}}
```

## Discontinue policy.

> Discontinues the policy. For an immediate discontinue, send an empty JSON object \`{}\`. For a scheduled discontinue, send a body with \`date\` as an ISO-8601 timestamp (UTC).  Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"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":{"/policies/{policyId}/discontinue":{"put":{"description":"Discontinues the policy. For an immediate discontinue, send an empty JSON object `{}`. For a scheduled discontinue, send a body with `date` as an ISO-8601 timestamp (UTC).  Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_discontinuePolicy","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Optional fields. Omit `date` (or send `{}`) to discontinue immediately; include `date` to discontinue at the given time.","content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date-time","description":"UTC instant when the policy should be discontinued (omit for immediate)."}}}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyDTO"}}}}},"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":"Discontinue policy.","tags":["policies"]}}}}
```

## Return policy to editing.

> Return policy to editing. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"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":{"/policies/{policyId}/draft":{"put":{"description":"Return policy to editing. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_draftPolicy","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyDTO"}}}}},"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":"Return policy to editing.","tags":["policies"]}}}}
```

## Validates policy.

> Validates the policy configuration provided in the request body. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"PolicyValidationDTO":{"type":"object","properties":{"policy":{"$ref":"#/components/schemas/PolicyDTO"},"results":{"$ref":"#/components/schemas/ValidationErrorsDTO"}},"required":["policy","results"]},"ValidationErrorsDTO":{"type":"object","properties":{"blocks":{"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/BlockErrorsDTO"}},"errors":{"nullable":true,"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"infos":{"type":"array","items":{"type":"string"}},"id":{"type":"string","description":"Config block ID (for tool validation)"},"tools":{"type":"array","items":{"type":"object"},"description":"Tool-level errors (for tool validation)"},"isValid":{"type":"boolean","description":"Overall validation result (for tool validation)"}},"required":["blocks","errors","tools","isValid"]},"BlockErrorsDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"infos":{"type":"array","items":{"type":"string"}},"isValid":{"type":"boolean"}},"required":["id","name","errors","isValid"]},"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":{"/policies/validate":{"post":{"description":"Validates the policy configuration provided in the request body. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_validatePolicy","parameters":[],"requestBody":{"required":true,"description":"Policy configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDTO"}}}},"responses":{"200":{"description":"Validation result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyValidationDTO"}}}},"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":"Validates policy.","tags":["policies"]}}}}
```

## Disconnects the user from the selected policy.

> Disconnects the user from the selected policy. On success the response body is the boolean \`true\`.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/disconnect":{"put":{"description":"Disconnects the user from the selected policy. On success the response body is the boolean `true`.","operationId":"PolicyApi_disconnectPolicy","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns `true` when the disconnect succeeds.","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":"Disconnects the user from the selected policy.","tags":["policies"]}}}}
```

## Restores the user’s participation in the policy after disconnection.

> Restores the user’s participation in the policy after disconnection. On success the response body is the boolean \`true\`.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/reconnect":{"put":{"description":"Restores the user’s participation in the policy after disconnection. On success the response body is the boolean `true`.","operationId":"PolicyApi_reconnectPolicy","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns `true` when the reconnect succeeds.","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":"Restores the user’s participation in the policy after disconnection.","tags":["policies"]}}}}
```

## Returns a policy navigation.

> Returns policy navigation. Optional \`savepointIds\` (stringified JSON array) scopes navigation to a dry-run savepoint state when provided.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/navigation":{"get":{"description":"Returns policy navigation. Optional `savepointIds` (stringified JSON array) scopes navigation to a dry-run savepoint state when provided.","operationId":"PolicyApi_getPolicyNavigation","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"savepointIds","required":false,"in":"query","description":"Optional. Savepoint ids as a JSON array of strings, passed as a single query value (stringified JSON). Parsed with the rest of the query and sent to the engine.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object"}}}},"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":"Returns a policy navigation.","tags":["policies"]}}}}
```

## Returns a list of groups the user is a member of.

> Returns groups for the current user. Optional \`savepointIds\` (stringified JSON array) scopes groups to a dry-run savepoint state when provided.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/groups":{"get":{"description":"Returns groups for the current user. Optional `savepointIds` (stringified JSON array) scopes groups to a dry-run savepoint state when provided.","operationId":"PolicyApi_getPolicyGroups","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"savepointIds","required":false,"in":"query","description":"Optional. JSON array of savepoint id strings, sent as a single query value (stringified JSON). Invalid values yield 400.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object"}}}},"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":"Returns a list of groups the user is a member of.","tags":["policies"]}}}}
```

## Select a policy group or return to Default State.

> Sets the active group for the current user on this policy. Send \`uuid: null\` to enter Default State (not tied to a specific group); from there you may create a new group if you want. Send \`uuid\` with an existing group identifier to switch to that group.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/groups":{"post":{"description":"Sets the active group for the current user on this policy. Send `uuid: null` to enter Default State (not tied to a specific group); from there you may create a new group if you want. Send `uuid` with an existing group identifier to switch to that group.","operationId":"PolicyApi_setPolicyGroups","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Single field `uuid`: JSON `null` moves the user to Default State (where a new group can be created later if desired); a string uuid selects an existing group.","content":{"application/json":{"schema":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","nullable":true,"description":"An existing group uuid, or JSON `null` for Default State."}}}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object"}}}},"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":"Select a policy group or return to Default State.","tags":["policies"]}}}}
```

## Get policy documents.

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

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/documents":{"get":{"description":"Get policy documents. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getPolicyDocuments","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Document type.","schema":{"enum":["VC","VP"],"type":"string"}},{"name":"includeDocument","required":false,"in":"query","description":"Include document field.","schema":{"type":"boolean"}},{"name":"pageIndex","required":false,"in":"query","description":"The number of pages to skip before starting to collect the result set","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"The numbers of items to return","schema":{"type":"number"}}],"responses":{"200":{"description":"JSON array of document index rows (fields vary by stored record). `X-Total-Count` is the total matching rows for paging.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"schema":{"type":"string","description":"Schema IRI / version key"},"owner":{"type":"string","description":"Owner DID"},"messageId":{"type":"string","description":"Hedera consensus message id"},"id":{"type":"string","description":"Document record id"}}}}}}},"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 policy documents.","tags":["policies"]}}}}
```

## Get policy documents with filters.

> Get policy documents with filters.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/search-documents":{"get":{"description":"Get policy documents with filters.","operationId":"PolicyApi_getPolicyDocumentsExport","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"textSearch","required":false,"in":"query","description":"Text search","schema":{"type":"string"}},{"name":"schemas","required":false,"in":"query","description":"Schemas","schema":{"type":"string"}},{"name":"owners","required":false,"in":"query","description":"Owners","schema":{"type":"string"}},{"name":"tokens","required":false,"in":"query","description":"Tokens","schema":{"type":"string"}},{"name":"related","required":false,"in":"query","description":"Related","schema":{"type":"string"}},{"name":"pageIndex","required":false,"in":"query","description":"The number of pages to skip before starting to collect the result set","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"The numbers of items to return","schema":{"type":"number"}}],"responses":{"200":{"description":"Documents.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"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"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Get policy documents with filters.","tags":["policies"]}}}}
```

## Export policy documents as a ZIP archive.

> Exports policy documents and related filtered data as a ZIP archive.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/export-documents":{"get":{"description":"Exports policy documents and related filtered data as a ZIP archive.","operationId":"PolicyApi_exportPolicyDocuments","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"ids","required":false,"in":"query","description":"Ids","schema":{"type":"string"}},{"name":"textSearch","required":false,"in":"query","description":"Text search","schema":{"type":"string"}},{"name":"schemas","required":false,"in":"query","description":"Schemas","schema":{"type":"string"}},{"name":"owners","required":false,"in":"query","description":"Owners","schema":{"type":"string"}},{"name":"tokens","required":false,"in":"query","description":"Tokens","schema":{"type":"string"}},{"name":"related","required":false,"in":"query","description":"Related","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation. Response zip file.","content":{"application/json":{"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"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Export policy documents as a ZIP archive.","tags":["policies"]}}}}
```

## Get policy document owners.

> Get policy document owners.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/document-owners":{"get":{"description":"Get policy document owners.","operationId":"PolicyApi_getDocumentOwners","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"JSON array of distinct document-owner DIDs (strings). `X-Total-Count` matches array length for Standard Registry; other roles receive a single-element array.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"string","description":"Hedera DID of a document owner"}}}}},"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 policy document owners.","tags":["policies"]}}}}
```

## Get policy tokens.

> Get policy tokens.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/tokens":{"get":{"description":"Get policy tokens.","operationId":"PolicyApi_getTokens","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Token Ids.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"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"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Get policy tokens.","tags":["policies"]}}}}
```

## Download policy data export archive.

> Downloads a ZIP archive (served with \`.data\` filename extension) containing policy migration/export content. Typical entries include \`policy.json\`, \`blocks.json\`, \`users.json\`, \`userTopic.json\`, plus folders generated from loaders such as \`vcs/\`, \`vps/\`, \`tokens/\`, and related files (\`multiDocuments/\`, \`documentStates/\`, \`mintRequests/\`, \`mintTransactions/\`, \`retirePools/\`). Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/data":{"get":{"description":"Downloads a ZIP archive (served with `.data` filename extension) containing policy migration/export content. Typical entries include `policy.json`, `blocks.json`, `users.json`, `userTopic.json`, plus folders generated from loaders such as `vcs/`, `vps/`, `tokens/`, and related files (`multiDocuments/`, `documentStates/`, `mintRequests/`, `mintTransactions/`, `retirePools/`). Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_downloadPolicyData","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"ZIP binary payload with exported policy data and related entities for migration/import.","content":{"application/zip":{"schema":{"type":"string","format":"binary"}},"application/policy-data":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized request.","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}},"application/policy-data":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}},"application/policy-data":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}},"application/policy-data":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Download policy data export archive.","tags":["policies"]}}}}
```

## Upload policy data.

> Upload policy data. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/data":{"post":{"description":"Upload policy data. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_uploadPolicyData","parameters":[],"requestBody":{"required":true,"description":"Raw bytes of the `.data` export archive. Send with `Content-Type: binary/octet-stream` (same as other binary imports in this API).","content":{"binary/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Uploaded policy.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"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":"Upload policy data.","tags":["policies"]}}}}
```

## Download virtual keys and DID documents (ZIP).

> Returns a ZIP archive (DEFLATE) with virtual keys and DID documents for the policy dry run / demo context. The response uses \`Content-Type: application/virtual-keys\` and \`Content-Disposition: attachment\` with a \`.vk\` filename derived from the policy name. Archive layout: folder \`virtualKeys/\` — one \`.json\` file per virtual key (participant DIDs, excluding the Standard Registry owner DID); folder \`dids/\` — one \`.json\` file per DID document.  Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/virtual-keys":{"get":{"description":"Returns a ZIP archive (DEFLATE) with virtual keys and DID documents for the policy dry run / demo context. The response uses `Content-Type: application/virtual-keys` and `Content-Disposition: attachment` with a `.vk` filename derived from the policy name. Archive layout: folder `virtualKeys/` — one `.json` file per virtual key (participant DIDs, excluding the Standard Registry owner DID); folder `dids/` — one `.json` file per DID document.  Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_downloadVirtualKeys","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Binary body: ZIP archive as described in the operation summary (not JSON).","content":{"application/virtual-keys":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized request.","content":{"application/virtual-keys":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/virtual-keys":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/virtual-keys":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Download virtual keys and DID documents (ZIP).","tags":["policies"]}}}}
```

## Upload virtual keys and DID documents (ZIP).

> Imports the same ZIP layout as \`GET /policies/{policyId}/virtual-keys\` exports: folders \`virtualKeys/\` and \`dids/\` with JSON files. Send raw archive bytes with \`Content-Type: binary/octet-stream\` (e.g. a \`.vk\` file from export).  Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/virtual-keys":{"post":{"description":"Imports the same ZIP layout as `GET /policies/{policyId}/virtual-keys` exports: folders `virtualKeys/` and `dids/` with JSON files. Send raw archive bytes with `Content-Type: binary/octet-stream` (e.g. a `.vk` file from export).  Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_uploadVirtualKeys","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Raw bytes of the virtual-keys ZIP (same structure as the download endpoint). Use `Content-Type: binary/octet-stream`.","content":{"binary/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Import finished successfully. The response body is JSON `null` (no object payload).","content":{"application/json":{"schema":{"nullable":true,"description":"Null on success."}}}},"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":"Upload virtual keys and DID documents (ZIP).","tags":["policies"]}}}}
```

## Tag → block id map.

> Maps each block tag to its instance UUID for this policy.  Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/tag-block-map":{"get":{"description":"Maps each block tag to its instance UUID for this policy.  Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getTagBlockMap","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Record of block tag → block instance UUID.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}}}}},"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":"Tag → block id map.","tags":["policies"]}}}}
```

## Retrieves data for the policy root block.

> Returns data from the root policy block. Users with permission to execute or manage the policy can make this request. If the root block is not available to the caller at the current policy stage or time, the request may fail.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"BlockDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/BlockDTO"}}},"required":["id","blockType","blocks"]},"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"]},"ServiceUnavailableErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policies/{policyId}/blocks":{"get":{"description":"Returns data from the root policy block. Users with permission to execute or manage the policy can make this request. If the root block is not available to the caller at the current policy stage or time, the request may fail.","operationId":"PolicyApi_getPolicyBlocks","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"savepointIds","required":false,"in":"query","description":"Optional. Savepoint ids (JSON array or stringified JSON). Parsed and passed with the rest of the query object to the engine.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockDTO"}}}},"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"}}}},"503":{"description":"Block Unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableErrorDTO"}}}}},"summary":"Retrieves data for the policy root block.","tags":["policies"]}}}}
```

## Get block data by UUID.

> Returns the block payload for the specified UUID. Within a policy, different roles may see different blocks at different stages or moments of the workflow. If the requested block is not available to the caller’s role at this time, the API responds with \`422 Unprocessable Entity\` and \`message: "Block Unavailable"\` (see response example).

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"BlockDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/BlockDTO"}}},"required":["id","blockType","blocks"]},"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"]},"ServiceUnavailableErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policies/{policyId}/blocks/{uuid}":{"get":{"description":"Returns the block payload for the specified UUID. Within a policy, different roles may see different blocks at different stages or moments of the workflow. If the requested block is not available to the caller’s role at this time, the API responds with `422 Unprocessable Entity` and `message: \"Block Unavailable\"` (see response example).","operationId":"PolicyApi_getBlockData","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"uuid","required":true,"in":"path","description":"Block Identifier","schema":{"type":"string"}},{"name":"savepointIds","required":false,"in":"query","description":"Optional. Savepoint ids (JSON array or stringified JSON). Parsed and passed with the rest of the query object to the engine.","schema":{"type":"string"}}],"responses":{"200":{"description":"Block document. The OpenAPI schema is a minimal `BlockDTO`; actual responses include additional fields per block type—see the example.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockDTO"}}}},"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":"Block not available to the current role at this policy stage or time (including when the user’s role does not match the block configuration).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}},"503":{"description":"Block Unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableErrorDTO"}}}}},"summary":"Get block data by UUID.","tags":["policies"]}}}}
```

## Send data to block by UUID.

> Sends block-specific input to the block identified by \`uuid\` and returns the block action result.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Object":{"type":"object","properties":{}},"BlockDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/BlockDTO"}}},"required":["id","blockType","blocks"]},"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"]},"ServiceUnavailableErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policies/{policyId}/blocks/{uuid}":{"post":{"description":"Sends block-specific input to the block identified by `uuid` and returns the block action result.","operationId":"PolicyApi_setBlockData","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"uuid","required":true,"in":"path","description":"Block Identifier","schema":{"type":"string"}},{"name":"timeout","required":false,"in":"query","description":"Optional engine timeout in milliseconds. Forwarded to guardian-service and clamped there to the range 10 ms to 1 hour.","schema":{"default":60000,"type":"number"}},{"name":"waitRemotePolicy","required":false,"in":"query","description":"Optional. Parsed as boolean in the API Gateway. If `true`, waits for a response from the remote policy action.","schema":{"default":true,"type":"boolean"}}],"requestBody":{"required":true,"description":"Data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockDTO"}}}},"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"}}}},"503":{"description":"Block Unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableErrorDTO"}}}}},"summary":"Send data to block by UUID.","tags":["policies"]}}}}
```

## Get mint requests for a policy.

> Returns paginated mint requests for the specified policy with optional filters.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/mint-requests":{"get":{"description":"Returns paginated mint requests for the specified policy with optional filters.","operationId":"PolicyApi_getMintRequests","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status filter (error, pending, success)","schema":{"type":"string"}},{"name":"target","required":false,"in":"query","description":"Account ID filter","schema":{"type":"string"}},{"name":"vpMessageId","required":false,"in":"query","description":"VP Message ID filter","schema":{"type":"string"}},{"name":"pageIndex","required":false,"in":"query","description":"The number of pages to skip before starting to collect the result set","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"The numbers of items to return","schema":{"type":"number"}}],"responses":{"200":{"description":"Mint requests.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"number","description":"Amount to mint"},"tokenId":{"type":"string","description":"Token identifier"},"tokenType":{"type":"string","enum":["FUNGIBLE","NON_FUNGIBLE"],"description":"Token type"},"target":{"type":"string","description":"Target account"},"vpMessageId":{"type":"string","description":"VP message identifier"},"isMintNeeded":{"type":"boolean","description":"Whether minting is still needed"},"isTransferNeeded":{"type":"boolean","description":"Whether transfer is needed"},"memo":{"type":"string","description":"Transaction memo"},"metadata":{"type":"string","nullable":true,"description":"Metadata"},"error":{"type":"string","nullable":true,"description":"Error message if mint failed"},"processDate":{"type":"string","format":"date-time","nullable":true,"description":"Last process date"},"policyId":{"type":"string","description":"Associated policy ID"},"owner":{"type":"string","nullable":true,"description":"Owner DID"},"id":{"type":"string","description":"Mint request ID"},"mintedAmount":{"type":"number","description":"Minted amount from successful transactions"},"mintedExpected":{"type":"number","description":"Expected total mint amount"},"transferredAmount":{"type":"number","description":"Transferred amount from successful transactions"},"transferredExpected":{"type":"number","description":"Expected total transfer amount"},"wasTransferNeeded":{"type":"boolean","description":"Whether transfer was needed"}}}}}}},"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 mint requests for a policy.","tags":["policies"]}}}}
```

## Retry mint by VP message ID.

> Retries failed mint/transfer operations for the specified VP message within the given policy. Fire-and-forget: the endpoint performs synchronous validation (policy access, owner check, per-request cooldown / in-progress checks) and returns as soon as validation passes; the actual Hedera mint/transfer runs in the background. Poll GET /policies/{policyId}/mint-requests to observe progress and final state.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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"]},"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":{"/policies/{policyId}/mint/{vpMessageId}/retry":{"post":{"description":"Retries failed mint/transfer operations for the specified VP message within the given policy. Fire-and-forget: the endpoint performs synchronous validation (policy access, owner check, per-request cooldown / in-progress checks) and returns as soon as validation passes; the actual Hedera mint/transfer runs in the background. Poll GET /policies/{policyId}/mint-requests to observe progress and final state.","operationId":"PolicyApi_retryMint","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"vpMessageId","required":true,"in":"path","description":"VP Message Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Validation passed; retry has been queued (fire-and-forget). `warnings` contains any per-request messages surfaced synchronously during validation (e.g. cooldown or already-in-progress); an empty array means every request was accepted for background processing. `message` is set only when no retry was needed because every mint request for the VP is already fully minted and transferred.","content":{"application/json":{}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden. Only the policy owner can retry mint requests.\n\nForbidden","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":"Retry mint by VP message ID.","tags":["policies"]}}}}
```

## Send data to block by UUID with sync events.

> Sends block-specific input to the block identified by \`uuid\` and returns the action result together with sync event metadata. Set \`history=true\` to include the full steps history.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Object":{"type":"object","properties":{}},"ResponseDTOWithSyncEvents":{"type":"object","properties":{"response":{"type":"object","nullable":true,"additionalProperties":true},"result":{"type":"object","nullable":true,"additionalProperties":true},"steps":{"additionalProperties":true,"type":"array","items":{"type":"object"}}},"required":["response","result","steps"]},"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"]},"ServiceUnavailableErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policies/{policyId}/blocks/{uuid}/sync-events":{"post":{"description":"Sends block-specific input to the block identified by `uuid` and returns the action result together with sync event metadata. Set `history=true` to include the full steps history.","operationId":"PolicyApi_setBlockDataWithSyncEvents","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"uuid","required":true,"in":"path","description":"Block Identifier","schema":{"type":"string"}},{"name":"history","required":false,"in":"query","description":"History","schema":{"type":"boolean"}},{"name":"timeout","required":false,"in":"query","description":"Timeout","schema":{"default":60000,"type":"number"}},{"name":"waitRemotePolicy","required":false,"in":"query","description":"Wait for a response from the remote policy","schema":{"default":true,"type":"boolean"}}],"requestBody":{"required":true,"description":"Data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDTOWithSyncEvents"}}}},"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"}}}},"503":{"description":"Block Unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableErrorDTO"}}}}},"summary":"Send data to block by UUID with sync events.","tags":["policies"]}}}}
```

## Get block data by tag name.

> Requests block data by tag. Users with permission to execute or manage the policy can make this request. The block tag is case-sensitive. Works the same way as \`GET /policies/{policyId}/blocks/{uuid}\`. The only difference is that this route identifies the target block by \*\*\`tagName\`\*\* instead of \*\*\`uuid\`\*\*.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"BlockDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/BlockDTO"}}},"required":["id","blockType","blocks"]},"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"]},"ServiceUnavailableErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policies/{policyId}/tag/{tagName}/blocks":{"get":{"description":"Requests block data by tag. Users with permission to execute or manage the policy can make this request. The block tag is case-sensitive. Works the same way as `GET /policies/{policyId}/blocks/{uuid}`. The only difference is that this route identifies the target block by **`tagName`** instead of **`uuid`**.","operationId":"PolicyApi_getBlocksByTagName","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"tagName","required":true,"in":"path","description":"Block name (Tag)","schema":{"type":"string"}},{"name":"savepointIds","required":false,"in":"query","description":"Optional. Savepoint ids (JSON array or stringified JSON). Parsed and passed with the rest of the query object to the engine.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockDTO"}}}},"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"}}}},"503":{"description":"Block Unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableErrorDTO"}}}}},"summary":"Get block data by tag name.","tags":["policies"]}}}}
```

## Send data to block by tag name.

> Works the same way as \`POST /policies/{policyId}/blocks/{uuid}\`. The difference is that this route identifies the target block by \*\*\`tagName\`\*\* instead of \*\*\`uuid\`\*\*.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Object":{"type":"object","properties":{}},"BlockDTO":{"type":"object","properties":{"id":{"type":"string"},"blockType":{"type":"string"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/BlockDTO"}}},"required":["id","blockType","blocks"]},"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"]},"ServiceUnavailableErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policies/{policyId}/tag/{tagName}/blocks":{"post":{"description":"Works the same way as `POST /policies/{policyId}/blocks/{uuid}`. The difference is that this route identifies the target block by **`tagName`** instead of **`uuid`**.","operationId":"PolicyApi_setBlocksByTagName","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"tagName","required":true,"in":"path","description":"Block name (Tag)","schema":{"type":"string"}},{"name":"timeout","required":false,"in":"query","description":"Optional engine timeout in milliseconds. Forwarded to guardian-service and clamped there to the range 10 ms to 1 hour.","schema":{"default":60000,"type":"number"}},{"name":"waitRemotePolicy","required":false,"in":"query","description":"Optional. If `true`, waits for a response from the remote policy action.","schema":{"default":true,"type":"boolean"}}],"requestBody":{"required":true,"description":"Data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockDTO"}}}},"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"}}}},"503":{"description":"Block Unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableErrorDTO"}}}}},"summary":"Send data to block by tag name.","tags":["policies"]}}}}
```

## Send data to block by tag name with sync events.

> Works the same way as \`POST /policies/{policyId}/blocks/{uuid}/sync-events\`. The difference is that this route identifies the target block by \*\*\`tagName\`\*\* instead of \*\*\`uuid\`\*\*.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Object":{"type":"object","properties":{}},"ResponseDTOWithSyncEvents":{"type":"object","properties":{"response":{"type":"object","nullable":true,"additionalProperties":true},"result":{"type":"object","nullable":true,"additionalProperties":true},"steps":{"additionalProperties":true,"type":"array","items":{"type":"object"}}},"required":["response","result","steps"]},"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"]},"ServiceUnavailableErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policies/{policyId}/tag/{tagName}/blocks/sync-events":{"post":{"description":"Works the same way as `POST /policies/{policyId}/blocks/{uuid}/sync-events`. The difference is that this route identifies the target block by **`tagName`** instead of **`uuid`**.","operationId":"PolicyApi_setBlocksByTagNameWithSyncEvents","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"tagName","required":true,"in":"path","description":"Block name (Tag)","schema":{"type":"string"}},{"name":"history","required":false,"in":"query","description":"History","schema":{"type":"boolean"}},{"name":"timeout","required":false,"in":"query","description":"Timeout","schema":{"default":60000,"type":"number"}},{"name":"waitRemotePolicy","required":false,"in":"query","description":"Wait for a response from the remote policy","schema":{"default":true,"type":"boolean"}}],"requestBody":{"required":true,"description":"Data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Object"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDTOWithSyncEvents"}}}},"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"}}}},"503":{"description":"Block Unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableErrorDTO"}}}}},"summary":"Send data to block by tag name with sync events.","tags":["policies"]}}}}
```

## Get block UUID by tag name.

> Resolves the block identified by \`tagName\` within the policy and returns its block UUID as \`{ id }\`. Users with permission to execute or manage the policy can make this request. The block tag is case-sensitive.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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"]},"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":{"/policies/{policyId}/tag/{tagName}":{"get":{"description":"Resolves the block identified by `tagName` within the policy and returns its block UUID as `{ id }`. Users with permission to execute or manage the policy can make this request. The block tag is case-sensitive.","operationId":"PolicyApi_getBlockByTagName","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"tagName","required":true,"in":"path","description":"Block name (Tag). Case-sensitive.","schema":{"type":"string"}}],"responses":{"200":{"description":"Resolved block identifier.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"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":"Get block UUID by tag name.","tags":["policies"]}}}}
```

## Get block parent chain by UUID.

> Returns the UUID chain for the specified block, starting with the requested block and continuing through its parents up to the root block. Users with permission to execute or manage the policy can make this request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/blocks/{uuid}/parents":{"get":{"description":"Returns the UUID chain for the specified block, starting with the requested block and continuing through its parents up to the root block. Users with permission to execute or manage the policy can make this request.","operationId":"PolicyApi_getBlockParents","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"uuid","required":true,"in":"path","description":"Block Identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"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 block parent chain by UUID.","tags":["policies"]}}}}
```

## Returns block descriptions.

> Returns block descriptions. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/blocks/about":{"get":{"description":"Returns block descriptions. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getBlockAbout","parameters":[],"responses":{"200":{"description":"Block descriptions.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"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":"Returns block descriptions.","tags":["policies"]}}}}
```

## Return policy and its artifacts in a zip file format for the specified policy.

> Returns a zip file containing the published policy and all associated artifacts, i.e. schemas and VCs. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/export/file":{"get":{"description":"Returns a zip file containing the published policy and all associated artifacts, i.e. schemas and VCs. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getPolicyExportFile","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"ZIP archive containing the exported policy file.","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized request.","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Return policy and its artifacts in a zip file format for the specified policy.","tags":["policies"]}}}}
```

## Return Hedera message ID for the specified published policy.

> Returns the Hedera message ID for the specified published policy together with related policy metadata: internal \`id\`, \`name\`, \`description\`, \`version\`, and \`owner\` DID. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/export/message":{"get":{"description":"Returns the Hedera message ID for the specified published policy together with related policy metadata: internal `id`, `name`, `description`, `version`, and `owner` DID. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getPolicyExportMessage","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Hedera message ID and related policy metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"messageId":{"type":"string"},"owner":{"type":"string"}},"required":["id","name","description","version","messageId","owner"]}}}},"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":"Return Hedera message ID for the specified published policy.","tags":["policies"]}}}}
```

## Return policy and its artifacts in a xlsx file format for the specified policy.

> Returns a xlsx file containing the published policy and all associated artifacts, i.e. schemas and VCs. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/export/xlsx":{"get":{"description":"Returns a xlsx file containing the published policy and all associated artifacts, i.e. schemas and VCs. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getPolicyExportXlsx","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"ZIP/XLSX binary payload returned as a file download.","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized request.","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Return policy and its artifacts in a xlsx file format for the specified policy.","tags":["policies"]}}}}
```

## Import new policy from a Hedera message.

> Imports a new policy and all associated artifacts into the local DB using the provided Hedera topic message ID. \`versionOfTopicId\` imports the policy as a new version of an existing policy topic instead of creating a new one. \`demo=true\` imports the policy in demo mode and starts it as a demo policy. \`originalTracking=true\` stores the imported policy original hash/message linkage for later change tracking. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ImportMessageDTO":{"type":"object","properties":{"messageId":{"type":"string","description":"Hedera topic message id"},"metadata":{"type":"object","additionalProperties":true,"nullable":true}},"required":["messageId","metadata"]},"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"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":{"/policies/import/message":{"post":{"description":"Imports a new policy and all associated artifacts into the local DB using the provided Hedera topic message ID. `versionOfTopicId` imports the policy as a new version of an existing policy topic instead of creating a new one. `demo=true` imports the policy in demo mode and starts it as a demo policy. `originalTracking=true` stores the imported policy original hash/message linkage for later change tracking. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_importPolicyFromMessage","parameters":[{"name":"versionOfTopicId","required":false,"in":"query","description":"The topic ID of policy version.","schema":{"type":"string"}},{"name":"demo","required":false,"in":"query","description":"Import policy in demo mode.","schema":{"type":"boolean"}},{"name":"originalTracking","required":false,"in":"query","description":"Save original state of the policy","schema":{"type":"boolean"}}],"requestBody":{"required":true,"description":"Message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportMessageDTO"}}}},"responses":{"201":{"description":"Created policy.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyDTO"}}}}},"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":"Import new policy from a Hedera message.","tags":["policies"]}}}}
```

## Import new policy from a Hedera message asynchronously.

> Starts asynchronous import of a new policy and all associated artifacts into the local DB using the provided Hedera topic message ID. \`versionOfTopicId\` imports the policy as a new version of an existing policy topic instead of creating a new one. \`demo=true\` imports the policy in demo mode and starts it as a demo policy. \`originalTracking=true\` stores the imported policy original hash/message linkage for later change tracking. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ImportMessageDTO":{"type":"object","properties":{"messageId":{"type":"string","description":"Hedera topic message id"},"metadata":{"type":"object","additionalProperties":true,"nullable":true}},"required":["messageId","metadata"]},"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"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":{"/policies/push/import/message":{"post":{"description":"Starts asynchronous import of a new policy and all associated artifacts into the local DB using the provided Hedera topic message ID. `versionOfTopicId` imports the policy as a new version of an existing policy topic instead of creating a new one. `demo=true` imports the policy in demo mode and starts it as a demo policy. `originalTracking=true` stores the imported policy original hash/message linkage for later change tracking. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_importPolicyFromMessageAsync","parameters":[{"name":"versionOfTopicId","required":false,"in":"query","description":"The topic ID of policy version.","schema":{"type":"string"}},{"name":"demo","required":false,"in":"query","description":"Import policy in demo mode.","schema":{"type":"boolean"}},{"name":"originalTracking","required":false,"in":"query","description":"Save original state of the policy","schema":{"type":"boolean"}}],"requestBody":{"required":true,"description":"Message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportMessageDTO"}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"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":"Import new policy from a Hedera message asynchronously.","tags":["policies"]}}}}
```

## Policy preview from IPFS.

> Previews the policy identified by the provided Hedera topic message ID without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ImportMessageDTO":{"type":"object","properties":{"messageId":{"type":"string","description":"Hedera topic message id"},"metadata":{"type":"object","additionalProperties":true,"nullable":true}},"required":["messageId","metadata"]},"PolicyPreviewDTO":{"type":"object","properties":{"module":{"$ref":"#/components/schemas/PolicyDTO"},"messageId":{"type":"string"},"schemas":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"tags":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"moduleTopicId":{"type":"string"}},"required":["module","messageId","schemas","tags","moduleTopicId"]},"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"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":{"/policies/import/message/preview":{"post":{"description":"Previews the policy identified by the provided Hedera topic message ID without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_importMessage","parameters":[],"requestBody":{"required":true,"description":"Message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportMessageDTO"}}}},"responses":{"200":{"description":"Policy preview.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyPreviewDTO"}}}},"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":"Policy preview from IPFS.","tags":["policies"]}}}}
```

## Policy preview from IPFS.

> Previews the policy identified by the provided Hedera topic message ID without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ImportMessageDTO":{"type":"object","properties":{"messageId":{"type":"string","description":"Hedera topic message id"},"metadata":{"type":"object","additionalProperties":true,"nullable":true}},"required":["messageId","metadata"]},"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"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":{"/policies/push/import/message/preview":{"post":{"description":"Previews the policy identified by the provided Hedera topic message ID without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_importFromMessagePreview","parameters":[],"requestBody":{"required":true,"description":"Message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportMessageDTO"}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"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":"Policy preview from IPFS.","tags":["policies"]}}}}
```

## Import new policy from a ZIP file.

> Imports a new policy and all associated artifacts, such as schemas and VCs, from the provided ZIP file into the local DB. \`versionOfTopicId\` imports the policy as a new version of an existing policy topic instead of creating a new one. \`demo=true\` imports the policy in demo mode and starts it as a demo policy. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"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":{"/policies/import/file":{"post":{"description":"Imports a new policy and all associated artifacts, such as schemas and VCs, from the provided ZIP file into the local DB. `versionOfTopicId` imports the policy as a new version of an existing policy topic instead of creating a new one. `demo=true` imports the policy in demo mode and starts it as a demo policy. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_importPolicyFromFile","parameters":[{"name":"versionOfTopicId","required":false,"in":"query","description":"The topic ID of policy version.","schema":{"type":"string"}},{"name":"demo","required":false,"in":"query","description":"Import policy in demo mode.","schema":{"type":"boolean"}}],"requestBody":{"required":true,"description":"Raw ZIP archive bytes containing policy config. Send with `Content-Type: binary/octet-stream`.","content":{"binary/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Created policy.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyDTO"}}}}},"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":"Import new policy from a ZIP file.","tags":["policies"]}}}}
```

## Import new policy from a ZIP file with metadata.

> Imports a new policy and all associated artifacts, such as schemas and VCs, from the provided ZIP file into the local DB. \`versionOfTopicId\` imports the policy as a new version of an existing policy topic instead of creating a new one. \`demo=true\` imports the policy in demo mode and starts it as a demo policy. The optional \`metadata\` file is a JSON payload used for import settings such as tool message remapping and \`importRecords\`. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"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":{"/policies/import/file-metadata":{"post":{"description":"Imports a new policy and all associated artifacts, such as schemas and VCs, from the provided ZIP file into the local DB. `versionOfTopicId` imports the policy as a new version of an existing policy topic instead of creating a new one. `demo=true` imports the policy in demo mode and starts it as a demo policy. The optional `metadata` file is a JSON payload used for import settings such as tool message remapping and `importRecords`. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_importPolicyFromFileWithMetadata","parameters":[{"name":"versionOfTopicId","required":false,"in":"query","description":"The topic ID of policy version.","schema":{"type":"string"}},{"name":"demo","required":false,"in":"query","description":"Import policy in demo mode.","schema":{"type":"boolean"}}],"requestBody":{"required":true,"description":"Multipart form data with a policy ZIP archive and optional metadata JSON file.","content":{"multipart/form-data":{"schema":{"type":"object","required":["policyFile"],"properties":{"policyFile":{"type":"string","format":"binary","description":"Policy archive (ZIP format)."},"metadata":{"type":"string","format":"binary","nullable":true,"description":"Optional JSON file (for example `metadata.json`) with content like `{ \"tools\": { \"1706867530.884259218\": \"1774367941.594676930\" }, \"importRecords\": true }`."}}}}}},"responses":{"201":{"description":"Created policy.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyDTO"}}}}},"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":"Import new policy from a ZIP file with metadata.","tags":["policies"]}}}}
```

## Import new policy from a ZIP file asynchronously.

> Starts asynchronous import of a new policy and all associated artifacts, such as schemas and VCs, from the provided ZIP file into the local DB. \`versionOfTopicId\` imports the policy as a new version of an existing policy topic instead of creating a new one. \`demo=true\` imports the policy in demo mode and starts it as a demo policy. \`originalTracking=true\` stores the imported policy original ZIP/hash linkage for later change tracking. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"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":{"/policies/push/import/file":{"post":{"description":"Starts asynchronous import of a new policy and all associated artifacts, such as schemas and VCs, from the provided ZIP file into the local DB. `versionOfTopicId` imports the policy as a new version of an existing policy topic instead of creating a new one. `demo=true` imports the policy in demo mode and starts it as a demo policy. `originalTracking=true` stores the imported policy original ZIP/hash linkage for later change tracking. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_importPolicyFromFileAsync","parameters":[{"name":"versionOfTopicId","required":false,"in":"query","description":"The topic ID of policy version.","schema":{"type":"string"}},{"name":"demo","required":false,"in":"query","description":"Import policy in demo mode.","schema":{"type":"boolean"}},{"name":"originalTracking","required":false,"in":"query","description":"Save original state of the policy","schema":{"type":"boolean"}}],"requestBody":{"required":true,"description":"Raw ZIP archive bytes containing policy config. Send with `Content-Type: binary/octet-stream`.","content":{"binary/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"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":"Import new policy from a ZIP file asynchronously.","tags":["policies"]}}}}
```

## Import new policy from a ZIP file with metadata asynchronously.

> Starts asynchronous import of a new policy and all associated artifacts, such as schemas and VCs, from the provided ZIP file into the local DB. \`versionOfTopicId\` imports the policy as a new version of an existing policy topic instead of creating a new one. \`demo=true\` imports the policy in demo mode and starts it as a demo policy. \`originalTracking=true\` stores the imported policy original ZIP/hash linkage for later change tracking. The optional \`metadata\` file is a JSON payload used for import settings such as tool message remapping and \`importRecords\`. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"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":{"/policies/push/import/file-metadata":{"post":{"description":"Starts asynchronous import of a new policy and all associated artifacts, such as schemas and VCs, from the provided ZIP file into the local DB. `versionOfTopicId` imports the policy as a new version of an existing policy topic instead of creating a new one. `demo=true` imports the policy in demo mode and starts it as a demo policy. `originalTracking=true` stores the imported policy original ZIP/hash linkage for later change tracking. The optional `metadata` file is a JSON payload used for import settings such as tool message remapping and `importRecords`. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_importPolicyFromFileWithMetadataAsync","parameters":[{"name":"versionOfTopicId","required":false,"in":"query","description":"The topic ID of policy version.","schema":{"type":"string"}},{"name":"demo","required":false,"in":"query","description":"Import policy in demo mode.","schema":{"type":"boolean"}},{"name":"originalTracking","required":false,"in":"query","description":"Save original state of the policy","schema":{"type":"boolean"}}],"requestBody":{"required":true,"description":"Multipart form data with a policy ZIP archive and optional metadata JSON file.","content":{"multipart/form-data":{"schema":{"type":"object","required":["policyFile"],"properties":{"policyFile":{"type":"string","format":"binary","description":"Policy archive (ZIP format)."},"metadata":{"type":"string","format":"binary","nullable":true,"description":"Optional JSON file (for example `metadata.json`) with content like `{ \"tools\": { \"1706867530.884259218\": \"1774367941.594676930\" }, \"importRecords\": true }`."}}}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"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":"Import new policy from a ZIP file with metadata asynchronously.","tags":["policies"]}}}}
```

## Policy preview from a zip file.

> Previews the policy from a zip file without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyPreviewDTO":{"type":"object","properties":{"module":{"$ref":"#/components/schemas/PolicyDTO"},"messageId":{"type":"string"},"schemas":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"tags":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"moduleTopicId":{"type":"string"}},"required":["module","messageId","schemas","tags","moduleTopicId"]},"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"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":{"/policies/import/file/preview":{"post":{"description":"Previews the policy from a zip file without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_importPolicyFromFilePreview","parameters":[],"requestBody":{"required":true,"description":"Raw ZIP archive bytes containing policy config. Send with `Content-Type: binary/octet-stream`.","content":{"binary/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Policy preview.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyPreviewDTO"}}}},"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":"Policy preview from a zip file.","tags":["policies"]}}}}
```

## Imports new policy from a xlsx file.

> Imports new policy and all associated artifacts, such as schemas and VCs, from the provided xlsx file into the local DB. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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"]},"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":{"/policies/import/xlsx":{"post":{"description":"Imports new policy and all associated artifacts, such as schemas and VCs, from the provided xlsx file into the local DB. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_importPolicyFromXlsx","parameters":[{"name":"policyId","required":true,"in":"query","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Raw XLSX file bytes containing policy config. Send with `Content-Type: binary/octet-stream`.","content":{"binary/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Import result for the updated policy.","content":{"application/json":{"schema":{"type":"object","properties":{"policyId":{"type":"string"},"errors":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["policyId","errors"]}}}},"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":"Imports new policy from a xlsx file.","tags":["policies"]}}}}
```

## Imports new policy from a xlsx file.

> Imports new policy and all associated artifacts, such as schemas and VCs, from the provided xlsx file into the local DB. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TaskDTO":{"type":"object","properties":{"taskId":{"type":"string","description":"Task Id"},"expectation":{"type":"number","description":"Expected count of task phases"},"action":{"type":"string","description":"Task action"},"userId":{"type":"string","description":"User Id"}},"required":["taskId","expectation","action","userId"]},"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":{"/policies/push/import/xlsx":{"post":{"description":"Imports new policy and all associated artifacts, such as schemas and VCs, from the provided xlsx file into the local DB. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_importPolicyFromXlsxAsync","parameters":[{"name":"policyId","required":true,"in":"query","description":"Policy Id","schema":{"type":"string"}},{"name":"schemas","required":false,"in":"query","description":"Optional comma-separated schema ids used by the async XLSX import flow.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Raw XLSX file bytes containing policy config. Send with `Content-Type: binary/octet-stream`.","content":{"binary/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDTO"}}}},"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":"Imports new policy from a xlsx file.","tags":["policies"]}}}}
```

## Policy preview from a xlsx file.

> Previews the policy from a xlsx file without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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"]},"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":{"/policies/import/xlsx/preview":{"post":{"description":"Previews the policy from a xlsx file without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_importPolicyFromXlsxPreview","parameters":[],"requestBody":{"required":true,"description":"Raw XLSX file bytes containing policy config. Send with `Content-Type: binary/octet-stream`.","content":{"binary/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Preview payload parsed from the XLSX file.","content":{"application/json":{"schema":{"type":"object","properties":{"schemas":{"type":"array","items":{"type":"object","additionalProperties":true}},"tools":{"type":"array","items":{"type":"object","additionalProperties":true}},"errors":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"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":"Policy preview from a xlsx file.","tags":["policies"]}}}}
```

## Get dry-run virtual users.

> Returns virtual users for the selected dry-run policy. Optional \`savepointIds\` can be provided as a stringified JSON array to read users from a specific savepoint context. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/dry-run/users":{"get":{"description":"Returns virtual users for the selected dry-run policy. Optional `savepointIds` can be provided as a stringified JSON array to read users from a specific savepoint context. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getDryRunUsers","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"savepointIds","required":false,"in":"query","description":"Optional stringified JSON array of savepoint ids used to read users from a specific savepoint context.","schema":{"type":"string"}}],"responses":{"200":{"description":"Virtual users for the current dry-run state or the selected savepoints.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"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 dry-run virtual users.","tags":["policies"]}}}}
```

## Get dry-run virtual user by DID.

> Returns a virtual user from the selected dry-run policy by its DID. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/dry-run/user/{did}":{"get":{"description":"Returns a virtual user from the selected dry-run policy by its DID. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getDryRunUser","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"did","required":true,"in":"path","description":"Virtual User DID","schema":{"type":"string"}}],"responses":{"200":{"description":"Virtual user.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"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 dry-run virtual user by DID.","tags":["policies"]}}}}
```

## Create dry-run virtual user.

> Creates a new virtual user for the selected dry-run policy and returns the created user object. Use \`Api-Version: 2\`. Optional \`savepointIds\` in the request body scopes creation to a specific savepoint context. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/dry-run/user":{"post":{"description":"Creates a new virtual user for the selected dry-run policy and returns the created user object. Use `Api-Version: 2`. Optional `savepointIds` in the request body scopes creation to a specific savepoint context. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_setDryRunUserV2_2","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"Api-Version","in":"header","description":"Use \"2\" for this endpoint (returns the created dry-run virtual user object).","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"description":"Optional savepoint context for virtual user creation.","content":{"application/json":{"schema":{"type":"object","properties":{"savepointIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"201":{"description":"Created virtual user.","content":{"application/json":{"schema":{"type":"object","required":["username","did","hederaAccountId","active"],"properties":{"username":{"type":"string"},"did":{"type":"string"},"hederaAccountId":{"type":"string"},"active":{"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":"Create dry-run virtual user.","tags":["policies"]}}}}
```

## Change active virtual user.

> Sets the active dry-run virtual user by DID and returns the updated virtual users list. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/dry-run/login":{"post":{"description":"Sets the active dry-run virtual user by DID and returns the updated virtual users list. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_loginDryRunUser","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Virtual user DID to activate.","content":{"application/json":{"schema":{"type":"object","required":["did"],"properties":{"did":{"type":"string","description":"DID of the virtual user to activate."}}}}}},"responses":{"200":{"description":"Virtual users for the dry-run policy after the active user change.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"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":"Change active virtual user.","tags":["policies"]}}}}
```

## Run a policy block in dry-run mode.

> Runs the provided block configuration in dry-run mode with the supplied event/document payload and returns execution logs, errors, input, and output documents. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DebugBlockResultDTO":{"type":"object","properties":{"logs":{"description":"Logs","type":"array","items":{"type":"string"}},"errors":{"description":"Errors","type":"array","items":{"type":"string"}},"input":{"description":"Input documents","additionalProperties":true,"type":"array","items":{"type":"object"}},"output":{"description":"Output documents","additionalProperties":true,"type":"array","items":{"type":"object"}}},"required":["logs","errors","input","output"]},"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":{"/policies/{policyId}/dry-run/block":{"post":{"description":"Runs the provided block configuration in dry-run mode with the supplied event/document payload and returns execution logs, errors, input, and output documents. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_runBlock","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Block configuration and input data to execute in dry-run mode.","content":{"application/json":{"schema":{"type":"object","properties":{"block":{"type":"object","additionalProperties":true,"description":"Serialized block configuration to run in isolation."},"data":{"type":"object","properties":{"input":{"type":"string"},"output":{"type":"string"},"type":{"type":"string","enum":["schema","json","file","history"]},"document":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":true}]}},"additionalProperties":false}}}}}},"responses":{"201":{"description":"Dry-run execution result for the requested block.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebugBlockResultDTO"}}}},"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":"Run a policy block in dry-run mode.","tags":["policies"]}}}}
```

## List dry-run history records for a block tag.

> Returns stored dry-run history entries for the specified block tag, including recorded document payloads and related metadata. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/dry-run/block/{tagName}/history":{"get":{"description":"Returns stored dry-run history entries for the specified block tag, including recorded document payloads and related metadata. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getBlockHistory","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"tagName","required":true,"in":"path","description":"Block tag (e.g. choose_role).","schema":{"type":"string"}}],"responses":{"200":{"description":"Array of dry-run document records for the block tag.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"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":"List dry-run history records for a block tag.","tags":["policies"]}}}}
```

## Get dry-run savepoints.

> Returns the list of savepoints for the policy (Dry Run only).

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/savepoints":{"get":{"description":"Returns the list of savepoints for the policy (Dry Run only).","operationId":"PolicyApi_getSavepoints","parameters":[{"name":"policyId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"List of dry-run savepoints.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Policy is not in Dry Run mode.\n\nForbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Get dry-run savepoints.","tags":["policies"]}}}}
```

## Create dry-run savepoint.

> Creates a new savepoint for the policy (Dry Run only). Returns \`{ savepoint }\` with the created record (same shape as items in GET /savepoints).

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/savepoints":{"post":{"description":"Creates a new savepoint for the policy (Dry Run only). Returns `{ savepoint }` with the created record (same shape as items in GET /savepoints).","operationId":"PolicyApi_createSavepoint","parameters":[{"name":"policyId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Savepoint creation payload.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"savepointPath":{"type":"array","items":{"type":"string"}}},"required":["name","savepointPath"]}}}},"responses":{"200":{"description":"Response includes `savepoint`: the created dry-run savepoint record.","content":{"application/json":{"schema":{"type":"object","properties":{"savepoint":{"type":"object","additionalProperties":true}}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Policy is not in Dry Run mode.\n\nForbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Create dry-run savepoint.","tags":["policies"]}}}}
```

## Get dry-run savepoints count.

> Returns the number of savepoints for the policy (Dry Run only).

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/savepoints/count":{"get":{"description":"Returns the number of savepoints for the policy (Dry Run only).","operationId":"PolicyApi_getSavepointsCount","parameters":[{"name":"policyId","required":true,"in":"path","schema":{"type":"string"}},{"name":"includeDeleted","required":false,"in":"query","description":"Include deleted savepoints in count","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Dry-run savepoints count.","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Policy is not in Dry Run mode.\n\nForbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Get dry-run savepoints count.","tags":["policies"]}}}}
```

## Apply savepoint

> Restores Dry Run state to the selected savepoint. Returns \`{ savepoint }\` with the updated savepoint record (same shape as POST /savepoints).

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/savepoints/{savepointId}":{"put":{"description":"Restores Dry Run state to the selected savepoint. Returns `{ savepoint }` with the updated savepoint record (same shape as POST /savepoints).","operationId":"PolicyApi_selectSavepoint","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy identifier.","schema":{"type":"string"}},{"name":"savepointId","required":true,"in":"path","description":"Savepoint id to apply.","schema":{"type":"string"}}],"responses":{"200":{"description":"Response includes `savepoint`: the applied dry-run savepoint record after restore.","content":{"application/json":{"schema":{"type":"object","properties":{"savepoint":{"type":"object","additionalProperties":true}}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Policy is not in Dry Run mode.\n\nForbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Apply savepoint","tags":["policies"]}}}}
```

## Rename dry-run savepoint.

> Updates the name of a Dry Run savepoint for the policy.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"BadRequestErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"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":{"/policies/{policyId}/savepoints/{savepointId}":{"patch":{"description":"Updates the name of a Dry Run savepoint for the policy.","operationId":"PolicyApi_renameSavepoint","parameters":[{"name":"policyId","required":true,"in":"path","schema":{"type":"string"}},{"name":"savepointId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Savepoint rename payload.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Updated savepoint metadata.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Name is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Policy is not in Dry Run mode.\n\nForbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Rename dry-run savepoint.","tags":["policies"]}}}}
```

## Delete dry-run savepoints.

> Deletes the specified savepoints for the policy (Dry Run only). When the policy has more than one savepoint and \`skipCurrentSavepointGuard\` is \`false\`, the current savepoint cannot be deleted and the request fails. When \`skipCurrentSavepointGuard\` is \`true\`, that guard is bypassed; the UI uses this mode for "delete all savepoints". Leaf savepoints are hard-deleted, while savepoints with children are marked as deleted.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DeleteSavepointsDTO":{"type":"object","properties":{"savepointIds":{"type":"array","items":{"type":"string"}},"skipCurrentSavepointGuard":{"type":"boolean","description":"If `false`, and the policy has more than one savepoint, the current savepoint cannot be deleted. If `true`, that guard is bypassed (used by the UI for deleting all savepoints)."}},"required":["savepointIds"]},"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":{"/policies/{policyId}/savepoints/delete":{"post":{"description":"Deletes the specified savepoints for the policy (Dry Run only). When the policy has more than one savepoint and `skipCurrentSavepointGuard` is `false`, the current savepoint cannot be deleted and the request fails. When `skipCurrentSavepointGuard` is `true`, that guard is bypassed; the UI uses this mode for \"delete all savepoints\". Leaf savepoints are hard-deleted, while savepoints with children are marked as deleted.","operationId":"PolicyApi_deleteSavepoints","parameters":[{"name":"policyId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSavepointsDTO"}}}},"responses":{"200":{"description":"Deletion result. `hardDeletedIds` contains only savepoints that were hard-deleted. This array can be empty when the request causes only soft deletes (for example, deleting savepoints that still have children). If the current savepoint is included while the guard is enforced, the request fails instead of returning an empty result.","content":{"application/json":{"schema":{"type":"object","properties":{"hardDeletedIds":{"type":"array","items":{"type":"string"}}}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Policy is not in Dry Run mode.\n\nForbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Delete dry-run savepoints.","tags":["policies"]}}}}
```

## Clear dry-run state.

> Clear dry-run state. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/dry-run/restart":{"post":{"description":"Clear dry-run state. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_restartDryRun","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Dry-run state restart result.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Policy is not in Dry Run mode.\n\nForbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Clear dry-run state.","tags":["policies"]}}}}
```

## Get dry-run transactions.

> Returns virtual Hedera transactions generated during the policy dry-run. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/dry-run/transactions":{"get":{"description":"Returns virtual Hedera transactions generated during the policy dry-run. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getDryRunTransactions","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"pageIndex","required":false,"in":"query","description":"The number of pages to skip before starting to collect the result set","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"The numbers of items to return","schema":{"type":"number"}}],"responses":{"200":{"description":"Transactions.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"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 dry-run transactions.","tags":["policies"]}}}}
```

## Get dry-run artifacts.

> Returns dry-run artifacts/documents generated for the policy. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/dry-run/artifacts":{"get":{"description":"Returns dry-run artifacts/documents generated for the policy. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getDryRunArtifacts","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"pageIndex","required":false,"in":"query","description":"The number of pages to skip before starting to collect the result set","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"The numbers of items to return","schema":{"type":"number"}}],"responses":{"200":{"description":"Artifacts.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"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 dry-run artifacts.","tags":["policies"]}}}}
```

## Get dry-run IPFS files.

> Returns IPFS file records generated during the policy dry-run. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/dry-run/ipfs":{"get":{"description":"Returns IPFS file records generated during the policy dry-run. Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getDryRunIpfs","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"pageIndex","required":false,"in":"query","description":"The number of pages to skip before starting to collect the result set","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"The numbers of items to return","schema":{"type":"number"}}],"responses":{"200":{"description":"Files.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"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 dry-run IPFS files.","tags":["policies"]}}}}
```

## Get Mock Configuration.

> Returns the current mock configuration for the policy's dry-run session, including the master enabled flag and the per-block enable/disable map.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"MockConfigDTO":{"type":"object","properties":{"enabled":{"type":"boolean"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/MockBlockConfigDTO"}}}},"MockBlockConfigDTO":{"type":"object","properties":{"uuid":{"type":"string"},"enabled":{"type":"boolean"}}},"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":{"/policies/{policyId}/dry-run/mock/config":{"get":{"description":"Returns the current mock configuration for the policy's dry-run session, including the master enabled flag and the per-block enable/disable map.","operationId":"PolicyApi_getMockConfig","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockConfigDTO"}}}},"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 Mock Configuration.","tags":["policies"]}}}}
```

## Update Mock Configuration.

> Updates the mock configuration — master toggle and/or per-block overrides.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"MockConfigDTO":{"type":"object","properties":{"enabled":{"type":"boolean"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/MockBlockConfigDTO"}}}},"MockBlockConfigDTO":{"type":"object","properties":{"uuid":{"type":"string"},"enabled":{"type":"boolean"}}},"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":{"/policies/{policyId}/dry-run/mock/config":{"post":{"description":"Updates the mock configuration — master toggle and/or per-block overrides.","operationId":"PolicyApi_setMockConfig","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockConfigDTO"}}}},"responses":{"200":{"description":"Config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockConfigDTO"}}}},"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":"Update Mock Configuration.","tags":["policies"]}}}}
```

## Get Stored Mock Data.

> Returns all currently stored mock entries (IPFS, Topics, Tokens, and API) for this policy.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"MockDataDTO":{"type":"object","properties":{"ipfs":{"type":"array","items":{"$ref":"#/components/schemas/MockIpfsDataDTO"}},"topics":{"type":"array","items":{"$ref":"#/components/schemas/MockTopicDataDTO"}},"tokens":{"type":"array","items":{"$ref":"#/components/schemas/MockTokenDataDTO"}},"api":{"type":"array","items":{"$ref":"#/components/schemas/MockApiDataDTO"}},"users":{"type":"array","items":{"$ref":"#/components/schemas/MockUserDataDTO"}}}},"MockIpfsDataDTO":{"type":"object","properties":{"cid":{"type":"string"},"content":{"type":"string"}}},"MockTopicDataDTO":{"type":"object","properties":{"topicId":{"type":"string"},"topic":{"$ref":"#/components/schemas/MockTopicTransactionDTO"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MockMessageTransactionDTO"}}}},"MockTopicTransactionDTO":{"type":"object","properties":{"id":{"type":"string"},"memo":{"type":"string"},"payer_account_id":{"type":"string"},"topic_id":{"type":"string"}}},"MockMessageTransactionDTO":{"type":"object","properties":{"consensus_timestamp":{"type":"string"},"id":{"type":"string"},"message":{"type":"string"},"payer_account_id":{"type":"string"},"sequence_number":{"type":"number"},"topicId":{"type":"string"},"topic_id":{"type":"string"}}},"MockTokenDataDTO":{"type":"object","properties":{"id":{"type":"string"},"token_id":{"type":"string"},"treasury_account_id":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"},"decimals":{"type":"number"},"type":{"type":"string"},"admin_key":{"type":"boolean"},"freeze_key":{"type":"boolean"},"kyc_key":{"type":"boolean"},"supply_key":{"type":"boolean"},"wipe_key":{"type":"boolean"}}},"MockApiDataDTO":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/MockRequestConfigDTO"},"response":{"type":"string"}}},"MockRequestConfigDTO":{"type":"object","properties":{"method":{"type":"string"},"responseType":{"type":"string"},"url":{"type":"string"}}},"MockUserDataDTO":{"type":"object","properties":{"username":{"type":"string"},"did":{"type":"string"},"hederaAccountId":{"type":"string"},"hederaAccountKey":{"type":"string"},"document":{"$ref":"#/components/schemas/DidDocumentDTO"}}},"DidDocumentDTO":{"type":"object","properties":{"id":{"type":"string","nullable":false},"@context":{"nullable":true,"type":"array","items":{"type":"string"}},"alsoKnownAs":{"nullable":true,"type":"array","items":{"type":"string"}},"controller":{"nullable":true,"type":"array","items":{"type":"string"}},"verificationMethod":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}},"authentication":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}},"assertionMethod":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}},"keyAgreement":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}},"capabilityInvocation":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}},"capabilityDelegation":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}},"service":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}}},"required":["id","@context","alsoKnownAs","controller","verificationMethod","authentication","assertionMethod","keyAgreement","capabilityInvocation","capabilityDelegation","service"]},"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":{"/policies/{policyId}/dry-run/mock/data":{"get":{"description":"Returns all currently stored mock entries (IPFS, Topics, Tokens, and API) for this policy.","operationId":"PolicyApi_getMockData","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockDataDTO"}}}},"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 Stored Mock Data.","tags":["policies"]}}}}
```

## Save Mock Data.

> Saves (creates or updates) mock data entries. The request body follows the same schema as the GET response above. Existing entries for the same key are overwritten; all other existing entries are preserved.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"MockDataDTO":{"type":"object","properties":{"ipfs":{"type":"array","items":{"$ref":"#/components/schemas/MockIpfsDataDTO"}},"topics":{"type":"array","items":{"$ref":"#/components/schemas/MockTopicDataDTO"}},"tokens":{"type":"array","items":{"$ref":"#/components/schemas/MockTokenDataDTO"}},"api":{"type":"array","items":{"$ref":"#/components/schemas/MockApiDataDTO"}},"users":{"type":"array","items":{"$ref":"#/components/schemas/MockUserDataDTO"}}}},"MockIpfsDataDTO":{"type":"object","properties":{"cid":{"type":"string"},"content":{"type":"string"}}},"MockTopicDataDTO":{"type":"object","properties":{"topicId":{"type":"string"},"topic":{"$ref":"#/components/schemas/MockTopicTransactionDTO"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MockMessageTransactionDTO"}}}},"MockTopicTransactionDTO":{"type":"object","properties":{"id":{"type":"string"},"memo":{"type":"string"},"payer_account_id":{"type":"string"},"topic_id":{"type":"string"}}},"MockMessageTransactionDTO":{"type":"object","properties":{"consensus_timestamp":{"type":"string"},"id":{"type":"string"},"message":{"type":"string"},"payer_account_id":{"type":"string"},"sequence_number":{"type":"number"},"topicId":{"type":"string"},"topic_id":{"type":"string"}}},"MockTokenDataDTO":{"type":"object","properties":{"id":{"type":"string"},"token_id":{"type":"string"},"treasury_account_id":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"},"decimals":{"type":"number"},"type":{"type":"string"},"admin_key":{"type":"boolean"},"freeze_key":{"type":"boolean"},"kyc_key":{"type":"boolean"},"supply_key":{"type":"boolean"},"wipe_key":{"type":"boolean"}}},"MockApiDataDTO":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/MockRequestConfigDTO"},"response":{"type":"string"}}},"MockRequestConfigDTO":{"type":"object","properties":{"method":{"type":"string"},"responseType":{"type":"string"},"url":{"type":"string"}}},"MockUserDataDTO":{"type":"object","properties":{"username":{"type":"string"},"did":{"type":"string"},"hederaAccountId":{"type":"string"},"hederaAccountKey":{"type":"string"},"document":{"$ref":"#/components/schemas/DidDocumentDTO"}}},"DidDocumentDTO":{"type":"object","properties":{"id":{"type":"string","nullable":false},"@context":{"nullable":true,"type":"array","items":{"type":"string"}},"alsoKnownAs":{"nullable":true,"type":"array","items":{"type":"string"}},"controller":{"nullable":true,"type":"array","items":{"type":"string"}},"verificationMethod":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}},"authentication":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}},"assertionMethod":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}},"keyAgreement":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}},"capabilityInvocation":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}},"capabilityDelegation":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}},"service":{"additionalProperties":true,"nullable":true,"type":"array","items":{"type":"object"}}},"required":["id","@context","alsoKnownAs","controller","verificationMethod","authentication","assertionMethod","keyAgreement","capabilityInvocation","capabilityDelegation","service"]},"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":{"/policies/{policyId}/dry-run/mock/data":{"post":{"description":"Saves (creates or updates) mock data entries. The request body follows the same schema as the GET response above. Existing entries for the same key are overwritten; all other existing entries are preserved.","operationId":"PolicyApi_updateMockData","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockDataDTO"}}}},"responses":{"200":{"description":"Data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockDataDTO"}}}},"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":"Save Mock Data.","tags":["policies"]}}}}
```

## Import Mock Data.

> Imports mock data from a previously exported \`.mock\` file and merges it into the current mock dataset.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/dry-run/mock/import":{"post":{"description":"Imports mock data from a previously exported `.mock` file and merges it into the current mock dataset.","operationId":"PolicyApi_importMock","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A zip file containing Mock to be imported.","content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object"}}}},"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":"Import Mock Data.","tags":["policies"]}}}}
```

## Export Mock Data.

> Exports all stored mock data as a downloadable compressed '.mock' file (zip), which contains separate files for each data type. The response is streamed with 'Content-Disposition: attachment'.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/dry-run/mock/export":{"get":{"description":"Exports all stored mock data as a downloadable compressed '.mock' file (zip), which contains separate files for each data type. The response is streamed with 'Content-Disposition: attachment'.","operationId":"PolicyApi_exportFormula","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation. Response zip file."},"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":"Export Mock Data.","tags":["policies"]}}}}
```

## Execute API Mock Request (Frontend Blocks).

> Triggers a mocked external API call on behalf of a policy block whose logic executes on the 'frontend' (client-side code blocks). The server resolves the request against the stored API mock entries and returns the configured response.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"MockApiRequestDTO":{"type":"object","properties":{"type":{"type":"string"},"url":{"type":"string"},"body":{"type":"object"},"headers":{"type":"object"}}},"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":{"/policies/{policyId}/dry-run/mock/request/api":{"post":{"description":"Triggers a mocked external API call on behalf of a policy block whose logic executes on the 'frontend' (client-side code blocks). The server resolves the request against the stored API mock entries and returns the configured response.","operationId":"PolicyApi_mockApiRequest","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockApiRequestDTO"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object"}}}},"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":"Execute API Mock Request (Frontend Blocks).","tags":["policies"]}}}}
```

## Execute IPFS Mock Request (Frontend Blocks).

> Triggers a mocked IPFS file retrieval on behalf of a policy block whose logic executes on the 'frontend'. The server resolves the CID against the stored IPFS mock entries and returns the configured payload.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"MockIpfsRequestDTO":{"type":"object","properties":{"cid":{"type":"string"}}},"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":{"/policies/{policyId}/dry-run/mock/request/ipfs":{"post":{"description":"Triggers a mocked IPFS file retrieval on behalf of a policy block whose logic executes on the 'frontend'. The server resolves the CID against the stored IPFS mock entries and returns the configured payload.","operationId":"PolicyApi_mockIpfsRequest","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockIpfsRequestDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}},"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":"Execute IPFS Mock Request (Frontend Blocks).","tags":["policies"]}}}}
```

## Get multi-policy link.

> Returns the current multi-policy link settings for the policy. Users with permission to execute or manage the policy can make this request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/multiple":{"get":{"description":"Returns the current multi-policy link settings for the policy. Users with permission to execute or manage the policy can make this request.","operationId":"PolicyApi_getMultiplePolicies","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"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 multi-policy link.","tags":["policies"]}}}}
```

## Create or update multi-policy link.

> Creates or updates the multi-policy link for the current policy. For a main policy, call GET /policies/{policyId}/multiple and reuse the returned mainPolicyTopicId and synchronizationTopicId. For a sub-policy, use the link generated by the main policy owner; it contains both mainPolicyTopicId and synchronizationTopicId. Users with permission to execute or manage the policy can make this request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/multiple":{"post":{"description":"Creates or updates the multi-policy link for the current policy. For a main policy, call GET /policies/{policyId}/multiple and reuse the returned mainPolicyTopicId and synchronizationTopicId. For a sub-policy, use the link generated by the main policy owner; it contains both mainPolicyTopicId and synchronizationTopicId. Users with permission to execute or manage the policy can make this request.","operationId":"PolicyApi_setMultiplePolicies","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Multi-policy link payload. For a main policy, take mainPolicyTopicId and synchronizationTopicId from GET /policies/{policyId}/multiple. For a sub-policy, use the values from the link shared by the main policy owner.","content":{"application/json":{"schema":{"type":"object","required":["mainPolicyTopicId","synchronizationTopicId"],"properties":{"mainPolicyTopicId":{"type":"string","description":"Topic ID of the main policy."},"synchronizationTopicId":{"type":"string","description":"Synchronization topic ID shared between linked policies."}}}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"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":"Create or update multi-policy link.","tags":["policies"]}}}}
```

## Add policy test.

> Add policy test.  Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"BadRequestErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"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":{"/policies/{policyId}/test":{"post":{"description":"Add policy test.  Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_addPolicyTest","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Multipart form data with one or more policy test files. Typically files are uploaded in the `tests` field; the route processes all received uploaded files.","content":{"multipart/form-data":{"schema":{"type":"object","required":["tests"],"properties":{"tests":{"type":"array","items":{"type":"string","format":"binary"},"description":"One or more uploaded test files."}}}}}},"responses":{"201":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}}}}},"400":{"description":"Bad request (e.g. no files to upload).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestErrorDTO"}}}},"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":"Add policy test.","tags":["policies"]}}}}
```

## Get policy test.

> Get policy test.  Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"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":{"/policies/{policyId}/test/{testId}":{"get":{"description":"Get policy test.  Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getPolicyTest","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"testId","required":true,"in":"path","description":"Test Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyTestDTO"}}}},"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 policy test.","tags":["policies"]}}}}
```

## Delete policy test.

> Delete policy test.  Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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":{"/policies/{policyId}/test/{testId}":{"delete":{"description":"Delete policy test.  Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_deletePolicyTest","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"testId","required":true,"in":"path","description":"Test Id","schema":{"type":"string"}}],"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":"Delete policy test.","tags":["policies"]}}}}
```

## Start policy test.

> Start policy test.  Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"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":{"/policies/{policyId}/test/{testId}/start":{"post":{"description":"Start policy test.  Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_startPolicyTest","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"testId","required":true,"in":"path","description":"Test Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyTestDTO"}}}},"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":"Start policy test.","tags":["policies"]}}}}
```

## Stop policy test.

> Stop policy test.  Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"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":{"/policies/{policyId}/test/{testId}/stop":{"post":{"description":"Stop policy test.  Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_stopPolicyTest","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"testId","required":true,"in":"path","description":"Test Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyTestDTO"}}}},"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":"Stop policy test.","tags":["policies"]}}}}
```

## Get test details.

> Get test details. In the UI, this data is available from the policy grid by opening the tests dialog for a policy.  Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RunningDetailsDTO":{"type":"object","properties":{"left":{"type":"object","description":"Left side (recorded) document","additionalProperties":true},"right":{"type":"object","description":"Right side (replayed) document","additionalProperties":true},"total":{"type":"number","description":"Total number of fields compared"},"documents":{"type":"object","description":"Detailed field-by-field comparison","additionalProperties":true}},"required":["left","right","total","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"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policies/{policyId}/test/{testId}/details":{"get":{"description":"Get test details. In the UI, this data is available from the policy grid by opening the tests dialog for a policy.  Only users with the Standard Registry role are allowed to make the request.","operationId":"PolicyApi_getTestDetails","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"testId","required":true,"in":"path","description":"Test Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunningDetailsDTO"}}}},"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 test details.","tags":["policies"]}}}}
```

## Get methodology categories.

> Returns all available methodology categories that can be used to filter methodology / policy templates in the library.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"paths":{"/policies/methodologies/categories":{"get":{"description":"Returns all available methodology categories that can be used to filter methodology / policy templates in the library.","operationId":"PolicyApi_getPolicyCategoriesAsync","parameters":[],"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyCategoryDTO"}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Get methodology categories.","tags":["policies"]}}},"components":{"schemas":{"PolicyCategoryDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["id","name","type"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}}}
```

## Search methodologies by categories and text.

> Returns methodology / policy templates filtered by category IDs and optional free-text search. Use this endpoint to search the methodology library by selected categories, text query, or both.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"paths":{"/policies/methodologies/search":{"post":{"description":"Returns methodology / policy templates filtered by category IDs and optional free-text search. Use this endpoint to search the methodology library by selected categories, text query, or both.","operationId":"PolicyApi_getPoliciesByCategory","parameters":[],"requestBody":{"required":true,"description":"Filters","content":{"application/json":{"schema":{"type":"object","properties":{"categoryIds":{"type":"array","items":{"type":"string"},"description":"Optional methodology category IDs to filter by."},"text":{"type":"string","description":"Optional free-text search query."}}}}}},"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyDTO"}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Search methodologies by categories and text.","tags":["policies"]}}},"components":{"schemas":{"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"policyTag":{"type":"string"},"status":{"type":"string","enum":["DRY-RUN","DRAFT","PUBLISH_ERROR","PUBLISH","DISCONTINUED","DEMO","VIEW"]},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"PolicyTestDTO":{"type":"object","properties":{"id":{"type":"string","description":"Test ID"},"uuid":{"type":"string","description":"Test UUID"},"name":{"type":"string","description":"Test Name"},"policyId":{"type":"string","description":"Policy ID"},"owner":{"type":"string","description":"Test owner"},"status":{"type":"string","description":"Test status","enum":["New","Running","Stopped","Success","Failure"]},"date":{"type":"string","description":"Last start date"},"duration":{"type":"string","description":"Test duration"},"progress":{"type":"string","description":"Test progress"},"resultId":{"type":"string","description":"Test result"},"result":{"type":"string","description":"Test result"}},"required":["id","uuid","name","policyId","owner","status","date","duration","progress","resultId","result"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}}}
```

## Create a new VC document version.

> Creates a new version of an existing VC document for the policy using the provided document DB record ID and updated document payload. In the UI, this is triggered from the VC document viewer after switching to edit mode and saving changes.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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"]},"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":{"/policies/{policyId}/create-new-version-vc-document":{"post":{"description":"Creates a new version of an existing VC document for the policy using the provided document DB record ID and updated document payload. In the UI, this is triggered from the VC document viewer after switching to edit mode and saving changes.","operationId":"PolicyApi_createNewVersionVcDocument","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Data","content":{"application/json":{"schema":{"type":"object","required":["documentId","document"],"properties":{"documentId":{"type":"string","description":"Document DB record ID of the VC document to version."},"document":{"type":"object","additionalProperties":true,"description":"Updated VC document payload used to create the new version."}}}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"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":"Create a new VC document version.","tags":["policies"]}}}}
```

## Get all versions of a VC document.

> Returns all stored versions of the selected VC document for the policy. The \`documentId\` parameter must be the document DB record ID (the same \`row\.id\` used in the UI), not the VC \`document.id\` / \`urn:uuid\`. In the UI, this data is used in the VC document viewer to populate the version selector.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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"]},"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":{"/policies/{policyId}/get-all-version-vc-documents/{documentId}":{"get":{"description":"Returns all stored versions of the selected VC document for the policy. The `documentId` parameter must be the document DB record ID (the same `row.id` used in the UI), not the VC `document.id` / `urn:uuid`. In the UI, this data is used in the VC document viewer to populate the version selector.","operationId":"PolicyApi_getAllVersionVcDocuments","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","description":"Document Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"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":"Get all versions of a VC document.","tags":["policies"]}}}}
```

## Save policy config with values

> Save policy config with values to the PolicyParameters table

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyEditableFieldDTO":{"type":"object","properties":{}},"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":{"/policies/{policyId}/parameters":{"post":{"description":"Save policy config with values to the PolicyParameters table","operationId":"PolicyApi_savePolicyParametersValues","parameters":[{"name":"policyId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Policy parameters.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}}}}},"responses":{"200":{"description":"Successful operation."},"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":"Save policy config with values","tags":["policies"]}}}}
```

## Get policy parameters.

> Get policy parameters.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyEditableFieldDTO":{"type":"object","properties":{}},"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":{"/policies/{policyId}/parameters/config":{"get":{"description":"Get policy parameters.","operationId":"PolicyApi_getPolicyParametersConfig","parameters":[{"name":"policyId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Policy parameters.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}}}}},"responses":{"200":{"description":"Successful operation."},"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 policy parameters.","tags":["policies"]}}}}
```


---

# Agent Instructions: 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:

```
GET https://dev.guardian.hedera.com/api-reference/policies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
