> 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-policies/labels.md).

# Labels

Labels for categorizing and filtering policies.

## Return a list of all policy labels.

> Returns all policy labels.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string"},"policyId":{"type":"string"},"policyTopicId":{"type":"string"},"policyInstanceTopicId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","DRY_RUN","PUBLISHED","ERROR","ACTIVE"]},"config":{"type":"object","additionalProperties":true,"nullable":true}},"required":["name","config"]},"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":{"/policy-labels":{"get":{"description":"Returns all policy labels.","operationId":"PolicyLabelsApi_getPolicyLabels","parameters":[{"name":"pageIndex","required":false,"in":"query","description":"The number of pages to skip before starting to collect the result set","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"The numbers of items to return","schema":{"type":"number"}},{"name":"policyInstanceTopicId","required":false,"in":"query","description":"Policy Instance Topic Id","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyLabelDTO"}}}}},"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":"Return a list of all policy labels.","tags":["policy-labels"]}}}}
```

## Creates a new policy label.

> Creates a new policy label.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string"},"policyId":{"type":"string"},"policyTopicId":{"type":"string"},"policyInstanceTopicId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","DRY_RUN","PUBLISHED","ERROR","ACTIVE"]},"config":{"type":"object","additionalProperties":true,"nullable":true}},"required":["name","config"]},"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policy-labels":{"post":{"description":"Creates a new policy label.","operationId":"PolicyLabelsApi_createPolicyLabel","parameters":[],"requestBody":{"required":true,"description":"Configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelDTO"}}}},"responses":{"201":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Creates a new policy label.","tags":["policy-labels"]}}}}
```

## Retrieves policy label.

> Retrieves policy label for the specified ID.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string"},"policyId":{"type":"string"},"policyTopicId":{"type":"string"},"policyInstanceTopicId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","DRY_RUN","PUBLISHED","ERROR","ACTIVE"]},"config":{"type":"object","additionalProperties":true,"nullable":true}},"required":["name","config"]},"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policy-labels/{definitionId}":{"get":{"description":"Retrieves policy label for the specified ID.","operationId":"PolicyLabelsApi_getPolicyLabelById","parameters":[{"name":"definitionId","required":true,"in":"path","description":"policy label Identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Retrieves policy label.","tags":["policy-labels"]}}}}
```

## Updates policy label.

> Updates policy label configuration for the specified label ID.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string"},"policyId":{"type":"string"},"policyTopicId":{"type":"string"},"policyInstanceTopicId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","DRY_RUN","PUBLISHED","ERROR","ACTIVE"]},"config":{"type":"object","additionalProperties":true,"nullable":true}},"required":["name","config"]},"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policy-labels/{definitionId}":{"put":{"description":"Updates policy label configuration for the specified label ID.","operationId":"PolicyLabelsApi_updatePolicyLabel","parameters":[{"name":"definitionId","required":true,"in":"path","description":"policy label Identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Object that contains a configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelDTO"}}}},"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":"Item not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Updates policy label.","tags":["policy-labels"]}}}}
```

## Deletes the policy label.

> Deletes the policy label with the provided ID.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policy-labels/{definitionId}":{"delete":{"description":"Deletes the policy label with the provided ID.","operationId":"PolicyLabelsApi_deletePolicyLabel","parameters":[{"name":"definitionId","required":true,"in":"path","description":"policy label Identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","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"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Deletes the policy label.","tags":["policy-labels"]}}}}
```

## Publishes policy label.

> Publishes policy label for the specified label ID.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string"},"policyId":{"type":"string"},"policyTopicId":{"type":"string"},"policyInstanceTopicId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","DRY_RUN","PUBLISHED","ERROR","ACTIVE"]},"config":{"type":"object","additionalProperties":true,"nullable":true}},"required":["name","config"]},"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policy-labels/{definitionId}/publish":{"put":{"description":"Publishes policy label for the specified label ID.","operationId":"PolicyLabelsApi_publishPolicyLabel","parameters":[{"name":"definitionId","required":true,"in":"path","description":"policy label Identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelDTO"}}}},"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":"Item not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Publishes policy label.","tags":["policy-labels"]}}}}
```

## Publishes policy label.

