> 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/static-spec-test/guardian-policies/wizard.md).

# Wizard

## Creates a new policy.

> Creates a new policy by wizard. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"wizard"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"WizardConfigDTO":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string"}},"policy":{"type":"object","additionalProperties":false,"required":["name","description","topicDescription","policyTag"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"policyTag":{"type":"string"}}},"schemas":{"additionalProperties":false,"properties":{"name":{"type":"string"},"iri":{"type":"string"},"isApproveEnable":{"type":"boolean"},"isMintSchema":{"type":"boolean"},"mintOptions":{"type":"object","properties":{"tokenId":{"type":"string"},"rule":{"type":"string"}}},"dependencySchemaIri":{"type":"string"},"relationshipsSchemaIri":{"type":"string"},"initialRolesFor":{"type":"array","items":{"type":"string"}},"rolesConfig":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"isApprover":{"type":"boolean"},"isCreator":{"type":"boolean"},"gridColumns":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"title":{"type":"string"}}}}}}}},"type":"array","items":{"type":"object"}},"trustChain":{"additionalProperties":false,"properties":{"role":{"type":"string"},"mintSchemaIri":{"type":"string"},"viewOnlyOwnDocuments":{"type":"boolean"}},"type":"array","items":{"type":"object"}}},"required":["roles","schemas","trustChain"]},"WizardResultDTO":{"type":"object","properties":{"policyId":{"type":"string"},"wizardConfig":{"$ref":"#/components/schemas/WizardConfigDTO"}},"required":["policyId","wizardConfig"]},"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":{"/wizard/policy":{"post":{"description":"Creates a new policy by wizard. Only users with the Standard Registry role are allowed to make the request.","operationId":"WizardApi_setPolicy","parameters":[],"requestBody":{"required":true,"description":"Wizard configuration containing policy metadata, roles, schemas, and trust chain settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WizardConfigDTO"}}}},"responses":{"201":{"description":"Successful operation. Returns the created policy ID and the wizard configuration used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WizardResultDTO"}}}},"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 policy.","tags":["wizard"]}}}}
```

## Creates a new policy.

> Creates a new policy by wizard. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"wizard"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"WizardConfigAsyncDTO":{"type":"object","properties":{"saveState":{"type":"boolean"},"wizardConfig":{"$ref":"#/components/schemas/WizardConfigDTO"}},"required":["saveState","wizardConfig"]},"WizardConfigDTO":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string"}},"policy":{"type":"object","additionalProperties":false,"required":["name","description","topicDescription","policyTag"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"policyTag":{"type":"string"}}},"schemas":{"additionalProperties":false,"properties":{"name":{"type":"string"},"iri":{"type":"string"},"isApproveEnable":{"type":"boolean"},"isMintSchema":{"type":"boolean"},"mintOptions":{"type":"object","properties":{"tokenId":{"type":"string"},"rule":{"type":"string"}}},"dependencySchemaIri":{"type":"string"},"relationshipsSchemaIri":{"type":"string"},"initialRolesFor":{"type":"array","items":{"type":"string"}},"rolesConfig":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"isApprover":{"type":"boolean"},"isCreator":{"type":"boolean"},"gridColumns":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"title":{"type":"string"}}}}}}}},"type":"array","items":{"type":"object"}},"trustChain":{"additionalProperties":false,"properties":{"role":{"type":"string"},"mintSchemaIri":{"type":"string"},"viewOnlyOwnDocuments":{"type":"boolean"}},"type":"array","items":{"type":"object"}}},"required":["roles","schemas","trustChain"]},"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":{"/wizard/push/policy":{"post":{"description":"Creates a new policy by wizard. Only users with the Standard Registry role are allowed to make the request.","operationId":"WizardApi_setPolicyAsync","parameters":[],"requestBody":{"required":true,"description":"Wizard configuration with saveState flag. When saveState is true, the wizard state is persisted for future editing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WizardConfigAsyncDTO"}}}},"responses":{"202":{"description":"Task accepted. Use the returned taskId to poll for the result.","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 policy.","tags":["wizard"]}}}}
```

## Get policy config.

> Get policy config by wizard. Only users with the Standard Registry role are allowed to make the request.

```json
{"openapi":"3.0.0","info":{"title":"Guardian","version":"0.0.1"},"tags":[{"name":"wizard"}],"servers":[{"url":"/api/v1","description":"version 1.0"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"WizardConfigDTO":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string"}},"policy":{"type":"object","additionalProperties":false,"required":["name","description","topicDescription","policyTag"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"topicDescription":{"type":"string"},"policyTag":{"type":"string"}}},"schemas":{"additionalProperties":false,"properties":{"name":{"type":"string"},"iri":{"type":"string"},"isApproveEnable":{"type":"boolean"},"isMintSchema":{"type":"boolean"},"mintOptions":{"type":"object","properties":{"tokenId":{"type":"string"},"rule":{"type":"string"}}},"dependencySchemaIri":{"type":"string"},"relationshipsSchemaIri":{"type":"string"},"initialRolesFor":{"type":"array","items":{"type":"string"}},"rolesConfig":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"isApprover":{"type":"boolean"},"isCreator":{"type":"boolean"},"gridColumns":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"title":{"type":"string"}}}}}}}},"type":"array","items":{"type":"object"}},"trustChain":{"additionalProperties":false,"properties":{"role":{"type":"string"},"mintSchemaIri":{"type":"string"},"viewOnlyOwnDocuments":{"type":"boolean"}},"type":"array","items":{"type":"object"}}},"required":["roles","schemas","trustChain"]},"WizardPreviewDTO":{"type":"object","properties":{"policyConfig":{"$ref":"#/components/schemas/PolicyDTO"},"wizardConfig":{"$ref":"#/components/schemas/WizardConfigDTO"}},"required":["policyConfig","wizardConfig"]},"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"}},"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","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"]}}},"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":{"/wizard/{policyId}/config":{"post":{"description":"Get policy config by wizard. Only users with the Standard Registry role are allowed to make the request.","operationId":"WizardApi_setPolicyConfig","parameters":[{"name":"policyId","required":true,"in":"path","description":"Database ID of the policy to get the wizard configuration for","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Wizard configuration to apply to the existing policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WizardConfigDTO"}}}},"responses":{"200":{"description":"Successful operation. Returns the policy config preview and the wizard configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WizardPreviewDTO"}}}},"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":"Get policy config.","tags":["wizard"]}}}}
```
