DIVOC
DIVOC 3.5
DIVOC 3.5
  • Introduction to DIVOC
    • What DIVOC is and what it's not
    • DIVOC Docs Index
  • Platform
    • Release Notes
      • DIVOC 2.0 Release Features
      • DIVOC 3.0 Release Features
      • DIVOC 3.1 Release Features
      • DIVOC 3.5 Release Notes
    • Specification
      • API Documentation
      • Setting up DIVOC development environment
    • DIVOC's Verifiable Certificate Features 2.0
      • Creating a DIVOC Certificate
        • Overview of DIVOC’s digital certificates
        • What information is included in the DIVOC certificate?
        • DIVOC’s certificate generation service: How does it work?
        • Compliance with internationally used COVID-19 certificate schemas
      • Distributing a DIVOC Certificate
      • Updating a DIVOC Certificate
      • Revoking a DIVOC Certificate
      • Verifying a DIVOC Certificate
      • DIVOC's Native COVID-19 Certificate Specification
      • DIVOC’s EU-DCC Adapter Service
      • DIVOC’s SHC Adapter Service
      • Adding a User Type in DIVOC
      • Printing Certificates at a Facility
      • Normal QR Code Versus Signed/Verifiable QR Code
      • What Information Goes Into a QR Code?
      • WHO Master Vaccine Checklist
      • EU Master Vaccine Checklist
    • DIVOC's Verifiable Certificate Features 3.0
      • How to Configure a New Tenant?
      • How to Access the VC System and Generate Tokens
      • How to Generate Certificates
      • How to Fetch Certificates
      • How to Update Certificates
      • How to Revoke Certificates
      • How to Suspend Certificates
    • DIVOC's Verifiable Certificate Features 3.1
      • How to Verify Certificates
    • DIVOC's Verifiable Certificate Features 3.5
      • How to Create New Schemas
      • How to Manage Schemas?
    • DIVOC Architecture
    • Installation
      • Skills needed to set up DIVOC
      • Implementation Checklist
      • Setting Up DIVOC in k8 Cluster
        • How to Install DIVOC
        • How to Install DIVOC for V3.0
        • Backup & Restore: Postgres, Clickhouse, Kafka, & Redis
        • Infrastructure Recovery
        • Server Hardening
    • Verifiable Credential (VC): Production Deployment
    • Configuration
      • Configuring the Certification and Verification Component
        • Generating Signed Key Pairs
        • Configuring certificates
          • Step 1: Create a certification generation request
          • Step 2: Configure the QR code content
          • Step 3: Configure the certificate template
        • How to set up the verification portal for implementation
        • How to configure the update certificate API
        • Configuring Environment Variables in 2.0
      • Configuration Management Via ETCD
        • Adding a New Vaccine and ICD-11 Mapping
          • Adding a New Vaccine and ICD-11 Mapping Using ETCD CLI
        • PDF Template Change for Vaccine Certificates
          • PDF Template Change for Vaccine Certificates via ETCD CLI
        • EU Vaccine Configurations
          • Adding a New Vaccine and its Mapping via ETCD CLI
        • Payload Changes in the QR Code
          • Payload Changes in the QR Code via ETCD CLI
    • Performance Report
  • Products
    • Issuing COVID-19 Vaccination Certificates in India
    • Issuing COVID-19 Test Reports in India
    • Issuing COVID-19 Vaccination Certificates in Sri Lanka
    • Issuing COVID-19 Vaccination Certificates in the Philippines
    • Issuing COVID-19 Vaccination Certificates in Jamaica
      • Troubleshooting
    • Issuing COVID-19 Vaccination Certificates in Indonesia
    • Open Events
      • Past Events
      • DIVOC in the Media
  • DIVOC Demo
    • Program Setup (Via Orchestration Module)
    • Facility App
    • Issue and Verify Certificates
    • Citizen Portal
    • Feedback
    • Analytics
  • Community
    • Roadmap
    • Partner Support
      • Terms and Conditions of Using the DIVOC Site
      • Privacy Policy: Short Version for Display
      • Privacy Policy: Detailed
      • Platform Policy Guidelines
      • Privacy Policy Recommendations
      • Troubleshooting Guide
    • Source Code
    • Discussion Forum
    • Issues
    • Project Repo
