# Previews the policy from IPFS without loading it into the local DB

## Returns preview of the remote policies.

> Returns preview of the remote policies.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.1.1"},"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"},"metadata":{"type":"object","additionalProperties":true,"nullable":true}},"required":["messageId","metadata"]},"PolicyPreviewDTO":{"type":"object","properties":{"module":{"$ref":"#/components/schemas/PolicyDTO"},"messageId":{"type":"string"},"schemas":{"type":"array","items":{"type":"array"}},"tags":{"type":"array","items":{"type":"array"}},"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"},"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"},"messageId":{"type":"string"},"codeVersion":{"type":"string"},"createDate":{"type":"string"},"version":{"type":"string"},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true},"userGroups":{"type":"array","items":{"type":"array"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"type":"array","items":{"type":"array"}},"policyTopics":{"type":"array","items":{"type":"array"}},"policyTokens":{"type":"array","items":{"type":"array"}},"policyGroups":{"type":"array","items":{"type":"array"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","messageId","codeVersion","createDate","version","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","categories","projectSchema","tests"]},"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"]},"InternalServerErrorDTO":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"}},"required":["code","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."},"403":{"description":"Forbidden."},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Returns preview of the remote policies.","tags":["external-policies"]}}}}
```
