For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to Create New Schemas

Purpose

The purpose of this document is to demonstrate how to create new schemas.

Steps

  • For creating a new schema, the user needs to click on the “Manage Schema” button on the home page.

  • Next, click on “Create Schema” in the next page

  • If the user already has a schema in JSON format, he/she can click on “Upload JSON” (refer to section on "Steps to Create Schema Using JSON" for more details).

  • If the user wants to create a new schema manually click on ‘Add Manually’ (refer to the section on “Create Schema Manually” for more details).

Steps to Create Schema Using JSON

Step 1: Create the context using API call

  • Request method: POST

  • Request URL:{{baseUrl}}/vc-management/v1/context/

  • Request body

  • Key: Files

  • Value: ContextFile.json(should be in json format)

Content for the ContextFile.json

Response Json

  • The Id used here, that is, HealthProfessional_1, should be common in both context file creation, and its multiple occurrences in schema file.

Step 2: Upload Templates

  • Request method: POST

  • Request URL:{{baseUrl}}/vc-management/v1/templates/Tenant

  • Request body

  • Key: Files

  • Value: TempHealthcareUpdated.html (It is the name of html file template)

Refer Annexure A for Sample html File (TempHealthcareUpdated.html)

Response Json

Step 3: Create and Upload Schema.json file

  • Create this file and save it in the local directory and upload in the application.

  • The ID used here, that is, HealthProfessional_1 will be used in context file creation.

  • The value of URL from the response of Step 1 will be used in below mentioned schema Json.

  • The value of document location from the response of Step 2 will be used in below mentioned SchemaJson.

SchemaJson Sample File

Steps to Create Schema Manually

The user can opt to create schema manually. The steps are as follows:

  • When a user clicks on “Create New Schema”, the page shown below will open, where the user has to fill the schema name in the “Name of the Schema” box.

  • If required, the user may fill in the description of the schema as well

  • Before moving to the next page, the user must click on ‘Save’ after entering all the information.

  • The user must drag and drop the desired field types to start creating a schema attribute.

  • The user can save an attribute after adding it in the schema by clicking on the ‘Save’ button.

  • After addition, all the attributes that are already present till that point, including the inbuilt attributes of schema, can be viewed.

  • The schema attributes that were added manually can be edited.

  • The user can add more fields in the schema by clicking on “Add Field”.

  • Once all the attributes are added, the schema can be saved as a draft by clicking on “Save as Draft”.

  • The schema draft is created with a default template which holds a QR code only.

  • More templates can be uploaded and managed using the “Upload Templates” & “Manage Templates” modal on the tenant-portal.

Creative Commons LicenseAll content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

Last updated