# Schema

## 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.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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"]},"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},"topicCount":{"type":"number","nullable":true}},"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.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"servers":[{"url":"/api/v1","description":"version 1.0"}],"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"]}},"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.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"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":{"/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.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"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":{"/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.0.0","info":{"title":"Guardian","version":"3.6.0-rc"},"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"]},"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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
