> 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/api-reference-guardian/schema-templates.md).

# Schema Templates

## Returns schema templates.

> Returns schema templates visible to the current user. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates":{"get":{"description":"Returns schema templates visible to the current user. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_getSchemaTemplates","parameters":[{"name":"pageIndex","required":false,"in":"query","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","schema":{"type":"number"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"excludeIds","required":false,"in":"query","description":"Comma-separated template ids to leave out, so a picker's count and pages match what it shows.","schema":{"type":"string"}}],"responses":{"200":{"description":"Schema templates page.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"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 schema templates.","tags":["schema-templates"]}}}}
```

## Creates a new schema template.

> Creates a new schema template and a dedicated template topic. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates":{"post":{"description":"Creates a new schema template and a dedicated template topic. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_createSchemaTemplate","parameters":[],"requestBody":{"required":true,"description":"Schema template metadata and configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"config":{"type":"object"}}}}}},"responses":{"201":{"description":"Created schema template.","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":"Creates a new schema template.","tags":["schema-templates"]}}}}
```

## Creates a new schema template asynchronously.

> Creates a new schema template and a dedicated template topic asynchronously. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"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":{"/schema-templates/push":{"post":{"description":"Creates a new schema template and a dedicated template topic asynchronously. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_createSchemaTemplateAsync","parameters":[],"requestBody":{"required":true,"description":"Schema template metadata and configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"config":{"type":"object"}}}}}},"responses":{"202":{"description":"Task created.","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 schema template asynchronously.","tags":["schema-templates"]}}}}
```

## Creates a new draft version of a schema template asynchronously.

> Copies a published schema template and its schemas into a new editable draft version. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"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":{"/schema-templates/{templateId}/push/new-version":{"post":{"description":"Copies a published schema template and its schemas into a new editable draft version. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_createSchemaTemplateVersionAsync","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"202":{"description":"Task created.","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 draft version of a schema template asynchronously.","tags":["schema-templates"]}}}}
```

## Exports schema template as a file.

> Exports schema template metadata, configuration, and schemas as a zip-based \*.template file. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates/{templateId}/export/file":{"get":{"description":"Exports schema template metadata, configuration, and schemas as a zip-based *.template file. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_exportSchemaTemplateFile","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}}},"summary":"Exports schema template as a file.","tags":["schema-templates"]}}}}
```

## Returns schema template identity and Hedera message id for export.

> Returns template metadata and message id when the template has been published. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates/{templateId}/export/message":{"get":{"description":"Returns template metadata and message id when the template has been published. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_exportSchemaTemplateMessage","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}}},"summary":"Returns schema template identity and Hedera message id for export.","tags":["schema-templates"]}}}}
```

## Checks schema template message availability.

> Checks whether a schema template message is available locally or from Hedera/IPFS. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates/check/{messageId}":{"get":{"description":"Checks whether a schema template message is available locally or from Hedera/IPFS. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_checkSchemaTemplate","parameters":[{"name":"messageId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}}},"summary":"Checks schema template message availability.","tags":["schema-templates"]}}}}
```

## Previews schema template package from uploaded file.

> Parses a schema template archive without persisting it. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates/import/file/preview":{"post":{"description":"Parses a schema template archive without persisting it. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_previewSchemaTemplateFile","parameters":[],"responses":{"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}}},"summary":"Previews schema template package from uploaded file.","tags":["schema-templates"]}}}}
```

## Previews schema template package from message.

> Loads a schema template package from a Hedera message/IPFS and parses it without persisting. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates/import/message/preview":{"post":{"description":"Loads a schema template package from a Hedera message/IPFS and parses it without persisting. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_previewSchemaTemplateMessage","parameters":[],"responses":{"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}}},"summary":"Previews schema template package from message.","tags":["schema-templates"]}}}}
```

## Imports schema template from uploaded file asynchronously.

> Imports schema template metadata, configuration, and schemas from a local archive. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates/push/import/file":{"post":{"description":"Imports schema template metadata, configuration, and schemas from a local archive. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_importSchemaTemplateFileAsync","parameters":[],"responses":{"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}}},"summary":"Imports schema template from uploaded file asynchronously.","tags":["schema-templates"]}}}}
```

## Imports schema template from message asynchronously.

> Imports schema template metadata, configuration, and schemas from a Hedera message/IPFS archive. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates/push/import/message":{"post":{"description":"Imports schema template metadata, configuration, and schemas from a Hedera message/IPFS archive. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_importSchemaTemplateMessageAsync","parameters":[],"responses":{"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}}},"summary":"Imports schema template from message asynchronously.","tags":["schema-templates"]}}}}
```

## Returns effective applied schema template state by policy topic.

> Returns policy-specific schema template state. Snapshot configuration is used when available. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates/policies/topic/{topicId}/applied":{"get":{"description":"Returns policy-specific schema template state. Snapshot configuration is used when available. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_getAppliedSchemaTemplateByPolicyTopic","parameters":[{"name":"topicId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Applied schema template state, one entry per applied template.","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 effective applied schema template state by policy topic.","tags":["schema-templates"]}}}}
```