> Publishes policy label for the specified label ID.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string"},"policyId":{"type":"string"},"policyTopicId":{"type":"string"},"policyInstanceTopicId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","DRY_RUN","PUBLISHED","ERROR","ACTIVE"]},"config":{"type":"object","additionalProperties":true,"nullable":true}},"required":["name","config"]},"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policy-labels/push/{definitionId}/publish":{"put":{"description":"Publishes policy label for the specified label ID.","operationId":"PolicyLabelsApi_publishPolicyLabelAsync","parameters":[{"name":"definitionId","required":true,"in":"path","description":"policy label Identifier","schema":{"type":"string"}}],"responses":{"202":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelDTO"}}}},"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":"Item not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Publishes policy label.","tags":["policy-labels"]}}}}
```

## Retrieves policy label relationships.

> Retrieves policy label relationships for the specified ID.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelRelationshipsDTO":{"type":"object","properties":{"policy":{"description":"Policy summary (without config).","allOf":[{"$ref":"#/components/schemas/PolicyDTO"}]},"policySchemas":{"description":"Published root schemas and the sub-schemas they reference, without context. When a document has no $defs, `defs` lists the iris of its definitions, which are the documents of the sub-schemas in this list.","type":"array","items":{"$ref":"#/components/schemas/SchemaDTO"}},"documentsSchemas":{"type":"array","items":{"$ref":"#/components/schemas/SchemaDTO"}}}},"PolicyDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"applicabilityConditions":{"type":"string"},"detailsUrl":{"type":"string"},"typicalProjects":{"type":"string"},"importantParameters":{"$ref":"#/components/schemas/PolicyImportantParametersDTO"},"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"},"instanceTopicId":{"type":"string"},"messageId":{"type":"string"},"availability":{"type":"string","enum":["private","public"]},"codeVersion":{"type":"string"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PolicyToolDTO"}},"schemaTemplates":{"additionalProperties":true,"nullable":true,"description":"Server-managed schema template bindings, one per applied template. Ignored by normal policy update endpoints.","type":"array","items":{"type":"object"}},"createDate":{"type":"string"},"version":{"type":"string"},"originalChanged":{"type":"string"},"editableParametersSettings":{"type":"array","items":{"$ref":"#/components/schemas/PolicyEditableFieldDTO"}},"config":{"type":"object","additionalProperties":true},"userRole":{"type":"string"},"userRoles":{"type":"array","items":{"type":"string"}},"userGroup":{"type":"object","additionalProperties":true,"nullable":true,"description":"Last active group in iteration order (not a separate summary). Often shown via groupLabel or uuid."},"userGroups":{"additionalProperties":true,"description":"Full list of group rows for this user in the policy (getGroupsByUser), including inactive.","type":"array","items":{"type":"object"}},"policyRoles":{"type":"array","items":{"type":"string"}},"policyNavigation":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTopics":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyTokens":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyGroups":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"policyDocumentation":{"additionalProperties":true,"description":"User-configured policy API documentation entries. The `alias` may be a single slug (`create-device`) or a path of slugs separated by `/` (`monitoring-reports/create`).","type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}},"projectSchema":{"type":"string"},"tests":{"type":"array","items":{"$ref":"#/components/schemas/PolicyTestDTO"}},"ignoreRules":{"description":"Validation-only rules to hide matching warnings/infos (not persisted)","type":"array","items":{"$ref":"#/components/schemas/IgnoreRuleDTO"}}},"required":["id","uuid","name","description","topicDescription","policyTag","status","creator","owner","topicId","instanceTopicId","messageId","codeVersion","tools","schemaTemplates","createDate","version","editableParametersSettings","config","userRole","userRoles","userGroup","userGroups","policyRoles","policyNavigation","policyTopics","policyTokens","policyGroups","policyDocumentation","categories","projectSchema","tests"]},"PolicyImportantParametersDTO":{"type":"object","properties":{"atValidation":{"type":"string"},"monitored":{"type":"string"}}},"PolicyToolDTO":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string","nullable":true},"topicId":{"type":"string"},"messageId":{"type":"string"}},"required":["name","topicId","messageId"]},"PolicyEditableFieldDTO":{"type":"object","properties":{}},"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"]},"IgnoreRuleDTO":{"type":"object","properties":{"code":{"type":"string","description":"Stable message code, e.g. DEPRECATION_BLOCK"},"blockType":{"type":"string","description":"Limit by block type"},"property":{"type":"string","description":"Limit by property"},"contains":{"type":"string","description":"Substring filter applied to message text"},"severity":{"type":"string","description":"Type of message","enum":["warning","info"]}}},"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policy-labels/{definitionId}/relationships":{"get":{"description":"Retrieves policy label relationships for the specified ID.","operationId":"PolicyLabelsApi_getPolicyLabelRelationships","parameters":[{"name":"definitionId","required":true,"in":"path","description":"policy label Identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelRelationshipsDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Retrieves policy label relationships.","tags":["policy-labels"]}}}}
```

## Imports new labels from a zip file.

