Sunbird RC
v2.0.0
v2.0.0
  • Learn
    • Introduction
    • Sunbird RC Overview
      • Why do we need Sunbird RC?
      • Core Capabilities
      • Core Registry Verbs
      • Workflows
      • What Sunbird RC is and what it's not? (WIP)
      • Possibilities
      • Demo Links
    • Technical Overview
      • Registry
        • High-Level architecture
        • Technical Specification Draft
        • Tech Stack and Requirements
      • Credentialling
        • High-Level Architecture
        • Technical Specification Draft
        • Tech Stack and Requirements
    • Adopters
    • Roadmap
  • Use
    • Getting started
      • Pre-requisites
      • Install Sunbird-RC
    • Developer's Guide
      • Functional Registry
        • Installation Guide
          • Registry CLI
            • Setup A Registry Instance
          • Manual installation through docker-compose
          • Production setup through Helm
        • Working with Source Code
        • Configurations
          • Frontend Configurations
          • Frontend - Proxy configuration
          • Audit Configuration
          • Notifications Configuration
          • View Templates Configuration
        • Schema Setup
          • Introduction To Schemas
          • Creating Your Own Schemas
          • Schema Configuration
          • Create Schemas With Custom Password
        • Setup the Backend
        • Setup the Frontend
        • Backup and Restore
          • PostgreSQL
            • SQL Dump
            • File System Level Backup
            • Continuous Archiving and Point-in-Time Recovery (PITR)
          • Cassandra
            • Snapshot-based backup method
            • Incremental backup method
            • Data Restore
        • Generic Identity And Access Management
        • Metrics
        • Custom Keycloak Build
        • Custom QR Code design
        • VC Verification Module
      • Credentialling Services
        • Installation Guide
          • Run for development
          • Docker compose based
          • Helm based
        • Configurations
        • Working with the Vault
    • Integrations
      • SSO with existing systems
      • Digilocker Meripehchaan SSO
      • Digilocker Integration
    • Connectors
      • G2P Connect
      • Open ID for Verifiable Credentials (OID4VCI)
    • Release Notes
      • Registry
      • Credentialling
    • Admin Portal
      • Login
      • Get Started
        • Create Schema
        • Attestation Workflows (WIP)
        • VC Template
          • Custom VC Template (WIP)
        • Ownership (WIP)
        • Publish (WIP)
      • Dashboard
  • API Reference
    • Registry APIs
      • Registry
        • Using The APIs
        • Create An Entity
        • Invite An Entity
        • Generate token
        • Generate admin token
        • Get An Entity
        • Get An Entity By Id
        • Update An Entity
        • Create A Property Of An Entity
        • Update A Property Of An Entity
        • Revoke a Credential
        • Delete An Entity
      • Schema
        • Create Schema
        • Get Schema
        • Update Schema
        • Delete Schema
        • Publish A Schema
      • Attestation API
        • Raise An Attestation
        • Get Attestation Certificate
      • Claims API
        • Get All Claims
        • Get Claim by ID
        • Attest A Claim
      • Discovery API
        • Search An Entity
      • File Storage API
        • Upload A File
        • Get Uploaded File
        • Delete A File/ Multiple Files
      • Metrics APIs
        • Get Count
        • Get Aggregates
    • Credentialling APIs
      • Identity Service APIs
      • Credential Schema APIs
      • Credential Issuance APIs
    • Other APIs
      • Sign API
      • Verify API
      • Swagger JSON API
      • Health API
  • Reference Solutions for Functional Registries
    • Education
      • Education Ecosystem
        • Installation
      • Education Registries
        • Installation
        • User Guide
    • Health Registries
      • Organ Registries
        • Frontend Setup
        • Backend Setup
        • User Guide
      • Health Facility Registry
    • Govt to Person (G2P)
  • Reference Solutions for Digital Credentials
    • Certificate Issuance
      • Installation(WIP)
      • User Guide
    • eLocker
      • High Level Diagram
      • Installation (WIP)
        • Frontend Setup E-locker
      • User Guide
    • Vaccination Platform
    • Skills & Work Credentials
    • Unified Learners Passport (ULP)
      • ULP Capabilities
      • Example Scenario
      • Technical Components (WIP)
      • Demo/Sandbox Links (WIP)
      • Installation Guide (WIP)
        • Frontend Setup
        • Installation through docker-compose
        • Dummy records setup for refrence
  • Links
    • Source Code
    • Releases & Changelogs
    • Website
    • Roadmap
    • Reference links
    • Design
  • Community
    • Discussion Forum
    • Contributors
    • Contributing
    • Contribution Guidebook
    • Code of Conduct
    • Community Events
    • Status By Track
  • HELP
    • Roadmap
    • FAQs
    • Glossary
    • Guide to Electronic Registries and Verifiable Credentials
      • Verifiable Credentials
        • What issues will Verifiable Credentials address?
        • What are the key roles in Verifiable Credentials?
        • What are the components of Verifiable Credentials?
        • What are the benefits of Verifiable Credentials?
        • Digital Credentials vs Verifiable Credentials
        • QR code vs Verifiable QR code
        • Use Cases
      • Electronic Registries
        • Evolution of Electronic Registries
        • What issues will Electronic Registries address?
        • Benefits of Electronic Registries
        • Registry vs Database
        • Design Principles
        • Use Cases
      • Leveraging Existing data stores
    • External Open Source Software Attributions