## Returns schema template by id.

> Returns schema template by internal id. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates/{templateId}":{"get":{"description":"Returns schema template by internal id. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_getSchemaTemplate","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Schema template.","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 schema template by id.","tags":["schema-templates"]}}}}
```

## Updates schema template.

> Updates schema template metadata and configuration. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates/{templateId}":{"put":{"description":"Updates schema template metadata and configuration. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_updateSchemaTemplate","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Schema template metadata and configuration.","content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Updated schema template.","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":"Updates schema template.","tags":["schema-templates"]}}}}
```

## Deletes schema template.

> Deletes draft schema template and its draft schemas. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates/{templateId}":{"delete":{"description":"Deletes draft schema template and its draft schemas. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_deleteSchemaTemplate","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Operation result.","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":"Deletes schema template.","tags":["schema-templates"]}}}}
```

## Deletes schema template asynchronously.

> Deletes draft schema template and its draft schemas asynchronously. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"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":{"/schema-templates/push/{templateId}":{"delete":{"description":"Deletes draft schema template and its draft schemas asynchronously. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_deleteSchemaTemplateAsync","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"202":{"description":"Task created.","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":"Deletes schema template asynchronously.","tags":["schema-templates"]}}}}
```

## Publishes schema template asynchronously.

> Publishes schema template package with metadata, configuration, and schemas. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"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":{"/schema-templates/{templateId}/push/publish":{"put":{"description":"Publishes schema template package with metadata, configuration, and schemas. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_publishSchemaTemplateAsync","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Schema template version for publish.","content":{"application/json":{"schema":{"type":"object","properties":{"templateVersion":{"type":"string"}}}}}},"responses":{"202":{"description":"Task created.","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 schema template asynchronously.","tags":["schema-templates"]}}}}
```

## Applies schema template to policy asynchronously.

> Copies template schemas into the selected draft policy and stores template binding metadata on the policy. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"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":{"/schema-templates/{templateId}/policies/{policyId}/push/apply":{"post":{"description":"Copies template schemas into the selected draft policy and stores template binding metadata on the policy. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_applySchemaTemplateAsync","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string"}},{"name":"policyId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"202":{"description":"Task created.","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":"Applies schema template to policy asynchronously.","tags":["schema-templates"]}}}}
```

## Previews detaching an applied schema template.

> Lists the copied schemas a detach would delete, and the ones it would keep because another schema still references them. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates/{templateId}/policies/{policyId}/detach/preview":{"get":{"description":"Lists the copied schemas a detach would delete, and the ones it would keep because another schema still references them. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_previewSchemaTemplateDetach","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string"}},{"name":"policyId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Schema template detach preview."},"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":"Previews detaching an applied schema template.","tags":["schema-templates"]}}}}
```

## Previews applied schema template update.

> Calculates schema and field changes before updating the template applied to a draft policy. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema-templates/{templateId}/policies/{policyId}/update/preview":{"get":{"description":"Calculates schema and field changes before updating the template applied to a draft policy. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_previewSchemaTemplateUpdate","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string"}},{"name":"policyId","required":true,"in":"path","schema":{"type":"string"}},{"name":"targetTemplateId","required":false,"in":"query","description":"Preview switching the binding to a different template instead of refreshing the same one.","schema":{"type":"string"}}],"responses":{"200":{"description":"Schema template update preview."},"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":"Previews applied schema template update.","tags":["schema-templates"]}}}}
```

## Updates applied schema template on policy asynchronously.

> Applies a newer schema template version to a draft policy and refreshes the policy snapshot. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"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":{"/schema-templates/{templateId}/policies/{policyId}/push/update":{"post":{"description":"Applies a newer schema template version to a draft policy and refreshes the policy snapshot. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_updateAppliedSchemaTemplateAsync","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string"}},{"name":"policyId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"202":{"description":"Task created.","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":"Updates applied schema template on policy asynchronously.","tags":["schema-templates"]}}}}
```

## Detaches schema template from policy asynchronously.

> Removes template binding metadata from the selected draft policy and turns copied template schemas into regular policy schemas. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[],"servers":[{"url":"/api/v1","description":"API v1"}],"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":{"/schema-templates/{templateId}/policies/{policyId}/push/detach":{"post":{"description":"Removes template binding metadata from the selected draft policy and turns copied template schemas into regular policy schemas. Only users with the Standard Registry role are allowed to make the request.","operationId":"SchemaTemplatesApi_detachSchemaTemplateAsync","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string"}},{"name":"policyId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"202":{"description":"Task created.","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":"Detaches schema template from policy asynchronously.","tags":["schema-templates"]}}}}
```
