> For the complete documentation index, see [llms.txt](https://docs.guardianservice.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.guardianservice.app/technical-information/users/standard-registry-users-schemas-and-policies/policies/testing-debugging-code/apis/executes-the-test-run-of-the-code-in-the-block.md).

# Executes the test-run of the code in the block

## .

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

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"3.3.0"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DebugBlockConfigDTO":{"type":"object","properties":{"block":{"type":"object","description":"Block config","additionalProperties":true},"data":{"description":"Input data","allOf":[{"$ref":"#/components/schemas/DebugBlockDataDTO"}]}},"required":["block","data"]},"DebugBlockDataDTO":{"type":"object","properties":{"input":{"type":"string","description":"Input event"},"output":{"type":"string","description":"Output event"},"type":{"type":"string","description":"Document type","enum":["schema","json","file","history"]},"document":{"description":"Document","oneOf":[{"type":"string"},{"type":"object","additionalProperties":true}]}},"required":["input","output","type","document"]},"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"]},"InternalServerErrorDTO":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/policies/{policyId}/dry-run/block":{"post":{"description":". 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 config.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebugBlockConfigDTO"}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebugBlockResultDTO"}}}},"401":{"description":"Unauthorized."},"403":{"description":"Forbidden."},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":".","tags":["policies"]}}}}
```