Powered by GitBook

Copyright (c) 2023 EkStep Foundation under MIT License

On this page
Edit on GitHub
  1. API Reference
  2. Credentialling APIs

Credential Schema APIs

PreviousIdentity Service APIsNextCredential Issuance APIs

Last updated 9 months ago

Get credential schema by id

get
Authorizations
Path parameters
idstringRequired
Responses
200
Response
application/json
400
Invalid Input
500
error
get
GET /api/v1/credential-schema/{id} HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Accept: */*
{
  "schema": {
    "type": "text",
    "id": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
    "version": "text",
    "name": "text",
    "author": "text",
    "authored": "text",
    "schema": "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"description\":\"Email\",\"type\":\"object\",\"properties\":{\"emailAddress\":{\"type\":\"string\",\"format\":\"email\"}},\"required\":[\"emailAddress\"],\"additionalProperties\":false}",
    "proof": {}
  },
  "tags": [
    "text"
  ],
  "status": "DRAFT",
  "createdAt": "text",
  "updatedAt": "text",
  "createdBy": "text",
  "updatedBy": "text"
}

Get rendering templates by schema id

get
Authorizations
Query parameters
schemaIdstringRequired
Responses
200
Response
application/json
Responseall of
400
Invalid Input
500
error
get
GET /api/v1/template HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Accept: */*
{
  "template": "text",
  "schemaId": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
  "templateId": "did:cred-template:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21dc;version=1.1",
  "createdAt": "text",
  "updatedAt": "text",
  "createdBy": "text",
  "updatedBy": "text"
}

Get rendering templates by id

get
Authorizations
Path parameters
idstringRequired
Responses
200
Response
application/json
Responseall of
400
Invalid Input
500
error
get
GET /api/v1/template/{id} HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Accept: */*
{
  "template": "text",
  "schemaId": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
  "templateId": "did:cred-template:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21dc;version=1.1",
  "createdAt": "text",
  "updatedAt": "text",
  "createdBy": "text",
  "updatedBy": "text"
}

Delete rendering templates by id

delete
Authorizations
Path parameters
idstringRequired
Responses
200
Credential Schema successfully deleted!
400
Invalid Input
500
error
delete
DELETE /api/v1/template/{id} HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Accept: */*

No content

  • GETGet credential schema by tags
  • POSTCreate credential schema
  • GETGet credential schema by id
  • PUTUpdate credential schema by id
  • GETGet rendering templates by schema id
  • POSTCreate redenring templates
  • GETGet rendering templates by id
  • PUTUpdate rendering templates by id
  • DELETEDelete rendering templates by id

Get credential schema by tags

get
Authorizations
Query parameters
tagsstringOptionalExample: tag1,tag2
Responses
201
Credential Schemas
application/json
400
Invalid Input
500
error
get
GET /api/v1/credential-schema HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Accept: */*
[
  {
    "schema": {
      "type": "text",
      "id": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
      "version": "text",
      "name": "text",
      "author": "text",
      "authored": "text",
      "schema": "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"description\":\"Email\",\"type\":\"object\",\"properties\":{\"emailAddress\":{\"type\":\"string\",\"format\":\"email\"}},\"required\":[\"emailAddress\"],\"additionalProperties\":false}",
      "proof": {}
    },
    "tags": [
      "text"
    ],
    "status": "DRAFT",
    "createdAt": "text",
    "updatedAt": "text",
    "createdBy": "text",
    "updatedBy": "text"
  }
]

Create credential schema

post
Authorizations
Body
tagsstring[]Optional
statusstring ยท enumOptionalPossible values:
Responses
201
Credential Schema successfully created!
application/json
400
Invalid Input
500
error
post
POST /api/v1/credential-schema HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Content-Type: appliation/json
Accept: */*
Content-Length: 479

