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

# External Policies

## Returns the list of requests for adding remote policies.

> Returns the list of requests for adding remote policies.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ExternalPolicyDTO":{"type":"object","properties":{"uuid":{"type":"string","description":"Policy UUID"},"name":{"type":"string","description":"Policy name"},"description":{"type":"string","description":"Policy description"},"version":{"type":"string","description":"Policy version"},"topicId":{"type":"string","description":"Policy topic id"},"instanceTopicId":{"type":"string","description":"Policy instance topic id"},"messageId":{"type":"string","description":"Policy message id"},"policyTag":{"type":"string","description":"Policy tag"},"owner":{"type":"string","description":"Policy owner"},"status":{"type":"string","enum":["NEW","APPROVED","REJECTED"]},"username":{"type":"string","description":"Username"}},"required":["uuid","name","description","version","topicId","instanceTopicId","messageId","policyTag","owner","status","username"]},"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":{"/external-policies":{"get":{"description":"Returns the list of requests for adding remote policies.","operationId":"ExternalPoliciesApi_getExternalPolicies","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"}}],"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/ExternalPolicyDTO"}}}}},"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 the list of requests for adding remote policies.","tags":["external-policies"]}}}}
```

## Returns preview of the remote policies.

> Returns preview of the remote policies.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"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":{"/external-policies/preview":{"post":{"description":"Returns preview of the remote policies.","operationId":"ExternalPoliciesApi_previewExternalPolicy","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":"Returns preview of the remote policies.","tags":["external-policies"]}}}}
```

## Creates a request to import a remote policy.

> Creates a request to import a remote policy.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"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"]},"ExternalPolicyDTO":{"type":"object","properties":{"uuid":{"type":"string","description":"Policy UUID"},"name":{"type":"string","description":"Policy name"},"description":{"type":"string","description":"Policy description"},"version":{"type":"string","description":"Policy version"},"topicId":{"type":"string","description":"Policy topic id"},"instanceTopicId":{"type":"string","description":"Policy instance topic id"},"messageId":{"type":"string","description":"Policy message id"},"policyTag":{"type":"string","description":"Policy tag"},"owner":{"type":"string","description":"Policy owner"},"status":{"type":"string","enum":["NEW","APPROVED","REJECTED"]},"username":{"type":"string","description":"Username"}},"required":["uuid","name","description","version","topicId","instanceTopicId","messageId","policyTag","owner","status","username"]},"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":{"/external-policies/import":{"post":{"description":"Creates a request to import a remote policy.","operationId":"ExternalPoliciesApi_importExternalPolicy","parameters":[],"requestBody":{"required":true,"description":"Message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportMessageDTO"}}}},"responses":{"200":{"description":"Policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalPolicyDTO"}}}},"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":"Creates a request to import a remote policy.","tags":["external-policies"]}}}}
```

## Approves the request to import a remote policy, and imports it.

> Approves the request to import a remote policy, and imports it.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/external-policies/push/{messageId}/approve":{"post":{"description":"Approves the request to import a remote policy, and imports it.","operationId":"ExternalPoliciesApi_approveExternalPolicyAsync","parameters":[{"name":"messageId","required":true,"in":"path","description":"Policy message 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"}}}},"404":{"description":"Item not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}},"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":"Approves the request to import a remote policy, and imports it.","tags":["external-policies"]}}}}
```

## Rejects the request to import a remote policy.

> Rejects the request to import a remote policy.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/external-policies/push/{messageId}/reject":{"post":{"description":"Rejects the request to import a remote policy.","operationId":"ExternalPoliciesApi_rejectExternalPolicyAsync","parameters":[{"name":"messageId","required":true,"in":"path","description":"Policy message 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"}}}},"404":{"description":"Item not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}},"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":"Rejects the request to import a remote policy.","tags":["external-policies"]}}}}
```

## Approves the request to import a remote policy, and imports it.

> Approves the request to import a remote policy, and imports it.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/external-policies/{messageId}/approve":{"post":{"description":"Approves the request to import a remote policy, and imports it.","operationId":"ExternalPoliciesApi_approveExternalPolicy","parameters":[{"name":"messageId","required":true,"in":"path","description":"Policy message 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"}}}},"404":{"description":"Item not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}},"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":"Approves the request to import a remote policy, and imports it.","tags":["external-policies"]}}}}
```