Powered by GitBook
On this page
  • Purpose
  • Update context
  • Response Json
  • Update Template
  • Response Json
  • Update Template URL
  • Request Body
  • Response Json
  • Get Context
  • Specifications
  • Response Json
  • Get All Schema’s
  • Response Json
  • Delete Context
  • Response Json
  1. Platform
  2. DIVOC's Verifiable Certificate Features 3.5

How to Manage Schemas?

Purpose

The purpose of this document is to demonstrate how to manage a schema.

Update context

  • Request method: PUT

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

  • Sample URL: {{baseUrl}}/vc-management/v1/context/603a895d-3f0f-468c-943a-e09e5ed5cbcc

  • Request body

  • Key: Files

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

Response Json

{
    "message": {
        "id": "sunbird-rc.registry.update",
        "ver": "1.0",
        "ets": 1674746574685,
        "params": {
            "resmsgid": "",
            "msgid": "d56c646d-8705-48fe-9b89-13d64007697a",
            "err": "",
            "status": "SUCCESSFUL",
            "errmsg": ""
        },
        "responseCode": "OK"
    },
    "response": "Context is Updated successfully"
}

Update Template

  • Request method: PUT

  • RequestURL:{{baseUrl}}/vc-management/v1/schema/:schemaId/updateTemplate?templateKey=html2

  • Request body

  • Key: Files

  • Parameters: Query parameters

  • Key: Value

  • Template key: html2 path parameters

  • Key: Value

  • Schema Id:804de269-c542-4707-9817-5780d2e8c9eb

  • Value: vcTempHealthcareUpdateds_HN.html( should be in html format)

Response Json

{"message":"Successfully updated Schema",
"templateUpdateResponse":{
"id":"sunbird-rc.registry.update",
"ver":"1.0","ets":1674823685025,
"params":{
"resmsgid":"",
"msgid":"3fab58a0-84f4-4c9a-ad3e-3fe1c15f30e8",
"err":"",
"status":"SUCCESSFUL",
"errmsg":""
},
"responseCode":"OK"
}
}

Update Template URL

  • Request method: PUT

  • Request URL: {{baseUrl}}/vc-management/v1/schema/:schemaId/updateTemplateUrl

  • Request body

  • Key: Files

  • Parameters: query parameters

  • Key: Value

  • Template Key: html2 path parameters

  • Key: Value

  • Schema ID: 804de269-c542-4707-9817-5780d2e8c9eb

Request Body

{
    "html4": "minio://Tenant/f28d95e7-17ea-4f93-b457-195d133fbc27/templates/documents/443cc5d0-b2ee-4928-b77b-ccb2c72a7908-vcTempHealthcareUpdated.html"
}

Response Json

{
"message":"Successfully updated Schema with template URLs",
"templateUpdateResponse":{
"id":"sunbird-rc.registry.update",
"ver":"1.0","ets":1674824286711,
"params":{
"resmsgid":"",
"msgid":"4f0ae513-d950-48c0-a020-d31fb984916c",
"err":"",
"status":"SUCCESSFUL",
"errmsg":""
},
"responseCode":"OK"
}
}

Get Context

Specifications

  • Request method: GET

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

  • SampleUrl:{{baseUrl}}/vc-management/v1/context/1-a6bd2f3b-43d4-406e-a265-917ff6d5199f

  • Headers: Content-Type: application/json Accept application/json

  • Authorisation: Bearer <access-token>

Response Json

{
    "@context": {
        "@version": 1.1,
        "@protected": true,
        "id": "@id",
        "type": "@type",
        "schema": "https://schema.org/",
        "hp": "https://council.gov.in/credentials/healthProfessional/v1",
        "ProofOfHealthProfessionalCredential": {
            "@id": "schema:ProofOfHealthProfessionalCredential",
            "@context": {
                "@version": 1.1,
                "@protected": true,
                "nonTransferable": "vac:nonTransferable"
            }
        },
        "Person": {
            "@id": "schema:Person",
            "@context": {
                "@version": 1.1,
                "@protected": true,
                "registrationId": "schema:id",
                "name": "schema:name",
                "dob": "schema:date",
                "gender": "schema:gender"
            }
        },
        "HealthProfessional_1": {
            "@id": "hp:HealthProfessional",
            "@context": {
                "@version": 1.1,
                "@protected": true,
                "certificateId": "schema:id",
                "registrationCouncil": "schema:Text",
                "latestQualification": "schema:Text",
                "university": "schema:Text",
                "registrationDate": "schema:date",
                "systemOfMedicine": "schema:Text",
                "registrationExpiry": "schema:date",
                "degreeYear": "schema:Text"
            }
        }
    }  }

