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

Identity Service APIs

PreviousCredentialling APIsNextCredential Schema APIs

Last updated 1 year ago

Resolve a DID ID

get
Authorizations
Path parameters
idstringRequired

The DID ID to resolve

Responses
200
DID resolved
application/json
400
Bad Request
404
DID not found
get
GET /api/v1/did/resolve/{id} HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Accept: */*
{
  "id": "did:rcw:71364c7e-0abe-49cf-9269-4661699f274b",
  "alsoKnownAs": [
    "ramesh@gmail.com"
  ],
  "service": [
    "{ \"id\": \"IdentityHub\", \"type\": \"IdentityHub\", \"serviceEndpoint\": { \"@context\": \"schema.identity.foundation/hub\", \"@type\": \"UserServiceEndpoint\", \"instance\": [ \"did:test:hub.id\" ] } }"
  ],
  "verificationMethod": {
    "id": "auth-key",
    "type": "RS256",
    "publicKeyJwk": {},
    "controller": "did:rcw:71364c7e-0abe-49cf-9269-4661699f274b"
  },
  "authentication": "auth-key"
}
  • GET/health
  • POSTGenerate a new DID
  • GETResolve a DID ID
  • POSTSign an unsigned VC
  • POSTVerify a signed VC
get
Authorizations
Responses
200
The Health Check is successful
application/json
503
The Health Check is not successful
application/json
get
GET /api/v1/health HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Accept: */*
{
  "status": "ok",
  "info": {
    "database": {
      "status": "up"
    }
  },
  "error": {},
  "details": {
    "database": {
      "status": "up"
    }
  }
}

Generate a new DID

post
Authorizations
Body
alsoKnownAsstring[]Required

AlsoKnownAs property is a unique combination aadhaar and username.

Example: ramesh@gmail.com
methodstringRequired

The method of DID.

Responses
200
DID Generated
application/json
400
Bad request
post
POST /api/v1/did/generate HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 274

[
  {
    "alsoKnownAs": [
      "ramesh@gmail.com"
    ],
    "services": [
      "{ \"id\": \"IdentityHub\", \"type\": \"IdentityHub\", \"serviceEndpoint\": { \"@context\": \"schema.identity.foundation/hub\", \"@type\": \"UserServiceEndpoint\", \"instance\": [ \"did:test:hub.id\" ] } }"
    ],
    "method": "text"
  }
]
[
  {
    "id": "did:rcw:71364c7e-0abe-49cf-9269-4661699f274b",
    "alsoKnownAs": [
      "ramesh@gmail.com"
    ],
    "service": [
      "{ \"id\": \"IdentityHub\", \"type\": \"IdentityHub\", \"serviceEndpoint\": { \"@context\": \"schema.identity.foundation/hub\", \"@type\": \"UserServiceEndpoint\", \"instance\": [ \"did:test:hub.id\" ] } }"
    ],
    "verificationMethod": {
      "id": "auth-key",
      "type": "RS256",
      "publicKeyJwk": {},
      "controller": "did:rcw:71364c7e-0abe-49cf-9269-4661699f274b"
    },
    "authentication": "auth-key"
  }
]

Sign an unsigned VC

post
Authorizations
Body
DIDstringRequired

The unique DID id of the issuer.

payloadstringRequired

JSON string of the unsigned VC.

Example: { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1" ], "id": "did:ulp:b4a191af-d86e-453c-9d0e-dd4771067235", "type": [ "VerifiableCredential", "UniversityDegreeCredential" ], "issuer": "did:rcw:6b9d7b31-bc7f-454a-be30-b6c7447b1cff", "expirationDate": "2023-02-08T11:56:27.259Z", "credentialSubject": { "id": "did:rcw:6b9d7b31-bc7f-454a-be30-b6c7447b1cff", "grade": "9.23", "programme": "B.Tech", "certifyingInstitute": "IIIT Sonepat", "evaluatingInstitute": "NIT Kurukshetra" }, "options": { "created": "2020-04-02T18:48:36Z", "credentialStatus": { "type": "RevocationList2020Status" } } }
Responses
200
VC Signed
application/json
400
Bad Request
500
Internal Server Error
post
POST /api/v1/utils/sign HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 730

{
  "DID": "text",
  "payload": "{ \"@context\": [ \"https://www.w3.org/2018/credentials/v1\", \"https://www.w3.org/2018/credentials/examples/v1\" ], \"id\": \"did:ulp:b4a191af-d86e-453c-9d0e-dd4771067235\", \"type\": [ \"VerifiableCredential\", \"UniversityDegreeCredential\" ], \"issuer\": \"did:rcw:6b9d7b31-bc7f-454a-be30-b6c7447b1cff\", \"expirationDate\": \"2023-02-08T11:56:27.259Z\", \"credentialSubject\": { \"id\": \"did:rcw:6b9d7b31-bc7f-454a-be30-b6c7447b1cff\", \"grade\": \"9.23\", \"programme\": \"B.Tech\", \"certifyingInstitute\": \"IIIT Sonepat\", \"evaluatingInstitute\": \"NIT Kurukshetra\" }, \"options\": { \"created\": \"2020-04-02T18:48:36Z\", \"credentialStatus\": { \"type\": \"RevocationList2020Status\" } } }"
}
{
  "publicKey": "{\"kty\": \"EC\",\"crv\": \"secp256k1\",\"x\": \"1iTtnvgP141NM-4qC6BgmkeTAjV7u-gZWni71G7cAKo\",\"y\": \"VSGqq6yS0w7riXXRqFxXwKvHgIpQaUNMlFQKh-xgKMI\"}",
  "signed": "text"
}

Verify a signed VC

post
Authorizations
Body
DIDstringRequired
Responses
201Success
application/json
ResponsebooleanExample: true
post
POST /api/v1/utils/verify HTTP/1.1
Host: sunbirdrc.dev
Token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 14

{
  "DID": "text"
}
201Success
true