> Imports new labels from the provided zip file into the local DB.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string"},"policyId":{"type":"string"},"policyTopicId":{"type":"string"},"policyInstanceTopicId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","DRY_RUN","PUBLISHED","ERROR","ACTIVE"]},"config":{"type":"object","additionalProperties":true,"nullable":true}},"required":["name","config"]},"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":{"/policy-labels/{policyId}/import/file":{"post":{"description":"Imports new labels from the provided zip file into the local DB.","operationId":"PolicyLabelsApi_importPolicyLabel","parameters":[{"name":"policyId","required":true,"in":"path","description":"Policy Id","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A binary/zip file containing labels to be imported.","content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"201":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelDTO"}}}},"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":"Imports new labels from a zip file.","tags":["policy-labels"]}}}}
```

## Returns a zip file containing labels.

> Returns a zip file containing labels.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"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":{"/policy-labels/{definitionId}/export/file":{"get":{"description":"Returns a zip file containing labels.","operationId":"PolicyLabelsApi_exportPolicyLabel","parameters":[{"name":"definitionId","required":true,"in":"path","description":"policy label Identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation. Response zip file.","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized request.","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/zip":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Returns a zip file containing labels.","tags":["policy-labels"]}}}}
```

## Imports a zip file containing labels.

> Imports a zip file containing labels.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string"},"policyId":{"type":"string"},"policyTopicId":{"type":"string"},"policyInstanceTopicId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","DRY_RUN","PUBLISHED","ERROR","ACTIVE"]},"config":{"type":"object","additionalProperties":true,"nullable":true}},"required":["name","config"]},"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":{"/policy-labels/import/file/preview":{"post":{"description":"Imports a zip file containing labels.","operationId":"PolicyLabelsApi_previewPolicyLabel","parameters":[],"requestBody":{"required":true,"description":"A binary/zip file containing labels to preview.","content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"policy label preview.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelDTO"}}}},"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":"Imports a zip file containing labels.","tags":["policy-labels"]}}}}
```

## Search labels ans statistics.

> Return a list of other labels ans statistics.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelFiltersDTO":{"type":"object","properties":{"text":{"type":"string"},"owner":{"type":"string"},"components":{"type":"string","description":"Component type","enum":["all","label","statistic"]}}},"PolicyLabelComponentsDTO":{"type":"object","properties":{"statistics":{"type":"array","items":{"$ref":"#/components/schemas/StatisticDefinitionDTO"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/PolicyLabelDTO"}}}},"StatisticDefinitionDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string"},"policyId":{"type":"string"},"policyTopicId":{"type":"string"},"policyInstanceTopicId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","DRY_RUN","PUBLISHED","ERROR","ACTIVE"]},"config":{"type":"object","nullable":true,"additionalProperties":true}},"required":["name","config"]},"PolicyLabelDTO":{"type":"object","properties":{"id":{"type":"string"},"uuid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"creator":{"type":"string"},"owner":{"type":"string"},"topicId":{"type":"string"},"messageId":{"type":"string"},"policyId":{"type":"string"},"policyTopicId":{"type":"string"},"policyInstanceTopicId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","DRY_RUN","PUBLISHED","ERROR","ACTIVE"]},"config":{"type":"object","additionalProperties":true,"nullable":true}},"required":["name","config"]},"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":{"/policy-labels/components":{"post":{"description":"Return a list of other labels ans statistics.","operationId":"PolicyLabelsApi_searchComponents","parameters":[],"requestBody":{"required":true,"description":"Filters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelFiltersDTO"}}}},"responses":{"200":{"description":"A list of labels ans statistics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelComponentsDTO"}}}},"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":"Search labels ans statistics.","tags":["policy-labels"]}}}}
```

## Return a list of all documents.

