📖
Managed Guardian Service Documentation
HomeSupportContact UsAbout
  • 👋The Next Generation of Registry Systems
  • Overview
    • 🌎Quick Start - MGS
    • 🌐Quick Start - Indexer
      • 🌐Existing MGS Account Users
      • 🌐New User Without an MGS Account
    • ✨Key Features of Managed Guardian Service (MGS)
    • 🤖Custom MGS ChatGPT Assistant
  • LEARN
    • 🎬Important Concepts
      • ☺️Types of Users
      • ⛓️About the Trust Chain
      • 📂About Schemas
      • 🔃About Policies
      • 🎮About Dry Run
      • ⚖️About Retirement
      • 🔐About MGS Vault
    • 📽️Methodology Breakdown
  • 🆕WHAT'S NEW
    • Changelog
      • Beta v1
      • Beta v2
      • Beta v3
      • Beta v3.1
      • Beta v3.2
      • Beta v4
      • Beta v5
      • Beta v5.1
      • Beta v6
      • Beta v7
      • Beta v8
      • Beta v9
      • Beta v10
      • Beta v10.1
      • Beta v10.2
  • TECHNICAL INFORMATION
    • 📯Tenant Admins
      • 🗃️IPFS Storage Providers
        • ☑️Compatible IPFS Storage Providers
        • ☁️Managed IPFS Node
          • 🗃️Integrating Managed IPFS Node with MGS Tenants
        • ☁️Web3.Storage
          • 🔐How to Generate Web3.Storage Key and Proof
          • 🗃️Integrating Web3.Storage with MGS Tenants
        • ☁️filebase
          • 🔐Setting up filebase
          • 🗃️Integrating filebase with MGS Tenants
      • 🛠️Tenant Operations
        • ⚙️Tenant APIs
          • Return Tenants
          • Return user Tenants
          • Create New Tenant
          • Return Tenant Related Settings
          • Send Invite Link
          • Delete Tenant
          • Return Users for Tenant
          • Delete Tenant User
          • Reorder Tenants
      • 🖥️Creating Tenants using the UI
    • 👨‍💻Users
      • 🏫Standard Registry Users, Schemas, and Policies
        • 🛠️Schemas
          • 📂Available Schema Types
          • 📁Property Glossary
          • ℹ️System / Policy Schemas
          • 🖥️Creating a System Schema using the UI
          • 🖥️Creating a Policy Schema using the UI
          • 💻Creating Tag Schemas using UI
          • ⚙️Schema Creation Using APIs
            • Listing of Schema
            • Publishing schema based on schema ID
            • Updating Schema
            • Deleting a Schema
            • Schema Preview from IPFS
            • Schema Preview from Zip
            • Export message IDs of Schema
            • Export Files from Schema
            • Creation of Schema related to the topic
            • Returns all Schemas related to the topic
            • Importing Zip file containing Schema
            • Import schema from Zip
            • Returning Schema by SchemaID
          • ⚙️System Schemas APIs
            • Creates New System Schema
            • Returns Schema by Type
            • Returns Schema by Username
            • Updates the Schema
            • Delete System Schema
            • Publishes the Schema
            • Schema Type
          • ⚙️Schema Related APIs for Asynchronous Execution
            • Creation of Schema
            • Publishing Schema
            • Previews the Schema from IPFS
            • Importing Schema from IPFS
            • Importing Schema from .zip
          • 📁Schema Tree
            • 💻Schema Tree UI
            • ⚙️Returning Schema Tree API
          • 📁Example Data
            • 💻Adding Example data using UI
          • 📁Schema Differentiation
            • 💻Schema Differentiation using UI
            • ⚙️Schema Differentiation APIs
              • Returns Result of Schema comparison
              • Exports Schema Differentiation Results
          • 📁Tag Schema
            • ⚙️Tag Schema APIs
              • Returning all Schema Tags
              • Creating new Schema Tag
              • Deleting Schema Tag
              • Updating Schema Tag
              • Publishing Schema
              • Returning list of published schemas
          • Schema Predefined Values
          • Schema Rules
            • Defining Schema Rules using UI
            • APIs related to Schema Rules
              • Creation of the new schema rule
              • Retrieve the schema rules
              • Retrieve the configuration of the rule by its ID
              • Update the configuration of the rule with the corresponding ID
              • Delete the rule by its ID
              • Activate the rule with the specified ID
              • Deactivate the rule with the specified ID
              • List all the schemas and policy relevant to the rule with the specified ID
              • Retrieve all the data needed for evaluating the rules
              • Create a new rule from the file
              • Load the file and return its preview
              • Export the selected rule (by ID) into the file
        • 🛠️Policies
          • 🎓Policy Glossary
          • 🔄Available Policy Workflow Blocks
            • InterfaceContainerBlock
            • PolicyRolesBlock
            • InterfaceStepBlock
            • requestVCDocumentBlock
            • sendToGuardianBlock
            • reassigningBlock
            • InformationBlock
            • InterfaceDocumentsSourceBlock
            • paginationAddon
            • DocumentsSourceAddOn
            • filtersAddOnBlock
            • InterfaceActionBlock
            • externalDataBlock
            • retirementDocumentBlock
            • wipeDocumentBlock
            • calculateMathAddOnBlock
            • reportBlock & reportItemBlock
            • switchBlock
            • TimerBlock
            • aggregateDocumentBlock
            • revocationBlock
            • setRelationshipsBlock
            • Button Block
            • documentValidatorBlock
            • tokenActionBlock
            • tokenConfirmationBlock
            • mintDocumentBlock
            • groupManagerBlock
            • multiSignBlock
            • customLogicBlock
            • splitBlock
            • create Token Block
            • Impact Addon
            • Http Request Block
            • historyAddOn
            • selectiveAttributes Block
            • tagsManagerBlock
            • extractDataBlock
            • externalTopicBlock
            • messagesReportBlock
            • notificationBlock
            • Button BlockOn Addon
            • Data Transformation Addon
            • Events
          • 💻Creating Policy using UI
          • 🖥️Creating a Policy using Policy Configurator
            • Getting Started with the Policy Workflows
            • Policy Workflow Step 1
            • Policy Workflow Step 2
            • Policy Workflow Step 3
            • Policy Workflow Step 4
            • Policy Workflow Step 5
            • Policy Workflow Step 6
            • Policy Workflow Step 7
            • Policy Workflow Step 8
            • Policy Workflow Step 9
            • Policy Workflow Step 10
            • Policy Workflow Step 11
            • Policy Workflow Step 12
            • Policy Workflow Step 13
            • Policy Workflow Step 14
            • Policy Workflow Step 15
            • Policy Workflow Step 16
            • Policy Workflow Step 17
            • Policy Workflow Step 18
            • Policy Workflow Step 19
            • Policy Workflow Step 20
            • Policy Workflow Step 21
            • Policy Workflow Step 22
            • Policy Workflow Step 23
            • Policy Workflow Step 24
            • Policy Workflow Step 25
            • Policy Workflow Wrap Up
          • ⚙️Creating a Policy using APIs
            • Prerequesite Steps
            • Creation of a Policy
            • Policy Listing
            • Policy from IPFS
            • Policy Preview from IPFS
            • Retrieves Policy Configuration
            • Updates Policy Configuration
            • Publish a Policy
            • Policy Validation
            • Retrieval of Data from Root Policy Block
            • Request Block Data
            • Sends Data to Specified Block
            • Sends Data to specified Block by Tag
            • Returns Block ID by tag
            • Retrieves Block Data by Tag
            • Exporting Message ID
            • Export to zip file
            • Import from zip file
            • Returns list of Groups of a particular user
            • Make the selected Group active
            • Creating link between policies
            • Requesting Multi Policy Config
            • Imports open sourced policy
            • Allowed open sources list for import
            • Returns Open Source File URL
            • Returns OpenSourced policies list for import
          • 📂Dry Run
            • 🖥️Dry Run Mode using the UI
              • Dry Run Operations Guide
            • ⚙️Dry Run Mode using APIs
              • Running Policy without making any changes
              • Returning all Virtual Users
              • Creating Virtual Account
              • Logging Virtual User
              • Restarting the execution of Policy
              • Returns List of Transactions
              • Returns List of Artifacts
              • Returns List of IPFS Files
              • Returning Policy to Editing
              • Create Savepoint
              • Returns Savepoint State
              • Restoring SavePoint
              • Deletes SavePoint
          • 📁Record/Replay
            • 💻Policy execution record and replay using UI
            • ⚙️Record/Replay APIs
              • Get Recording
              • Start Recording
              • Stop Recording
              • Get Recorded Actions
              • Run record from zip file
              • Stop Running
              • Get Running Results
              • Fast Forward
              • Retry Step
              • Skip Step
          • 🪟External Events
            • ⚙️Send Data using the External Data APIs
              • Sends Data from External Source
          • ⚙️Trustchain APIs
            • Requesting
            • Building and returning
          • ⚙️Policy Related APIs for Asynchronous Execution
            • Creates new Policy
            • Publishing a Policy
            • Importing a Policy from IPFS
            • Importing a Policy from File
            • Policy Review
          • 🧑‍🤝‍🧑Roles and Groups
            • 💻Creating Roles and Groups using Policy Configurator UI
          • 📂Modules
            • 💻Modules using UI
            • ⚙️Modules APIs
              • Returns all Modules
              • Creating new Module
              • Returns Module Menu
              • Retrieves Module Configuration
              • Updates Module Configuration
              • Delete the module
              • Publishing Module onto IPFS
              • Returns Hedera ID for specific Module
              • Exporting Module in zip format
              • Import Module from IPFS
              • Import module from zip file
              • Preview Module from IPFS
              • Preview Module from zip file
              • Validates Module
          • 📂Tools
            • 💻Tools using UI
            • ⚙️Tools APIs
              • Creating new Tool
              • Returns list of tools
              • Creating new tool asynchronously
              • Deletes the tool
              • Retrieves Tool Configuration
              • Updates Tool Configuration
              • Publishes Tool onto IPFS
              • Publishes Tool into IPFS asynchronously
              • Validates Selected Tool
              • Returns Tools and its artifacts in zip format
              • Retrieves Hedera Message ID
              • Previews Imported Tool from IPFS
              • Imported Tool from IPFS
              • Previews Imported Tool from Zip
              • Importing Tool from Zip
              • Imports new tool from Zip Asynchronously
              • Imports new tool from IPFS Asynchronously
              • Returns List of Tools
          • 🔑Selective Disclosure
            • 📔User Guide
            • 💻Selective Disclosure Demo
          • 📂Policy Differentiation
            • 💻Global search and comparison UI
            • 💻Policy Differentiation using UI
            • ⚙️Policy Differentiation APIs
              • Comparing Policies
              • Searching Policies
              • Exports Comparison results
          • 📂Block/Policy Search
            • 💻Block Search using UI
            • ⚙️Block Search APIs
              • Searching Same Blocks
            • 💻Policy Search using UI
            • ⚙️Policy Search APIs
              • Search Policies
          • 📂Document Comparison
            • 💻Document Comparison using UI
            • ⚙️Document Comparison APIs
              • Compare Documents
              • Export of Comparison Result
          • 📂Tagging
            • 💻Tagging using UI
            • ⚙️Tagging APIs
              • Creating Tag
              • Searching Tag
              • Deleting Tag
              • Synchronization of Tags
          • 🤖Auto Suggestion
            • 💻Demo using UI
            • ⚙️Auto Suggestion APIs
              • Get next and nested suggested block types
              • Get suggestions configuration
              • Set suggestions configuration
          • 📂Themes
            • 💻Themes using UI
            • ⚙️Themes APIs
              • Returning all themes
              • Creating theme
              • Updating theme Configuration
              • Deleting theme
              • Returning zip file containing themes
              • Importing theme
          • 📂Policy Wizard
            • 💻Demo using UI
            • ⚙️Policy Wizard APIs
              • Creating new Policy
              • Getting Policy Configuration
          • 📁Discontinuing Policy
            • 💻User Guide
            • ⚙️APIs related to Discontinuing Policy
              • Discontinue Policy
              • Migrate Policy Data
              • Migrate Policy Data Asynchronously
              • Get Policy Documents
          • 📁Live Project Data Migration
            • ➡️Live Project Data Migration UI
            • ⚙️APIs related to Live Project Data Migration
              • Getting Policy Data
              • Uploading Policy Data
              • Getting Policy Tag Block Map
              • Getting Policy Virtual Keys
              • Uploading Policy Virtual Keys
          • Roles & Permissions
            • Roles and Permissions User Guide
            • APIs related to Roles & Permissions
              • Returns list of all permissions
              • Returns list of all roles
              • Creates a New Role
              • Updates Role Configuration
              • Deletes Role
              • Setting Default Role
              • Returns list of all users for whom the current user can change the role
              • Retrieves information about the user (roles, permissions assigned policies)
              • Updates User Roles (only SR)
              • Returns list of all Policies
              • Assigns Policies to a User - Only SR
              • Updates user roles (for ordinary users)
              • Assigns policies to a user (for ordinary users)
          • 📁Import/Export from Excel
            • 💻Import and Export Excel file User Guide
            • ⚙️APIs related to Import/Export Schemas from Excel
              • Import Schemas in Excel file format into local DB
              • Asynchronously Imports Schemas in Excel file format into a policy
              • Previews Schema from Excel file
              • Returns Schema in Excel file format
              • Returns list of Schemas
              • Exporting Policy to Excel
              • Import Schemas in Excel file format into a Policy
              • Policy Preview from Excel file
          • 💻Demo on Integrating external policies using UI
          • 📁Policy Labels
            • Policy Labels UI
            • APIs related to Policy Labels
              • Creating new Label definition
              • Retrieve the list of Label definitions
              • Retrieve a label definition configuration by ID
              • Update Label configuration by ID
              • Delete Label definition by ID
              • Publish Label definition by ID
              • Publish Label definition by ID asynchronously
              • Retrieve the list of components for Label configuration (schemas, policies, etc)
              • Import Label configuration from a file
              • Export Label configuration to a file
              • Preview of the imported file
              • Search for Labels and Statistics for importing into Label configuration
              • Retrieve the list of created tokens (VPs) for which a Label document can be created
              • Retrieve token (VP) and all its dependencies by document ID
              • Create a new Label document for token (VP)
              • Retrieve a list of created Label documents
              • Retrieve Label document by ID
              • Retrieve linked Label documents by ID
          • Formula Linked Definitions
            • Formula Linked Definitions using UI
            • APIs related to Formula Linked
              • Creating a new formula
              • Returns a list of formulas
              • Returns a formula by its ID
              • Update the formula by its ID
              • Delete the formula by its ID
              • Retrieve the list of all schemas and policies linked to a Formula
              • Create a new formula (import) from a file
              • Export selected formulas into a file
              • Loads (import) a file and return its preview
              • Publish a formula
              • Retrieve all data from documents that needed for displaying the formula
          • Decentralized Guardian
            • Remote Policy UI
            • ⚙️APIs
              • Returns the list of requests for adding remote policies
              • Previews the policy from IPFS without loading it into the local DB
              • Policy Import from IPFS
              • Approves policy Asynchronously
              • Rejects policy Asynchronously
              • Approves Policy
              • Rejects policy
              • Return a list of all policies requests
              • Approves a request for an action from a remote Guardian
              • Rejects a request for an action from a remote Guardian
              • Return a count of policy requests
          • 📔Artifacts
            • 💻Importing/Deleting Artifacts using UI
            • ⚙️Artifacts APIs
              • Returns all Artifacts
              • Upload Artifacts
              • Delete Artifact
          • 🔔Notifications
            • 💻User Guide
            • ⚙️APIs related to Notifications
              • Get all Notifications
              • Get new Notifications
              • Get Progresses
              • Read All Notifications
              • Delete Notifications
        • 🛠️Standard Registry Operations
          • ⚙️Task Status APIs
            • Returning Task Statuses
      • 🛠️User Operations
        • ✖️Multi Policy
          • 💻Configuring Multi Policy using UI
        • 🤖AI Search of Methodologies
          • 💻AI Search using UI
          • ⚙️AI Search APIs
            • Returns response
            • Rebuilds vector based on policy data
        • 🔎Guided Search of Methodologies
          • 💻Search using UI
          • ⚙️Search APIs
            • Retrieves list of all categories
            • List of policies that are best suited for given parameters
        • ⚙️Account APIs
          • Display User List
          • User Balance
          • User Session
          • User Login
          • Registering new account
          • Returns all Standard Registries
          • Requests Password Reset
          • Sets New Password
          • Current version terms of use
          • Accept terms of use
          • Returns all Standard Registries with Policies and VC Documents
        • ⚙️Profile APIs
          • User Account Balance
          • User Account Information
          • Setting User Credentials
          • Setting User Credentials Asynchronously
          • Setup Vault for user secrets
        • ⚙️Artifacts APIs
          • Returns all Artifacts
          • Upload Artifacts
          • Delete Artifacts
        • Bottom Up Data Traceability
          • Bottom Up Data Traceability using UI
          • APIs related to Statistics Report
            • Create new Statistics Definition
            • Get the list of Statistics Definitions
            • Retrieve details of the Statistics Definition by ID
            • Update configuration of the Statistics Definition by ID
            • Delete the Statistics Definition by ID
            • Publish Statistics Definition by ID
            • Retrieve the list of linked schemas and policy
            • Retrieve the list of all documents conforming the rules of the Statistics Definition
            • Create a new Statistics Assessment based on the Statistics Definition
            • Retrieve the list of existing Statistics Assessment
            • Retrieve the Statistics Assessment by ID
            • Retrieve all VC documents related to the Statistics Assessment
            • Importing Statistic from zip file
            • Exporting statistic report to a file
            • Previews the statistic report imported from zip file
      • 📁Bring your own DIDs
        • 💻Bring Your Own (BYO) DIDs UI
        • ⚙️BYO APIs
          • Validate DID Format
          • Validate DID Keys
      • Asynchronous Tasks Status
      • Show list of Hedera Transactions
        • Showing List of Hedera Transactions UI
        • APIs
          • Returning all transactions for Policy
          • Returning all transactions for Schema
          • Returning all transactions for Contract
          • Returning all transactions for Tokens
      • 🔐MGS Vault
        • ☑️Compatible Vaults
        • 🔑MGS Vault
          • 🎙️Introducing MGS Vault
          • ⚙️HashiCorp Vault Setup
          • ⚙️HashiCorp Vault Integration with MGS
        • 🔑Microsoft Azure Key Vault
          • 🎙️Introducing Microsoft Azure Key Vault
          • ⚙️Microsoft Azure Key Vault Setup
          • ⚙️Microsoft Azure Key Vault Integration with MGS
        • 🔑Google Cloud Platform Secret Manager
          • 🎙️Introducing Google Cloud Platform Secret Manager
            • ⚙️GCP Secret Manager Setup
            • ⚙️GCP Secret Manager Integration with MGS
    • 🕐Obsolete Guardian Artifacts
    • 📁Project Comparison
      • ⚙️Project Comparison APIs
        • Comparing Documents
        • Retrieves all categories
        • Retrieves all Properties
        • Search Projects by filters
    • Global Indexer
      • Indexer User Guide
      • APIs related to Indexer
        • Full Text Indexer Search
        • Returns Standard Registries
        • Returns Registry as per MessageID
        • Returns Registry Users
        • Returns Registry User as per MessageID
        • Returns Policies
        • Returns policy as per MessageID
        • Returns Tools
        • Returns Tool as per MessageID
        • Returns Modules
        • Returns Module as per MessageID
        • Returns Schemas
        • Returns Schema as per MessageID
        • Returns Schema Tree
        • Returns Tokens
        • Returns Token as per TokenID
        • Returns Roles
        • Returns Role as per MessageID
        • Returns DIDs
        • Returns DID as per MessageID
        • Returns DID Relationships
        • Returns VP Documents
        • Returns VP Document as per MessageID
        • Returns VP Relationships
        • Returns VC Documents
        • Returns VC Document as per MessageID
        • Returns VC Relationships
        • Returns NFTs
        • Returns NFT as per Serial No.
        • Returns Topics
        • Returns Topic as per TopicID
        • Returns Contracts
        • Returns Contract as per MessageID
        • Returns Landing Page Analytics
        • Returns Project Coordinates
        • Returns Search Policy Results
        • Attempts to refresh linked files for the selected documents
        • Returns Hedera Network
        • Returns Hedera Network Explorer Settings
        • Returns Data Loading Progress Result
        • Returns Registry Relationships
        • Returns Policy Relationships
        • Retrieve the list of formulas
        • Retrieve the formula by message ID
        • Retrieve linked documents which are related to formula
        • Returning Topic Data Priority Loading Progress
        • Adding Topic Data Priority Loading
        • Adding Policy Data for Priority Loading
        • Adding Token Data for Priority Loading
        • Adding Document to Data Priority Loading
    • ⚙️API Guideline
    • 🪙Tokens
      • 💻Creating Token using UI
      • 📁Token Template
        • 💻Creating Token Template using UI
        • 💻Creating Token through UI using Token Template
      • 🔎How to establish Token Authenticity
      • 🛠️Token Operations
        • ⚙️Token APIs
          • Token Listing
          • Creation of the token
          • User Info for selected token
          • Associates the user with token
          • Disassociates the user with token
          • Grants KYC for the user (Deprecated)
          • Grants KYC for the user
          • Revoke KYC of the user (Deprecated)
          • Revoke KYC of the user
          • Freeze tokens of a user
          • Unfreeze tokens of a user
      • 📁Token Retirement Contract
        • 💻Creating Contract using UI
        • TrustChain representation of token retirement
        • ⚙️Retirement APIs
          • Returning all contracts
          • Creating new Contract
          • Importing new Contract
          • Get Contract Permissions
          • Removing Contract
          • Returns a list of all Wipe requests
          • Enabling Wipe Requests
          • Disabling Wipe Requests
          • Approving Wipe Requests
          • Rejecting Wipe Requests
          • Clearing Wipe Requests
          • Adding Wipe Admin
          • Removing Wipe Admin
          • Adding Wipe Manager
          • Removing Wipe Manager
          • Adding Wipe Wiper
          • Removing Wipe Wiper
          • Syncing Retire Pools
          • Returning list of all Retire Requests
          • Returning list of all Retire Pools
          • Deleting Retire Requests
          • Deleting Retire Pools
          • Setting Retire Pools
          • Unsetting Retire Pool
          • Unsetting Retire Request
          • Retiring Tokens
          • Approving Retire Request
          • Cancelling Retire Request
          • Adding Retire Admin
          • Removing Retire Admin
          • Returning all Retired VCs
      • Dynamic Token Creation in Guardian Policies
    • ⛓️Trust Chain
      • 🛠️Trust Chain Operations
        • ⚙️Trust Chain APIs
          • Requesting
          • Building and Returning
    • 🔬Open-Source Guardian Architecture
      • 🔭High Level Architecture
      • 🔬Deep Dive Architecture
      • 👏Policies,Projects and Topics mapping Architecture
      • ➗MRV Splitting Logic
      • 🔑Internal (with Vault)Signing Sequence Diagram
      • 🔥FireBlocks Signing Sequence Diagram
    • 📄Full API Documentation
    • 📁Library of Policy Examples
      • 💻Creating and using Roles
      • 🔢Data input via Forms, using Roles to partition user activities
      • 🪙Token Operations
      • 📃MRV Document Operations
      • ⛓️TrustChain reports
      • ➗MRV aggregation and splitting for minting tokens
    • 🔁Process for Testnet Resets
      • Deleting Tenants and Re-inviting Users
      • Setup of a User Account
  • 🗺️Preloaded Policy Guides
    • 🌳Carbon Offsets
      • 🌲Verra Redd+ VM0007 Policy Guide
      • 👩‍🌾VM0017 Adoption of Sustainable Agricultural Land Management, v1.0
      • 👩‍🌾VM0042 Methodology for Improved Agricultural Land Management
      • 🌲VM0047 Afforestation, Reforestation, and Revegetation
      • 🌲Gold Standard Afforestation and Reforestation (AR) v2.0
      • 👷Carbon Reduction Measurement - GHG Corporate Standard Policy Guide
      • 👩‍🌾Dovu Methodologies (Agre Calc & Cool Farm)
      • 🚗Sustainable End-of-Life Vehicle Scrapping Program: Government Backed Voluntary Program
      • ♨️Improved Cookstove
      • ♨️GoldStandard - Metered Energy Cooking
      • 🏭CDM AMS-II.G.: Energy Efficiency Measures in Thermal Applications of Non-Renewable Biomass
      • 🏭CDM AMS-III.AR: Substituting fossil fuel based lighting with LED/CFL lighting systems
      • 🏭CDM AMS-III.D.: Methane Recovery in Animal Manure Management Systems
      • 🏭CDM AMS III.BB: Electrification of communities through grid extension
      • 🏭CDM AR-ACM0003: Methodology for Afforestation and Reforestation of Lands Except Wetlands
      • 🏭CDM ACM0001: Flaring or Use of Landfill Gas
      • 🏨CDM ACM0002: Grid-Connected Electricity Generation from Renewable Sources
      • 🏭CDM ACM0006: Electricity and Heat Generation from Biomass
      • 🏭CDM ACM0007: Conversion from Single Cycle to Combined Cycle Power Generation
      • 🏭CDM ACM0018: Electricity Generation from Biomass in Power-Only Plants
      • 🏨CDM AMS-I.A.: Electricity Generation by the User
      • 🏨CDM AMS-I.C.: Thermal Energy Production with or Without Electricity
      • 🏨CDM AMS-I.F.: Renewable Electricity Generation for Captive Use and Mini-Grid
      • 🏛️CDM AMS-II.J.: Demand-Side Activities for Efficient Lighting Technologies
      • 🏭CDM AMS-III.AV.: Low Greenhouse Gas Emitting Safe Drinking Water Production Systems
      • 🏭CDM AMS-III.F.: Avoidance of Methane Emissions Through Composting
      • 🏦CDM AMS-III.H.: Methane Recovery in Wastewater Treatment
      • 🏭PWRM0001 Plastic Waste Collection Methodology
      • 🥇Carbon Sequestration through Accelerated Carbonation of Concrete Aggregate
      • 🏭VM0044 Methodology for Biochar Utilization in Soil and Non-Soil Applications
      • 🏭VM0041 Methodology for the Reduction of Enteric Methane Emissions from Ruminants
      • 🏭AMS-I.D: Grid Connected Renewable Electricity Generation – v.18.0
      • 🏭PWRM0002 Plastic Waste Recycling Methodology
      • 🍚Methane Emission Reduction by Adjusted Water Management Practice in Rice Cultivation
      • ⛽Verra VMR0006: Energy Efficiency and Fuel Switch Measures in Thermal Applications
      • AMS-I.E Switch from Non-Renewable Biomass for Thermal Applications by the User
      • GCCM001 v.4 Methodology for Renewable Energy Generation Projects Supplying Electricity to Grid
      • Climate Action Reserve’s U.S. Landfill Protocol Version 6.0
      • Landfill Gas Destruction and Beneficial Use Projects, Version 2.0
      • VM0042 Improved Agricultural Land Management, v2.1
    • 🔋Renewable Energy Credits
      • 📡International Renewable Energy Credit Standard Policy guide
    • 🏭Carbon Emissions
      • 🏠Remote Work GHG Policy Policy Guide
      • 🏢Carbon Emissions Measurement - GHG Corporate Standard Policy Guide
      • 🏙️atma GHG Scope II Carbon Emission Policy
      • 🏢Atma Scope 3 GHG Policy
      • 🏢GHGP Corporate Standard
      • 🏭GHGP Corporate Standard V2