Get All Schema’s

  • Request method: GET

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

  • Authorisation needed

Response Json

{
    "schemas": [
        {
            "schema": "{\"$schema\":\"http://json-schema.org/draft-07/schema\",\"type\":\"object\",\"properties\":{\"HealthCertificate\":{\"$ref\":\"#/definitions/HealthCertificate\"}},\"required\":[\"HealthCertificate\"],\"title\":\"HealthCertificate\",\"definitions\":{\"HealthCertificate\":{\"type\":\"object\",\"title\":\"\",\"required\":[\"name\",\"adfj\",\"issuanceDate\",\"issuer\",\"certificateId\"],\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"NA\"},\"adfj\":{\"type\":\"integer\",\"description\":\"sjn\"},\"issuanceDate\":{\"type\":\"string\",\"description\":\"Date certificate issued on\"},\"issuer\":{\"type\":\"string\",\"description\":\"Name of the issuing authority\"},\"certificateId\":{\"type\":\"string\",\"description\":\"The unique Certificate ID\"},\"validFrom\":{\"type\":\"string\",\"description\":\"The date from which the credential is valid from\"},\"validTill\":{\"type\":\"string\",\"description\":\"The date until which the credential is valid to\"},\"degree\":{\"type\":\"string\",\"description\":\"NA\"}}}},\"_osConfig\":{\"uniqueIndexFields\":[\"certificateId\",\"degree\"],\"indexFields\":[\"name\",\"certificateId\"],\"ownershipAttributes\":[],\"roles\":[],\"inviteRoles\":[],\"credentialTemplate\":{\"@context\":[\"https://www.w3.org/2018/credentials/v1\",\"http://vc-management-service:7655/vc-management/v1/context/40c2078c-bc19-494a-8ce2-977804aa32c0\",\"https://www.w3.org/2018/credentials/v1\"],\"type\":[\"VerifiableCredential\",\"ProofOfHealthCertificateCredential\"],\"credentialSubject\":{\"type\":\"Person\"},\"issuer\":\"{{issuer}}\",\"issuanceDate\":\"{{issuanceDate}}\",\"evidence\":{\"type\":\"HealthCertificate\",\"name\":\"{{name}}\",\"adfj\":\"{{adfj}}\",\"issuanceDate\":\"{{issuanceDate}}\",\"issuer\":\"{{issuer}}\",\"certificateId\":\"{{certificateId}}\",\"validFrom\":\"{{validFrom}}\",\"validTill\":\"{{validTill}}\",\"degree\":\"{{degree}}\"},\"nonTransferable\":\"true\"},\"certificateTemplates\":{\"default\":\"https://gist.githubusercontent.com/saiprakash-v/c5aa3d97de95806669b4ea26ec54bd55/raw/9f38b9c6d3e458e7facb658dbb3cb661af9664fb/templateWithOnlyQR.html\",\"html\":\"minio://Tenant/f28d95e7-17ea-4f93-b457-195d133fbc27/templates/documents/1c7060c8-e69f-4c93-a486-e865929db133-template (2).html\"}}}",
            "osUpdatedAt": "2023-01-26T14:55:19.662Z",
            "osCreatedAt": "2023-01-05T11:16:41.815Z",
            "osUpdatedBy": "5a4e0234-c5fe-497d-a980-8c41664eff82",
            "name": "HealthCertificate",
            "osCreatedBy": "5a4e0234-c5fe-497d-a980-8c41664eff82",
            "osid": "1-7597a289-548a-4f27-9602-5840a1401413",
            "osOwner": [
                "5a4e0234-c5fe-497d-a980-8c41664eff82"
            ],
            "status": "DRAFT"
        },
        {
            "schema": "{\"$schema\":\"http://json-schema.org/draft-07/schema\",\"type\":\"object\",\"properties\":{\"testing\":{\"$ref\":\"#/definitions/testing\"}},\"required\":[\"testing\"],\"title\":\"testing\",\"definitions\":{\"testing\":{\"type\":\"object\",\"title\":\"testing\",\"required\":[\"issuanceDate\",\"issuer\",\"certificateId\",\"name\",\"degree\"],\"properties\":{\"issuanceDate\":{\"type\":\"string\",\"description\":\"Date certificate issued on\"},\"issuer\":{\"type\":\"string\",\"description\":\"Name of the issuing authority\"},\"certificateId\":{\"type\":\"string\",\"description\":\"The unique Certificate ID\"},\"validFrom\":{\"type\":\"string\",\"description\":\"The date from which the credential is valid from\"},\"validTill\":{\"type\":\"string\",\"description\":\"The date until which the credential is valid to\"},\"name\":{\"type\":\"string\",\"description\":\"\"},\"degree\":{\"type\":\"string\",\"description\":\"\"}}}},\"_osConfig\":{\"uniqueIndexFields\":[\"certificateId\"],\"indexFields\":[\"certificateId\"],\"ownershipAttributes\":[],\"roles\":[],\"inviteRoles\":[],\"credentialTemplate\":{\"@context\":[\"https://www.w3.org/2018/credentials/v1\",\"http://vc-management-service:7655/vc-management/v1/context/54d2dea8-a51d-4d82-9c57-9ad860d262a2\",\"https://www.w3.org/2018/credentials/v1\"],\"type\":[\"VerifiableCredential\",\"ProofOftestingCredential\"],\"credentialSubject\":{\"type\":\"Person\",\"name\":\"{{name}}\"},\"issuer\":\"{{issuer}}\",\"issuanceDate\":\"{{issuanceDate}}\",\"evidence\":{\"type\":\"testing\",\"issuanceDate\":\"{{issuanceDate}}\",\"issuer\":\"{{issuer}}\",\"certificateId\":\"{{certificateId}}\",\"validFrom\":\"{{validFrom}}\",\"validTill\":\"{{validTill}}\",\"degree\":\"{{degree}}\"},\"nonTransferable\":\"true\"},\"certificateTemplates\":{\"default\":\"https://gist.githubusercontent.com/saiprakash-v/c5aa3d97de95806669b4ea26ec54bd55/raw/9f38b9c6d3e458e7facb658dbb3cb661af9664fb/templateWithOnlyQR.html\"}}}",
            "osUpdatedAt": "2023-01-05T10:03:30.394Z",
            "osCreatedAt": "2023-01-05T10:03:12.032Z",
            "osUpdatedBy": "5a4e0234-c5fe-497d-a980-8c41664eff82",
            "name": "testing",
            "osCreatedBy": "5a4e0234-c5fe-497d-a980-8c41664eff82",
            "osid": "1-d5a650af-92e9-47d5-a92f-637e79eaf3b0",
            "osOwner": [
                "5a4e0234-c5fe-497d-a980-8c41664eff82"
            ],
            "status": "PUBLISHED"
        }
    ]
}

Delete Context

  • Request method: Delete

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

  • SampleURL:{{baseUrl}}/vc-management/v1/context/09b4e155-cf13-4082-b0ec-b4128e21e2c5

  • Authorisation needed

Response Json

{
    "message": "Deleted Context",
    "Response": {
        "id": "sunbird-rc.registry.delete",
        "ver": "1.0",
        "ets": 1674747157283,
        "params": {
            "resmsgid": "",
            "msgid": "7fff708a-26dc-4b7b-afe4-4082f5b5c207",
            "err": "",
            "status": "SUCCESSFUL",
            "errmsg": ""
        },
        "responseCode": "OK"
    }
}

PreviousHow to Create New SchemasNextDIVOC Architecture

Last updated 2 years ago

All content on this page by is licensed under a .

eGov Foundation
Creative Commons Attribution 4.0 International License
Creative Commons License