> Returns all documents.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"VcDocumentDTO":{"type":"object","properties":{"id":{"type":"string"},"policyId":{"type":"string"},"hash":{"type":"string"},"signature":{"type":"number"},"status":{"type":"string","enum":["NEW","ISSUE","REVOKE","SUSPEND","RESUME","FAILED"]},"tag":{"type":"string"},"type":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string"},"owner":{"type":"string"},"hederaStatus":{"type":"string"},"option":{"type":"object","additionalProperties":true},"topicId":{"type":"string"},"messageId":{"type":"string"},"document":{"$ref":"#/components/schemas/VcDTO"}}},"VcDTO":{"type":"object","properties":{"id":{"type":"string","nullable":true},"@context":{"type":"array","items":{"type":"string"}},"type":{"type":"array","items":{"type":"string"}},"credentialSubject":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"issuer":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":true}]},"issuanceDate":{"type":"string"},"proof":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ProofDTO"}]}},"required":["id","@context","type","credentialSubject","issuer","issuanceDate","proof"]},"ProofDTO":{"type":"object","properties":{"type":{"type":"string"},"created":{"type":"string"},"verificationMethod":{"type":"string"},"proofPurpose":{"type":"string"},"jws":{"type":"string"}},"required":["type","created","verificationMethod","proofPurpose","jws"]},"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":{"/policy-labels/{definitionId}/tokens":{"get":{"description":"Returns all documents.","operationId":"PolicyLabelsApi_getPolicyLabelTokens","parameters":[{"name":"definitionId","required":true,"in":"path","description":"policy label Identifier","schema":{"type":"string"}},{"name":"pageIndex","required":false,"in":"query","description":"The number of pages to skip before starting to collect the result set","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"The numbers of items to return","schema":{"type":"number"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VcDocumentDTO"}}}}},"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":"Return a list of all documents.","tags":["policy-labels"]}}}}
```

## Return a list of all documents.

> Returns all documents.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"VcDocumentDTO":{"type":"object","properties":{"id":{"type":"string"},"policyId":{"type":"string"},"hash":{"type":"string"},"signature":{"type":"number"},"status":{"type":"string","enum":["NEW","ISSUE","REVOKE","SUSPEND","RESUME","FAILED"]},"tag":{"type":"string"},"type":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string"},"owner":{"type":"string"},"hederaStatus":{"type":"string"},"option":{"type":"object","additionalProperties":true},"topicId":{"type":"string"},"messageId":{"type":"string"},"document":{"$ref":"#/components/schemas/VcDTO"}}},"VcDTO":{"type":"object","properties":{"id":{"type":"string","nullable":true},"@context":{"type":"array","items":{"type":"string"}},"type":{"type":"array","items":{"type":"string"}},"credentialSubject":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"issuer":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":true}]},"issuanceDate":{"type":"string"},"proof":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ProofDTO"}]}},"required":["id","@context","type","credentialSubject","issuer","issuanceDate","proof"]},"ProofDTO":{"type":"object","properties":{"type":{"type":"string"},"created":{"type":"string"},"verificationMethod":{"type":"string"},"proofPurpose":{"type":"string"},"jws":{"type":"string"}},"required":["type","created","verificationMethod","proofPurpose","jws"]},"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":{"/policy-labels/{definitionId}/tokens/{documentId}":{"get":{"description":"Returns all documents.","operationId":"PolicyLabelsApi_getPolicyLabelDocument","parameters":[{"name":"definitionId","required":true,"in":"path","description":"policy label Identifier","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","description":"Document Identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VcDocumentDTO"}}}}},"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":"Return a list of all documents.","tags":["policy-labels"]}}}}
```

## Return a list of all label documents.

> Returns all label documents.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelDocumentDTO":{"type":"object","properties":{"id":{"type":"string"},"definitionId":{"type":"string"},"policyId":{"type":"string"},"policyTopicId":{"type":"string"},"policyInstanceTopicId":{"type":"string"},"topicId":{"type":"string"},"creator":{"type":"string"},"owner":{"type":"string"},"messageId":{"type":"string"},"target":{"type":"string"},"relationships":{"type":"array","items":{"type":"string"}},"document":{"type":"object","nullable":true,"additionalProperties":true}},"required":["document"]},"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policy-labels/{definitionId}/documents":{"get":{"description":"Returns all label documents.","operationId":"PolicyLabelsApi_getLabelDocuments","parameters":[{"name":"definitionId","required":true,"in":"path","description":"policy label Identifier","schema":{"type":"string"}},{"name":"pageIndex","required":false,"in":"query","description":"The number of pages to skip before starting to collect the result set","schema":{"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"The numbers of items to return","schema":{"type":"number"}}],"responses":{"200":{"description":"Successful operation.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total items in the collection."}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyLabelDocumentDTO"}}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Return a list of all label documents.","tags":["policy-labels"]}}}}
```

## Creates a new label document.

> Creates a new label document.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelDocumentDTO":{"type":"object","properties":{"id":{"type":"string"},"definitionId":{"type":"string"},"policyId":{"type":"string"},"policyTopicId":{"type":"string"},"policyInstanceTopicId":{"type":"string"},"topicId":{"type":"string"},"creator":{"type":"string"},"owner":{"type":"string"},"messageId":{"type":"string"},"target":{"type":"string"},"relationships":{"type":"array","items":{"type":"string"}},"document":{"type":"object","nullable":true,"additionalProperties":true}},"required":["document"]},"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policy-labels/{definitionId}/documents":{"post":{"description":"Creates a new label document.","operationId":"PolicyLabelsApi_createStatisticDocument","parameters":[{"name":"definitionId","required":true,"in":"path","description":"policy label Identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelDocumentDTO"}}}},"responses":{"201":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelDocumentDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Creates a new label document.","tags":["policy-labels"]}}}}
```