Powered by GitBook
On this page
Export as PDF
  1. TECHNICAL INFORMATION
  2. Users
  3. Standard Registry Users, Schemas, and Policies
  4. Policies
  5. Creating a Policy using Policy Configurator

Policy Workflow Wrap Up

PreviousPolicy Workflow Step 25NextCreating a Policy using APIs

Last updated 2 years ago

We can then look at the entire process.

We can also look at the code that has been created programmatically from the defined workflow by clicking on the “<>” button in the three-button chevron on the right-hand side.

The full coded version of the policy we just demoed is below (Reminder the coded version of this policy is for Guardian version 1.0.2):

//Policy logic starts with block 1.
{
  //blockType - the type of the block:
  //  "InterfaceContainerBlock" - a block which contains and organizes other blocks.
  //  First block should always be of the "InterfaceContainerBlock" type.
  "blockType": "InterfaceContainerBlock",
  //defaultActive shows whether this block is active at this time and whether it needs to be shown.
  "defaultActive": true,
  //permissions - users with these roles are allowed to interact with the block. Can contain the following values:
  //  "OWNER" = creator of the Policy.
  //  "NO_ROLE" = users without a role.
  //  "ANY_ROLE" = users with any role.
  //  "INSTALLER" = only users with a particular role (in this case - INSTALLER).
  "permissions": [
    // As per above, this block is accessible to all users (with any role).
    "ANY_ROLE"
  ],
  //uiMetaData - additional options which don't affect the behavior of the block but are needed for rendering.
  "uiMetaData": {
    //type - block UI behavior, can contain the following values:
    //  "blank" - does not contain any frame, will render all child elements one after the other.
    //  "tabs" - a container which has a tab for each of the child element. It will render the first child element as type "blank".
    "type": "blank"
  },
  //children - list of child blocks in a container block.
  "children": [
    //First policy step - select a role.
    {
      //"PolicyRolesBlock" - block which determines a role for the user.
      "blockType": "PolicyRolesBlock",
      //"tag" - a unique (for the Policy) textual tag for the block which can be used in other blocks for linking.
      "tag": "choose_role",
      //Non ContainerBlock do not contain child elements. They can exist but they are ignored for rendering.
      "children": [],
      "uiMetaData": {
        //html component has title and descriptions, which can be specified in the corresponding elements.
        "title": "registration",
        "description": "choose a role"
      },
      "permissions": [
        //Only users with no roles assigned can access the block.
        "NO_ROLE"
      ],
      //This block is active
      "defaultActive": true,
      //"roles" - available roles from which the user can choose.
      "roles": [
        //In this case the user can only be the INSTALLER.
        "INSTALLER"
      ]
    },
    // After the role is selected the corresponding branch in the policy will become accessible for the user.
    {
      //"InterfaceStepBlock" - similar to the InterfaceContainerBlock, with the difference that it can only render a single child element.
      //Rendered component is determined by the current step.
      //An event on a component automatically passes control to the next component.
      "blockType": "InterfaceStepBlock",
      "defaultActive": true,
      "tag": "init_installer_steps",
      "permissions": [
        //This block is only accessible to users with the INSTALLER role.
        "INSTALLER"
      ],
      "uiMetaData": {
        //Currently there is only one type - "blank".
        //Only 1 active block is rendered.
        "type": "blank"
      },
      "children": [
        //First step after the selection of the INSTALLER roles is to fill out the VC form.
        {
          //"requestVcDocumenBlock" - a type of the block which creates a form from the schema, and sends the document to the server.
          "blockType": "requestVcDocumentBlock",
          "tag": "add_new_installer_request",
          "defaultActive": true,
          "permissions": [
            "INSTALLER"
          ],
          //"schema" - uuid of the schema, which will be used to build the form.
          "schema": "1a5347ba-5e5f-49a7-8734-3dcc953a03ed",
          //"idType" - when the documents is saved it would automatically get an ID.
          // In this example the document ID would be the DID of the current user.
          // Can be one of these values:
          //   "UUID" - new uuid.
          //   "DID" - new DID.
          //   "OWNER" - DID of the current user.
          "idType": "OWNER",
          "uiMetaData": {
            //"type" - style of the render of the form, one of these values:
            //  "page" - the form is rendered as a page.
            //  "dialog" - displays a button, which opens a dialogue with the form when clicked.
            "type": "page",
            // The page contains title and description, as well as the form.
            "title": "New Installer",
            "description": "Description"
          }
        },
        // Next step is to save it in the DB.
        {
          //"sendToGuardianBlock" - a type of the block which can save a new or updated document.
          //This block does not contain defaultActive and does not render, only relevant on the server side.
          "blockType": "sendToGuardianBlock",
          "tag": "save_new_approve_document",
          //"dataType" - where to save the document, possible values:
          //  "approve" - approve DB table.
          //  "vc-documents" - vc-documents DB table.
          //  "did-documents" - did-documents DB table.
          //  "hedera" - document would be sent to the corresponding Policy topic in Hedera.
          // In this example VC would be stored in a approve table, waiting for approval.
          "dataType": "approve",
          //"entityType" - mark the document in the DB. Needed for filtering.
          "entityType": "Installer",
          //"stopPropagation" - end processing here, don't pass control to the next block.
          "stopPropagation": false,
          "uiMetaData": {}
        },
        // Notify the user after submitting the request for approval.
        {
          //"InformationBlock" - block type which can display a notification or a progress bar.
          "blockType": "InformationBlock",
          "tag": "wait_fo_approve",
          "children": [],
          "uiMetaData": {
            //"type" - notification type, possible values:
            //  "text" - textual message.
            //  "loader" - progress bar.
            "type": "text",
            // Set title and description for the page, only if the "type" is "text".
            "title": "Waiting for approval",
            "description": "Waiting for approval"
          },
          "permissions": [
            "INSTALLER"
          ],
          // Do not pass control to the next block after displaying the message as need to wait for Standard Registry approval.
          "stopPropagation": true,
          "defaultActive": true
        },
        // After the approval continue creating the document.
        // Update document status in the DB.
        {
          "tag": "update_approve_document_status",
          "blockType": "sendToGuardianBlock",
          "dataType": "approve",
          "entityType": "Installer",
          "uiMetaData": {}
        },
        // Now send the document to Hedera Topic.
        {
          "tag": "send_installer_vc_to_hedera",
          "blockType": "sendToGuardianBlock",
          "dataType": "hedera",
          "entityType": "Installer",
          "uiMetaData": {}
        },
        // Finally save the VC document in the vc-documents DB table.
        {
          "tag": "Submission_of_CSD01_Documentation",
          "blockType": "sendToGuardianBlock",
          "dataType": "vc-documents",
          "entityType": "Installer",
          "uiMetaData": {}
        },
        // After the document has been created; the user can access the document with grids.
        // Create an InterfaceContainerBlock to group all pages accessible after registration is completed.
        {
          "blockType": "InterfaceContainerBlock",
          "tag": "installer_header",
          "defaultActive": true,
          "permissions": [
            "INSTALLER"
          ],
          "uiMetaData": {
            // In this example, INSTALLER would be able to access two tabs.
            "type": "tabs"
          },
          "children": [
            // Create an InterfaceContainerBlock to group all components on the sensor page.
            {
              "blockType": "InterfaceContainerBlock",
              "tag": "sensors_page",
              "defaultActive": true,
              "permissions": [
                "INSTALLER"
              ],
              "uiMetaData": {
                "type": "blank",
                // "title" - name of the tab. If the parent is interfaceContainerBlock the value from title is used for tab name.
                // If the "title" is empty the block name is used as the tab name.
                "title": "Sensors"
              },
              // Sensor page. Contains a grid and a "create new sensor" button.
              "children": [
                {
                  //"InterfaceDocumentsSourceBlock" - block type which outputs information from the DB as grid.
                  "blockType": "InterfaceDocumentsSourceBlock",
                  "tag": "sensors_grid",
                  "defaultActive": true,
                  "permissions": [
                    "INSTALLER"
                  ],
                  
                  // When true, this filter out the documents not created by the current user when rendering.
                  "onlyOwnDocuments": true,
                  //"dataType" - Specificy the table to request the data from. Possible values:
                  //  "vc-documents".
                  //  "did-documents".
                  //  "vp-documents".
                  //  "approve".
                  //  "standard-registries" - list of users with the Standard Registry role.
                  "dataType": "vc-documents",
                  // Custom filters, based on any existing fields.
                  "filters": {
                    // Filter on the basis of schema ID.
                    "schema": "9d31b4ee-2280-43ee-81e7-b225ee208802",
                    // Filter on the basis of the "entityType" field in the "sendToGuardianBlock" block.
                    "type": "Inverter"
                  },
                  "uiMetaData": {
                    //"fields" - list of grid columns
                    "fields": [
                      {
                        // Object fields to retrieve the values from. Internal fields are separated by ".", access to array elements is via index.
                        // For example "document.credentialSubject.0.id" - is document.credentialSubject[0].id
                        "name": "document.id",
                        // Title of the column.
                        "title": "ID",
                        // Type of the displayed value, possible options:
                        //  "text" - ordinary text.
                        //  "button" - a button.
                        //  "block" - a block embedded into the column.
                        "type": "test",
                        // Floating hint/tooltip for the column.
                        "tooltip": ""
                      },
                      {
                        "name": "document.credentialSubject.0.id",
                        "title": "DID",
                        "type": "text"
                      },
                      {
                        "name": "document",
                        "title": "Document",
                        "tooltip": "",
                        "type": "button",
                        // The "button" type can contain the following parameters:
                        //"action" - action type, e.g. open a dialog˚.
                        "action": "dialog",
                        //"content" - text inside the column.
                        "content": "View Document",
                        //"uiClass" - button style.
                        "uiClass": "link",
                        //"dialogContent" - dialog title.
                        "dialogContent": "VC",
                        //"dialogClass" - dialog style.
                        "dialogClass": "",
                        //"dialogType" - currently only json type is supported.
                        "dialogType": "json"
                        // additionally specifying a "bindBlock" field would result in the display of the linked block in side the dialog.
                      },
                      {
                        "name": "document.id",
                        "title": "Config",
                        "tooltip": "",
                        // "block" - render the block inside the grid column.
                        "type": "block",
                        "uiClass": "",
                        //"bindBlock" - block to embed into the grid.
                        "bindBlock": "download_config_btn"
                      }
                    ]
                  }
                },
                // Block to download the config file.
                {
                  //"InterfaceActionBlock" -  block to create custom actions.
                  "blockType": "InterfaceActionBlock",
                  // The block in embedded into the grid, not rendered independently
                  "defaultActive": false,
                  "tag": "download_config_btn",
                  "permissions": [
                    "INSTALLER"
                  ],
                  //"type" - block type, example values:
                  //  "download" - download files.
                  //  "selector" - select an action.
                  "type": "download",
                  //schema and the targetUrl - specific configuration parameters, Only needed in the reference implementation of the Guardian because of the IoT Simulator that is generating MRV data.
                  "schema": "c4623dbd-2453-4c12-941f-032792a00727",
                  "targetUrl": "http://message-broker:3003/mrv",
                  "uiMetaData": {
                    //"content" - text inside the column
                    "content": "download"
                  }
                },
                // Button to create new sensor, displayed after the grid.
                // Component is embedded into the InterfaceStepBlock to join all steps.
                {
                  "defaultActive": true,
                  "tag": "create_new_sensor_steps",
                  "permissions": [
                    "INSTALLER"
                  ],
                  "blockType": "InterfaceStepBlock",
                  "uiMetaData": {
                    "type": "blank"
                  },
                  "children": [
                    // Button to create new sensor.
                    {
                      "tag": "add_sensor_bnt",
                      "defaultActive": true,
                      "permissions": [
                        "INSTALLER"
                      ],
                      "blockType": "requestVCDocumentBlock",
                      "schema": "9d31b4ee-2280-43ee-81e7-b225ee208802",
                      // Generate new DID for the new sensor.
                      "idType": "DID",
                      "uiMetaData": {
                        // Open the a dialog containing the new sensor.
                        "type": "dialog",
                        // Text on the button.
                        "content": "New Sensors",
                        //Button style.
                        "uiClass": "btn",
                        //Dialog title.
                        "dialogContent": "New Sensors",
                        //Description.
                        "description": "Description",
                        //Dialog style.
                        "dialogClass": ""
                      }
                    },
                    // Save the created sensor VC in the corresponding Heder Topic.
                    {
                      "tag": "send_sensor_vc_to_hedera",
                      "blockType": "sendToGuardianBlock",
                      "dataType": "hedera",
                      "entityType": "Inverter",
                      "uiMetaData": {}
                    },
                    // Also save it in the DB.
                    {
                      "tag": "CSD02_device_registration",
                      "blockType": "sendToGuardianBlock",
                      "dataType": "vc-documents",
                      // Document in the DB is labeled as "Inverter" to enable later filtering in the grid.
                      "entityType": "Inverter",
                      "stopPropagation": false,
                      "uiMetaData": {}
                    }
                  ],
                  //"cyclic" - go back one step to enable the creation of another sensor.
                  "cyclic": true
                }
              ]
            },
            // Create InterfaceContainerBlock to group all components on the page with MRV data.
            {
              "blockType": "InterfaceContainerBlock",
              "tag": "mrv_page",
              "defaultActive": true,
              "permissions": [
                "INSTALLER"
              ],  
              "uiMetaData": {
                "type": "blank",
                "title": "MRV"
              },
              "children": [
                // MRV grid.
                {
                  "tag": "mrv_grid",
                  "defaultActive": true,
                  "permissions": [
                    "INSTALLER"
                  ],
                  "blockType": "InterfaceDocumentsSourceBlock",
                  "dependencies": [
                    "SendToGuardianBlock"
                  ],
                  "onlyOwnDocuments": true,
                  "dataType": "vc-documents",
                  "filters": {
                    "schema": "c4623dbd-2453-4c12-941f-032792a00727",
                    "type": "MRV"
                  },
                  "uiMetaData": {
                    "fields": [
                      {
                        "name": "document.id",
                        "title": "ID",
                        "type": "button"
                      },
                      {
                        "name": "document.issuer",
                        "title": "Sensor DID",
                        "type": "text"
                      },
                      {
                        "name": "document",
                        "title": "Document",
                        "tooltip": "",
                        "type": "button",
                        "action": "dialog",
                        "content": "View Document",
                        "uiClass": "link",
                        "dialogContent": "VC",
                        "dialogClass": "",
                        "dialogType": "json"
                      }
                    ]
                  }
                }
              ]
            }
          ]
        },
        // Block to display rejection info (i.e. the INSTALLER was not approved by Standard Registry).
        {
          "tag": "installer_rejected",
          "blockType": "InformationBlock",
          "children": [],
          "uiMetaData": {
            "type": "text",
            "description": "Your application was rejected",
            "title": "Rejected"
          },
          "stopPropagation": true,
          "permissions": [
            "INSTALLER"
          ],
          "defaultActive": true
        }
      ]
    },
    // This Policy branch is used by users with the Standard Registry roles.
    //Starting with the ContainerBlock.
    {
      "tag": "standard_registry_header",
      "defaultActive": true,
      "permissions": [
        "OWNER"
      ],
      "blockType": "InterfaceContainerBlock",
      "uiMetaData": {
        "type": "tabs"
      },
      "children": [
        // Page containing the list of installers which sent documents for approval.
        {
          "tag": "approve_page",
          "defaultActive": true,
          "permissions": [
            "OWNER"
          ],
          "blockType": "InterfaceContainerBlock",
          "uiMetaData": {
            "type": "blank",
            "title": "Approve Documents"
          },
          "children": [
            // Grid listing VCs of the Installers, which require approval from the Standard Registry.
            {
              "tag": "approve_documents_grid",
              "defaultActive": true,
              "permissions": [
                "OWNER"
              ],
              "blockType": "InterfaceDocumentsSourceBlock",
              // Displays all VC documents from all Installers.
              "onlyOwnDocuments": false,
              "dataType": "approve",
              "dependencies": [
                // Refreshed when a VC is stored in the DB
                "save_new_approve_document"
              ],
              "uiMetaData": {
                "fields": [
                  {
                    "name": "document.issuer",
                    "title": "Owner",
                    "type": "text",
                    "tooltip": "Installer did"
                  },
                  {
                    "name": "createDate",
                    "title": "Create Date",
                    "type": "text"
                  },
                  {
                    "name": "document",
                    "title": "Document",
                    "tooltip": "",
                    "type": "button",
                    "action": "dialog",
                    "content": "View Document",
                    "uiClass": "link",
                    "dialogContent": "VC",
                    "dialogClass": "",
                    "dialogType": "json"
                  },
                  {
                    "name": "status",
                    "title": "Status",
                    "type": "text"
                  },
                  // Column with the Approve/Reject buttons
                  {
                    "name": "status",
                    "title": "Operation",
                    "tooltip": "",
                    "type": "block",
                    "action": "block",
                    "content": "",
                    "uiClass": "",
                    "bindBlock": "approve_documents_btn"
                  }
                ]
              },
              "children": [],
              "filters": {}
            },
            // Block with the Approve/Reject buttons, embedded into the grid
            {
              "tag": "approve_documents_btn",
              "blockType": "InterfaceActionBlock",
              "permissions": [
                "OWNER"
              ],
              "type": "selector",
              // For the selector type:
              "uiMetaData": {
                //"field" - field which is linked to the selector.
                "field": "status",
                //"options" - list of the possible options.
                "options": [
                  //Button:
                  {
                    //Button text.
                    "name": "Approve",
                    //Value which will be stored in the "field".
                    //In this example document.status = "APPROVED"
                    "value": "APPROVED",
                    //Button style.
                    "uiClass": "btn-approve",
                    //Specify which block to pass control to.
                    //If the "Approve" button was clicked, the control would be passed to the update_approve_document_status block.
                    "bindBlock": "update_approve_document_status"
                  },
                  {
                    "name": "Reject",
                    "value": "REJECTED",
                    "uiClass": "btn-reject",
                    //If the "Reject" button was clicked pass control to the installer_rejected block.
                    "bindBlock": "installer_rejected"
                  }
                ]
              }
            }
          ]
        }
      ]
    },
    // Policy branch for minting tokens.
    {
      "tag": "mint_events",
      "permissions": [
        "OWNER",
        "INSTALLER"
      ],
      "blockType": "InterfaceContainerBlock",
      "uiMetaData": {
        "type": "blank"
      },
      "children": [
        // Receive the MRV.
        {
          //"externalDataBlock" - receives data from the external source and passes them over the the next block.
          // Each Policy has a policyTag. Data received onto the external API are filtered by the policyTag, and passed on to all externalDataBlock inside the Policy.
          "blockType": "externalDataBlock",
          "tag": "mrv_source",
          "entityType": "MRV",
          // Filter the documents by schema ID. If the document is not related to the given schema it does not get passed further.
          "schema": "c4623dbd-2453-4c12-941f-032792a00727",
          "uiMetaData": {}
        },
        // Store the new MRV.
        {
          "tag": "CSD04_requesting_i_Rec_issuance",
          "blockType": "sendToGuardianBlock",
          "dataType": "vc-documents",
          "entityType": "MRV",
          "uiMetaData": {}
        },
        //Minting
        {
          //"mintDocument" - receives the VC from the previous block and mints based on the rule[s].
          "blockType": "mintDocumentBlock",
          "tag": "mint_token",
          //"tokenId" - ID of the token
          // User should be previously linked with token.
          "tokenId": "0.0.26063342",
          // Rules under which the number of tokens is calculated. Math operations are supported, e.g. the following:
          //  data = { amount: 2 }
          //  rule = "amount * 10"
          // will result in 20 tokens.
          "rule": "1",
          "uiMetaData": {}
        }
      ]
    }
  ]
}
👨‍💻
🏫
🛠️
🖥️