{
  "schema": {
    "type": "text",
    "id": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
    "version": "text",
    "name": "text",
    "author": "text",
    "authored": "text",
    "schema": "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"description\":\"Email\",\"type\":\"object\",\"properties\":{\"emailAddress\":{\"type\":\"string\",\"format\":\"email\"}},\"required\":[\"emailAddress\"],\"additionalProperties\":false}"
  },
  "tags": [
    "text"
  ],
  "status": "DRAFT"
}
{
  "schema": {
    "type": "text",
    "id": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
    "version": "text",
    "name": "text",
    "author": "text",
    "authored": "text",
    "schema": "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"description\":\"Email\",\"type\":\"object\",\"properties\":{\"emailAddress\":{\"type\":\"string\",\"format\":\"email\"}},\"required\":[\"emailAddress\"],\"additionalProperties\":false}",
    "proof": {}
  },
  "tags": [
    "text"
  ],
  "status": "DRAFT",
  "createdAt": "text",
  "updatedAt": "text",
  "createdBy": "text",
  "updatedBy": "text"
}

Update credential schema by id

put

If the schema is updated, a new semver will be generated and the old one will be deprecated. If only metadata (like tags/status) is updated, the semver will not be generated

Authorizations
Path parameters
idstringRequired
Body
tagsstring[]Optional
statusstring ยท enumOptionalPossible values:
Responses
200
Credential Schema successfully updated!
application/json
Responseall of
400
Invalid Input
500
error
put
PUT /api/v1/credential-schema/{id} HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Content-Type: appliation/json
Accept: */*
Content-Length: 479

{
  "schema": {
    "type": "text",
    "id": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
    "version": "text",
    "name": "text",
    "author": "text",
    "authored": "text",
    "schema": "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"description\":\"Email\",\"type\":\"object\",\"properties\":{\"emailAddress\":{\"type\":\"string\",\"format\":\"email\"}},\"required\":[\"emailAddress\"],\"additionalProperties\":false}"
  },
  "tags": [
    "text"
  ],
  "status": "DRAFT"
}
{
  "schema": {
    "type": "text",
    "id": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
    "version": "text",
    "name": "text",
    "author": "text",
    "authored": "text",
    "schema": "{\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"description\":\"Email\",\"type\":\"object\",\"properties\":{\"emailAddress\":{\"type\":\"string\",\"format\":\"email\"}},\"required\":[\"emailAddress\"],\"additionalProperties\":false}",
    "proof": {}
  },
  "tags": [
    "text"
  ],
  "status": "DRAFT",
  "createdAt": "text",
  "updatedAt": "text",
  "createdBy": "text",
  "updatedBy": "text",
  "deprecatedId": "text"
}

Create redenring templates

post
Authorizations
Body
templatestringOptional

It should be valid string in handlebar format

schemaIdstringOptionalExample: did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1
Responses
201
Rendering template successfully created!
application/json
Responseall of
400
Invalid Input
500
error
post
POST /api/v1/template HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Content-Type: appliation/json
Accept: */*
Content-Length: 120

{
  "template": "text",
  "schemaId": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1"
}
{
  "template": "text",
  "schemaId": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
  "templateId": "did:cred-template:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21dc;version=1.1",
  "createdAt": "text",
  "updatedAt": "text",
  "createdBy": "text",
  "updatedBy": "text"
}

Update rendering templates by id

put

Create a new version of template

Authorizations
Path parameters
idstringRequired
Body
templatestringOptional

It should be valid string in handlebar format

schemaIdstringOptionalExample: did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1
Responses
200
Rendering template successfully updated!
application/json
Responseall of
400
Invalid Input
500
error
put
PUT /api/v1/template/{id} HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Content-Type: appliation/json
Accept: */*
Content-Length: 120

{
  "template": "text",
  "schemaId": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1"
}
{
  "template": "text",
  "schemaId": "did:cred-schema:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21db;version=1.1",
  "templateId": "did:cred-template:MDP8AsFhHzhwUvGNuYkX7T/06e126d1-fa44-4882-a243-1e326fbe21dc;version=1.1",
  "createdAt": "text",
  "updatedAt": "text",
  "createdBy": "text",
  "updatedBy": "text"
}