## Retrieves label document.

> Retrieves label document for the specified ID.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelDocumentDTO":{"type":"object","properties":{"id":{"type":"string"},"definitionId":{"type":"string"},"policyId":{"type":"string"},"policyTopicId":{"type":"string"},"policyInstanceTopicId":{"type":"string"},"topicId":{"type":"string"},"creator":{"type":"string"},"owner":{"type":"string"},"messageId":{"type":"string"},"target":{"type":"string"},"relationships":{"type":"array","items":{"type":"string"}},"document":{"type":"object","nullable":true,"additionalProperties":true}},"required":["document"]},"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policy-labels/{definitionId}/documents/{documentId}":{"get":{"description":"Retrieves label document for the specified ID.","operationId":"PolicyLabelsApi_getLabelDocument","parameters":[{"name":"definitionId","required":true,"in":"path","description":"Label Definition Identifier","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","description":"Label Document Identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelDocumentDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Retrieves label document.","tags":["policy-labels"]}}}}
```

## Retrieves documents relationships.

> Retrieves documents relationships for the specified ID.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"policy-labels","description":"Labels for categorizing and filtering policies.","parent":"guardian-policies"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PolicyLabelDocumentRelationshipsDTO":{"type":"object","properties":{"target":{"$ref":"#/components/schemas/VpDocumentDTO"},"relationships":{"type":"array","items":{"$ref":"#/components/schemas/VcDocumentDTO"}}}},"VpDocumentDTO":{"type":"object","properties":{"id":{"type":"string"},"policyId":{"type":"string"},"hash":{"type":"string"},"signature":{"type":"number"},"status":{"type":"string","enum":["NEW","ISSUE","REVOKE","SUSPEND","RESUME","FAILED"]},"tag":{"type":"string"},"type":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string"},"owner":{"type":"string"},"document":{"$ref":"#/components/schemas/VpDTO"}},"required":["id","policyId","hash","signature","status","tag","type","createDate","updateDate","owner","document"]},"VpDTO":{"type":"object","properties":{"@context":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"type":{"type":"array","items":{"type":"string"}},"verifiableCredential":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"proof":{"$ref":"#/components/schemas/ProofDTO"}},"required":["@context","id","type","verifiableCredential","proof"]},"ProofDTO":{"type":"object","properties":{"type":{"type":"string"},"created":{"type":"string"},"verificationMethod":{"type":"string"},"proofPurpose":{"type":"string"},"jws":{"type":"string"}},"required":["type","created","verificationMethod","proofPurpose","jws"]},"VcDocumentDTO":{"type":"object","properties":{"id":{"type":"string"},"policyId":{"type":"string"},"hash":{"type":"string"},"signature":{"type":"number"},"status":{"type":"string","enum":["NEW","ISSUE","REVOKE","SUSPEND","RESUME","FAILED"]},"tag":{"type":"string"},"type":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string"},"owner":{"type":"string"},"hederaStatus":{"type":"string"},"option":{"type":"object","additionalProperties":true},"topicId":{"type":"string"},"messageId":{"type":"string"},"document":{"$ref":"#/components/schemas/VcDTO"}}},"VcDTO":{"type":"object","properties":{"id":{"type":"string","nullable":true},"@context":{"type":"array","items":{"type":"string"}},"type":{"type":"array","items":{"type":"string"}},"credentialSubject":{"additionalProperties":true,"type":"array","items":{"type":"object"}},"issuer":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":true}]},"issuanceDate":{"type":"string"},"proof":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/ProofDTO"}]}},"required":["id","@context","type","credentialSubject","issuer","issuanceDate","proof"]},"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"]},"UnprocessableEntityErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/policy-labels/{definitionId}/documents/{documentId}/relationships":{"get":{"description":"Retrieves documents relationships for the specified ID.","operationId":"PolicyLabelsApi_getStatisticAssessmentRelationships","parameters":[{"name":"definitionId","required":true,"in":"path","description":"Statistic Definition Identifier","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","description":"Label Document Identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyLabelDocumentRelationshipsDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"422":{"description":"Unprocessable entity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Retrieves documents relationships.","tags":["policy-labels"]}}}}
```


---

# 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-policies/labels.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.
