> For the complete documentation index, see [llms.txt](https://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://guardian.hedera.com/api-reference-guardian/guardian-schemas/schema.md).

# Schema

Schema operations on individual schema objects.

## Returns schema by schema ID.

> Returns schema by schema 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":[{"name":"schema","description":"Schema operations on individual schema objects.","parent":"guardian-schemas"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"SchemaDTO":{"type":"object","properties":{"createDate":{"type":"string","nullable":true},"updateDate":{"type":"string","nullable":true},"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"entity":{"type":"string","enum":["NONE","VC","EVC","STANDARD_REGISTRY","USER","POLICY","MINT_TOKEN","INTEGRATION_DATA_V2","RETIRE","WIPE_TOKEN","MINT_NFTOKEN","ISSUER","USER_ROLE","CHUNK","ACTIVITY_IMPACT","TOKEN_DATA_SOURCE","ROLE","USER_PERMISSIONS","POLICY_DISCUSSION_V2","POLICY_COMMENT","POLICY_EXPORT_PROOF","EVIDENCE_ATTACHMENTS"]},"iri":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","UNPUBLISHED","ERROR","DEMO","VIEW"]},"topicId":{"type":"string"},"version":{"type":"string"},"creator":{"type":"string","nullable":true},"owner":{"type":"string"},"messageId":{"type":"string","nullable":true},"category":{"type":"string","enum":["POLICY","MODULE","SYSTEM","TAG","TOOL","STATISTIC","LABEL","TEMPLATE"]},"templateId":{"type":"string","nullable":true},"templateSchemaId":{"type":"string","nullable":true},"documentURL":{"type":"string"},"contextURL":{"type":"string"},"document":{"oneOf":[{"type":"object","additionalProperties":true},{"type":"string"}]},"context":{"oneOf":[{"type":"object","additionalProperties":true},{"type":"string"}]},"readonly":{"type":"boolean","nullable":true},"system":{"type":"boolean","nullable":true},"active":{"type":"boolean","nullable":true},"codeVersion":{"type":"string","nullable":true},"iwaVersion":{"type":"string","nullable":true,"description":"IWA dMRV specification version the field properties are authored against. Absent means v1."},"topicCount":{"type":"number","nullable":true},"defs":{"type":"array","items":{"type":"string"}}},"required":["id","uuid","name","description","entity","iri","status","topicId","version","owner","category","documentURL","contextURL","document","context"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"NotFoundErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema/{schemaId}":{"get":{"description":"Returns schema by schema ID. Only users with the Standard Registry role are allowed to make the request.","operationId":"SingleSchemaApi_getSchema","parameters":[{"name":"schemaId","required":true,"in":"path","description":"Schema ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Returns schema by schema ID.","tags":["schema"]}}}}
```

## Returns all parent schemas.

> Returns all parent schemas.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"schema","description":"Schema operations on individual schema objects.","parent":"guardian-schemas"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"SchemaParentDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PUBLISHED","UNPUBLISHED","ERROR","DEMO","VIEW"]},"version":{"type":"string"},"sourceVersion":{"type":"string","nullable":true},"category":{"type":"string","enum":["POLICY","MODULE","SYSTEM","TAG","TOOL","STATISTIC","LABEL","TEMPLATE"]}},"required":["id","name","status","version","category"]},"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/{schemaId}/parents":{"get":{"description":"Returns all parent schemas.","operationId":"SingleSchemaApi_getSchemaParents","parameters":[{"name":"schemaId","required":true,"in":"path","description":"Schema identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SchemaParentDTO"}}}}},"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 all parent schemas.","tags":["schema"]}}}}
```

## Returns schema tree.

> Returns schema tree.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"schema","description":"Schema operations on individual schema objects.","parent":"guardian-schemas"}],"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/{schemaId}/tree":{"get":{"description":"Returns schema tree.","operationId":"SingleSchemaApi_getSchemaTree","parameters":[{"name":"schemaId","required":true,"in":"path","description":"Schema identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"children":{"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 tree.","tags":["schema"]}}}}
```

## Returns schema tree in PlantUML format.

> Returns schema tree as exportable PlantUML code.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"schema","description":"Schema operations on individual schema objects.","parent":"guardian-schemas"}],"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/{schemaId}/tree/export/plantuml":{"get":{"description":"Returns schema tree as exportable PlantUML code.","operationId":"SingleSchemaApi_getSchemaTreePlantUML","parameters":[{"name":"schemaId","required":true,"in":"path","description":"Schema identifier","schema":{"type":"string"}},{"name":"includeFields","required":false,"in":"query","description":"Include field names and descriptions in classes","schema":{"type":"boolean"}},{"name":"includeFormulas","required":false,"in":"query","description":"Include formula components and links","schema":{"type":"boolean"}},{"name":"includeDependencies","required":false,"in":"query","description":"Include dependent formulas referenced by directly linked formulas","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Returns schema tree in PlantUML format.","tags":["schema"]}}}}
```

## Returns a sample payload for the schema by schema Id.

> Returns a sample payload for the schema by schema Id.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"schema","description":"Schema operations on individual schema objects.","parent":"guardian-schemas"}],"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"]},"NotFoundErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/schema/{schemaId}/sample-payload":{"get":{"description":"Returns a sample payload for the schema by schema Id.","operationId":"SingleSchemaApi_getSampleSchemaPayload","parameters":[{"name":"schemaId","required":true,"in":"path","description":"Schema ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Generated document identifier"},"type":{"type":"string","description":"Schema type without the leading #"},"@context":{"type":"array","items":{"type":"string"},"description":"JSON-LD context; first item is the schema IRI"}},"required":["id","type","@context"],"additionalProperties":true}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Returns a sample payload for the schema by schema Id.","tags":["schema"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guardian.hedera.com/api-reference-guardian/guardian-schemas/schema.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