## Rejects the request to import a remote policy.

> Rejects the request to import a remote policy.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/external-policies/{messageId}/reject":{"post":{"description":"Rejects the request to import a remote policy.","operationId":"ExternalPoliciesApi_rejectExternalPolicy","parameters":[{"name":"messageId","required":true,"in":"path","description":"Policy message 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"}}}},"404":{"description":"Item not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}},"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":"Rejects the request to import a remote policy.","tags":["external-policies"]}}}}
```

## Disconnects the user from the selected remote policy on the current Guardian instance only.

> Disconnects the user from the selected remote policy on the current Guardian instance only.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"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":{"/external-policies/{messageId}/disconnect":{"put":{"description":"Disconnects the user from the selected remote policy on the current Guardian instance only.","operationId":"ExternalPoliciesApi_disconnectPolicy","parameters":[{"name":"messageId","required":true,"in":"path","description":"Policy message id","schema":{"type":"string"}},{"name":"full","required":false,"in":"query","description":"Disconnects the user from the selected remote policy on the current Guardian instance and from the same policy on the Main Guardian instance where it is deployed.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"array","items":{"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 remote policy on the current Guardian instance only.","tags":["external-policies"]}}}}
```

## Removes the remote policy from the current Guardian instance.

> Removes the remote policy from the current Guardian instance.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"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":{"/external-policies/{messageId}":{"delete":{"description":"Removes the remote policy from the current Guardian instance.","operationId":"ExternalPoliciesApi_deletePolicy","parameters":[{"name":"messageId","required":true,"in":"path","description":"Policy message id","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"array","items":{"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":"Removes the remote policy from the current Guardian instance.","tags":["external-policies"]}}}}
```

## Returns the list of requests for action from remote Guardians.

> Returns the list of requests for action from remote Guardians.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyRequestDTO":{"type":"object","properties":{"uuid":{"type":"string","description":"Action UUID"},"type":{"type":"string","description":"Action type","enum":["ACTION","REQUEST","REMOTE_ACTION"]},"messageId":{"type":"string","description":"Action message id"},"startMessageId":{"type":"string","description":"Action start message id"},"status":{"type":"string","description":"Action status","enum":["NEW","ERROR","COMPLETED","REJECTED","CANCELED"]},"lastStatus":{"type":"string","description":"Action last status","enum":["NEW","ERROR","COMPLETED","REJECTED","CANCELED"]},"accountId":{"type":"string","description":"Action owner"},"sender":{"type":"string","description":"Message sender"},"owner":{"type":"string","description":"Action owner"},"topicId":{"type":"string","description":"Action topic id"},"document":{"type":"object","description":"Action data","additionalProperties":true},"policyId":{"type":"string","description":"Policy UU"},"blockTag":{"type":"string","description":"Block tag"},"policyMessageId":{"type":"string","description":"Policy message id"},"loaded":{"type":"boolean","description":"File is loaded"}},"required":["uuid","type","messageId","startMessageId","status","lastStatus","accountId","sender","owner","topicId","document","policyId","blockTag","policyMessageId","loaded"]},"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":{"/external-policies/requests":{"get":{"description":"Returns the list of requests for action from remote Guardians.","operationId":"ExternalPoliciesApi_getRemoteRequests","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":"policyId","required":false,"in":"query","description":"Policy Id","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Status","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Type","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/PolicyRequestDTO"}}}}},"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 the list of requests for action from remote Guardians.","tags":["external-policies"]}}}}
```

## Approves a request for an action from a remote Guardian.

> Approves a request for an action from a remote Guardian.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyRequestDTO":{"type":"object","properties":{"uuid":{"type":"string","description":"Action UUID"},"type":{"type":"string","description":"Action type","enum":["ACTION","REQUEST","REMOTE_ACTION"]},"messageId":{"type":"string","description":"Action message id"},"startMessageId":{"type":"string","description":"Action start message id"},"status":{"type":"string","description":"Action status","enum":["NEW","ERROR","COMPLETED","REJECTED","CANCELED"]},"lastStatus":{"type":"string","description":"Action last status","enum":["NEW","ERROR","COMPLETED","REJECTED","CANCELED"]},"accountId":{"type":"string","description":"Action owner"},"sender":{"type":"string","description":"Message sender"},"owner":{"type":"string","description":"Action owner"},"topicId":{"type":"string","description":"Action topic id"},"document":{"type":"object","description":"Action data","additionalProperties":true},"policyId":{"type":"string","description":"Policy UU"},"blockTag":{"type":"string","description":"Block tag"},"policyMessageId":{"type":"string","description":"Policy message id"},"loaded":{"type":"boolean","description":"File is loaded"}},"required":["uuid","type","messageId","startMessageId","status","lastStatus","accountId","sender","owner","topicId","document","policyId","blockTag","policyMessageId","loaded"]},"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":{"/external-policies/requests/{messageId}/approve":{"put":{"description":"Approves a request for an action from a remote Guardian.","operationId":"ExternalPoliciesApi_approveRemoteRequest","parameters":[{"name":"messageId","required":true,"in":"path","description":"Policy message id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Object that contains a configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRequestDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRequestDTO"}}}},"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":"Approves a request for an action from a remote Guardian.","tags":["external-policies"]}}}}
```

## Rejects a request for an action from a remote Guardian

> Rejects a request for an action from a remote Guardian

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyRequestDTO":{"type":"object","properties":{"uuid":{"type":"string","description":"Action UUID"},"type":{"type":"string","description":"Action type","enum":["ACTION","REQUEST","REMOTE_ACTION"]},"messageId":{"type":"string","description":"Action message id"},"startMessageId":{"type":"string","description":"Action start message id"},"status":{"type":"string","description":"Action status","enum":["NEW","ERROR","COMPLETED","REJECTED","CANCELED"]},"lastStatus":{"type":"string","description":"Action last status","enum":["NEW","ERROR","COMPLETED","REJECTED","CANCELED"]},"accountId":{"type":"string","description":"Action owner"},"sender":{"type":"string","description":"Message sender"},"owner":{"type":"string","description":"Action owner"},"topicId":{"type":"string","description":"Action topic id"},"document":{"type":"object","description":"Action data","additionalProperties":true},"policyId":{"type":"string","description":"Policy UU"},"blockTag":{"type":"string","description":"Block tag"},"policyMessageId":{"type":"string","description":"Policy message id"},"loaded":{"type":"boolean","description":"File is loaded"}},"required":["uuid","type","messageId","startMessageId","status","lastStatus","accountId","sender","owner","topicId","document","policyId","blockTag","policyMessageId","loaded"]},"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":{"/external-policies/requests/{messageId}/reject":{"put":{"description":"Rejects a request for an action from a remote Guardian","operationId":"ExternalPoliciesApi_rejectRemoteRequest","parameters":[{"name":"messageId","required":true,"in":"path","description":"Policy message id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Object that contains a configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRequestDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRequestDTO"}}}},"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":"Rejects a request for an action from a remote Guardian","tags":["external-policies"]}}}}
```

## Cancels a request for an action from a remote Guardian

> Cancels a request for an action from a remote Guardian

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyRequestDTO":{"type":"object","properties":{"uuid":{"type":"string","description":"Action UUID"},"type":{"type":"string","description":"Action type","enum":["ACTION","REQUEST","REMOTE_ACTION"]},"messageId":{"type":"string","description":"Action message id"},"startMessageId":{"type":"string","description":"Action start message id"},"status":{"type":"string","description":"Action status","enum":["NEW","ERROR","COMPLETED","REJECTED","CANCELED"]},"lastStatus":{"type":"string","description":"Action last status","enum":["NEW","ERROR","COMPLETED","REJECTED","CANCELED"]},"accountId":{"type":"string","description":"Action owner"},"sender":{"type":"string","description":"Message sender"},"owner":{"type":"string","description":"Action owner"},"topicId":{"type":"string","description":"Action topic id"},"document":{"type":"object","description":"Action data","additionalProperties":true},"policyId":{"type":"string","description":"Policy UU"},"blockTag":{"type":"string","description":"Block tag"},"policyMessageId":{"type":"string","description":"Policy message id"},"loaded":{"type":"boolean","description":"File is loaded"}},"required":["uuid","type","messageId","startMessageId","status","lastStatus","accountId","sender","owner","topicId","document","policyId","blockTag","policyMessageId","loaded"]},"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":{"/external-policies/requests/{messageId}/cancel":{"put":{"description":"Cancels a request for an action from a remote Guardian","operationId":"ExternalPoliciesApi_cancelRemoteRequest","parameters":[{"name":"messageId","required":true,"in":"path","description":"Action Identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Object that contains a configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRequestDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRequestDTO"}}}},"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":"Cancels a request for an action from a remote Guardian","tags":["external-policies"]}}}}
```

## Reloads a request for an action from a remote Guardian

> Reloads a request for an action from a remote Guardian

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyRequestDTO":{"type":"object","properties":{"uuid":{"type":"string","description":"Action UUID"},"type":{"type":"string","description":"Action type","enum":["ACTION","REQUEST","REMOTE_ACTION"]},"messageId":{"type":"string","description":"Action message id"},"startMessageId":{"type":"string","description":"Action start message id"},"status":{"type":"string","description":"Action status","enum":["NEW","ERROR","COMPLETED","REJECTED","CANCELED"]},"lastStatus":{"type":"string","description":"Action last status","enum":["NEW","ERROR","COMPLETED","REJECTED","CANCELED"]},"accountId":{"type":"string","description":"Action owner"},"sender":{"type":"string","description":"Message sender"},"owner":{"type":"string","description":"Action owner"},"topicId":{"type":"string","description":"Action topic id"},"document":{"type":"object","description":"Action data","additionalProperties":true},"policyId":{"type":"string","description":"Policy UU"},"blockTag":{"type":"string","description":"Block tag"},"policyMessageId":{"type":"string","description":"Policy message id"},"loaded":{"type":"boolean","description":"File is loaded"}},"required":["uuid","type","messageId","startMessageId","status","lastStatus","accountId","sender","owner","topicId","document","policyId","blockTag","policyMessageId","loaded"]},"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":{"/external-policies/requests/{messageId}/reload":{"put":{"description":"Reloads a request for an action from a remote Guardian","operationId":"ExternalPoliciesApi_loadRemoteRequest","parameters":[{"name":"messageId","required":true,"in":"path","description":"Action Identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Object that contains a configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRequestDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRequestDTO"}}}},"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":"Reloads a request for an action from a remote Guardian","tags":["external-policies"]}}}}
```

## Returns the count of entries in the list of requests for actions from remote Guardians.

> Returns the count of entries in the list of requests for actions from remote Guardians.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyRequestCountDTO":{"type":"object","properties":{"requestsCount":{"type":"number","description":"Number of new requests"},"actionsCount":{"type":"number","description":"Number of new actions"},"delayCount":{"type":"number","description":"Number of recent actions"},"total":{"type":"number","description":"Total"}},"required":["requestsCount","actionsCount","delayCount","total"]},"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":{"/external-policies/requests/count":{"get":{"description":"Returns the count of entries in the list of requests for actions from remote Guardians.","operationId":"ExternalPoliciesApi_getRemoteRequestsCount","parameters":[{"name":"policyId","required":false,"in":"query","description":"Policy Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRequestCountDTO"}}}},"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 the count of entries in the list of requests for actions from remote Guardians.","tags":["external-policies"]}}}}
```

## Returns the request document by startMessageId.

> Returns the request document by startMessageId.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"external-policies"}],"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":{"/external-policies/requests/document":{"get":{"description":"Returns the request document by startMessageId.","operationId":"ExternalPoliciesApi_getRequestDocument","parameters":[{"name":"startMessageId","required":true,"in":"query","description":"Start Message Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Request document 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 the request document by startMessageId.","tags":["external-policies"]}}}}
```
