📙
Sunbird Lern
AskDot
  • LEARN
    • Overview
    • Functional Capabilities
    • Technical Architecture
      • Technical Architecture Diagram
      • Tech Stack
    • Dependencies
    • Product Roadmap
  • USE
    • Overview
    • Release Notes
      • Release V 8.0.0 (Ongoing)
      • Release V 7.0.0
      • Release V 5.4.0
      • Release V 5.3.0
      • Release V 5.2.0
      • Release V 5.1.0
      • Release V 5.0.1
      • Release V 5.0.0
      • Release V 4.10.0
      • Release V 4.9.0
      • Release V 4.8.0
      • Release V 4.7.0
    • Developer Guide
      • USER & ORG SERVICE
        • Features/Core capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Keycloak Local setup
          • Additional Installation Dependencies:
          • Source Code
          • Installation Configuration
        • Data Models
          • Cassandra
            • Data Dictionary
              • User
              • Organisation
              • System Settings
              • Role
              • Bulk Upload Process
              • Tenant Preference
              • Cassandra Migration Version
              • User Consent
              • Email Template
              • OTP
              • Page Management (LMS Service)
              • Location
              • User Notes
              • Deprecated
          • Elastic Search
          • Redis
        • APIs
          • User Management
            • User Deletion API
            • Ownership Transfer API
          • Organisation Management
          • Location Management
          • Consent Management
          • OTP Services
          • Tenant Configurations
          • Bulk Upload
          • System Settings
          • API Management Service
          • Data Sync
          • Notification APIs
        • Flink Jobs
          • User Cache Updater
          • User Deletion Cleanup Flink Job
          • Ownership Transfer Flink Job
        • Reports
          • Standard Exhaust
            • State Admin Geo report
            • State Admin Report
          • Other Jobs
            • User Cache Indexer Job
            • Delete Users Assets Report
          • Data Products Developer Installation
            • System Requirements
            • Tech Stack
            • Installation Dependencies
            • Local installation of data-products
            • Server setup Guide
            • Installation Configuration
            • Data-product creation guide
            • Troubleshooting a data-product
        • Logs, Telemetry Events
        • Configuration
          • Functional Configurations
          • System Settings
          • Email Configuration
          • SMS Configuration
          • OTP based SMS Configuration
        • Roles
          • System Roles
          • User Roles
          • RBAC
        • Dependencies
        • Keycloak on Sunbird
        • How to Guide
          • Create Organization
          • Create User
          • Add new user type & location
        • Single Sign-on with Sunbird
        • Caching and Denormalising User Metadata
          • ETLUserCacheUpdaterJob
          • UserCacheUpdaterFlinkJob
        • Unit Tests and Code Coverage
        • FAQs
      • LMS(BATCH) SERVICE
        • Features/Core Capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Source Code
        • Data Models
          • Cassandra
            • Data Dictionary
          • ElasticSearch
          • Redis
        • APIs
        • Flink Jobs
          • Merge User Courses
          • Relation Cache Updater
          • Activity Aggregate Updater
          • Assessment Aggregator
          • Enrolment Reconciliation
          • Collection Certificate Pre-Processor
          • Collection Certificate Generator
        • Reports
          • On-Demand Exhaust
            • Response Exhaust
            • User Info Exhaust
            • Progress Exhaust
          • Other Jobs
            • Collection Summary Job
            • Course Batch Status Updater Job
            • Cassandra Migrator Job
            • Score Metric Migration Job
            • Assessment Score Correction Job
            • Collection Reconciliation Job
            • Course Enrollment Job
            • Course Consumption Job
        • Logs, Telemetry Events
        • Configuration
          • System Configuration
          • Functional Configuration
        • Dependencies
        • Certificate Registry and Credentialing using Sunbird-RC
          • Configuring PublicKey in Sunbird-RC
          • Server Setup guide for Sunbird-RC
          • API Guide For Sunbird-RC
        • Certificate Flow
          • Certificates Creation and Configuration
        • FAQs
      • GROUPS
        • Features/Core Capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Source Code
          • Installation Configuration
        • Data Models
          • Cassandra
            • Data Dictionary
          • Redis
        • APIs
          • Create Group
        • Logs, Telemetry Events
          • UI Telemetry Events
          • Service Telemetry Events
        • Configuration
          • Functional Configurations
        • Design References
        • Dependencies
        • Unit Tests and Code Coverage
      • NOTIFICATION SERVICE
        • Features/Core Capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Source Code
          • Installation Configuration
        • Data Models
          • Data Dictionary
        • APIs
        • Flink Jobs
        • Logs, Telemetry Events
        • Configuration
          • Functional Configurations
        • Dependencies
        • Unit Tests and Code Coverage
      • DISCUSSION FORUM
        • Features/Core capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
            • Nodebb setup
            • Discussion Middleware Setup
            • Discussion Middleware
            • Discussion forum integration with any application
            • Discussion-UI setup along with demo application.
            • Sunbird-lern portal for DF
          • Source Code
        • APIs
          • Category APIs
          • User APIs
          • Post APIs
          • Topic APIs
          • Forum APIs
        • Context Schema
        • Configurations
          • Nodebb Admin panel settings
          • Discussion MW & Nodebb System Config
        • Telemetry Events
        • Dependencies
      • ML SERVICE
        • DATA PIPELINE (Flink Jobs)
          • Program User Info
            • Component Diagram
            • Data Model
            • Folder Structure
          • Ml User Delete
            • Component Diagram
            • Data Model
            • Folder Structure
        • DATA PRODUCTS
          • Program Exhaust
            • Component Diagram
            • Folder Structure
    • Server Installation
    • Dependency setup
    • Deprecation
      • Release-5.4.0
    • Jenkins Jobs
    • Release Calendar
    • Learn More
      • Tech References
      • Telemetry Processing
      • Data Dictionary
        • Sample Data
      • Delete User Functionality
      • Asset Ownership Transfer
    • FAQs
  • Engage
    • Discuss
    • Contribute to Sunbird Lern
    • Raise an Issue
    • Contribution Guidelines
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub

Last updated 1 year ago

Was this helpful?

  1. USE
  2. Developer Guide
  3. LMS(BATCH) SERVICE
  4. Certificate Registry and Credentialing using Sunbird-RC

API Guide For Sunbird-RC

The APIs used in the certificate generation process are listed below. Kindly find the Postman collection file in the below link

PreviousServer Setup guide for Sunbird-RCNextCertificate Flow
https://github.com/Sunbird-Lern/lms-service/blob/release-8.0.0/api-tests/Collection/Sunbird-RC-Certificate-APIs.postman_collection.json

Download certificate PDF

get
Path parameters
osidstringRequired
Header parameters
AcceptstringOptionalExample: image/svg+xml
AuthorizationstringOptionalExample: {{rc_api_key}}
templatestringOptionalExample: {{template_url}}
Responses
undefined
text/plain
Responsestring
get
GET /registry-service/api/v1/TrainingCertificate/{osid} HTTP/1.1
Host: {{rc_private_host}}
Accept: */*
undefined
text

delete certificate

delete
Path parameters
osidstringRequired
Header parameters
AuthorizationstringOptionalExample: {{rc_api_key}}
Responses
200
OK
application/json
Responseobject
delete
DELETE /registry-service/api/v1/TrainingCertificate/{osid} HTTP/1.1
Host: {{rc_private_host}}
Accept: */*
200

OK

{
  "id": "sunbird-rc.registry.delete",
  "ver": "1.0",
  "ets": 1646201090982,
  "params": {
    "resmsgid": "",
    "msgid": "05682949-5917-452d-b82f-5b9a5c353564",
    "err": "",
    "status": "SUCCESSFUL",
    "errmsg": ""
  },
  "responseCode": "OK"
}
  • POSTCreate certificate
  • POSTCreate PublicKey
  • GETDownload certificate PDF
  • PUTUpdate certificate
  • DELETEdelete certificate
  • POSTSearch Certificate
  • POSTPublic key Search

Create certificate

post
Header parameters
AuthorizationstringOptionalExample: {{rc_api_key}}
Body
objectOptionalExample: { "recipient": { "id": {{user id}}, "name": {{user name}}, "type": "user" }, "issuer": { "url": {{issure url}}, "name": {{issure name}}, "kid": {{Public key osid}} }, "training": { "id": {{course id}}, "name": {{course name}}, "type": "Course", "batchId": {{batch id}} }, "templateUrl": {{template url}}, "status": "ACTIVE", "signatory": [ { "name": "commissioner", "image": {{base64 signatory}}, "designation": "CEO", "id": "CEO/CEO" } ], "oldId": {{old certificate id if certificate is reissue}}, "certificateLabel": {{certificate name}}, "issuedOn": {{issued time}} }
Responses
200
OK
application/json
Responseobject
post
POST /registry-service/api/v1/TrainingCertificate HTTP/1.1
Host: {{rc_private_host}}
Content-Type: application/json
Accept: */*
Content-Length: 856

"{\n    \"recipient\": {\n        \"id\": {{user id}},\n        \"name\": {{user name}},\n        \"type\": \"user\"\n    },\n    \"issuer\": {\n        \"url\": {{issure url}},\n        \"name\": {{issure name}},\n        \"kid\": {{Public key osid}}\n    },\n    \"training\": {\n        \"id\": {{course id}},\n        \"name\": {{course name}},\n        \"type\": \"Course\",\n        \"batchId\": {{batch id}}\n    },\n    \"templateUrl\": {{template url}},\n    \"status\": \"ACTIVE\",\n    \"signatory\": [\n        {\n            \"name\": \"commissioner\",\n            \"image\": {{base64 signatory}},\n            \"designation\": \"CEO\",\n            \"id\": \"CEO/CEO\"\n        }\n    ],\n    \"oldId\": {{old certificate id if certificate is reissue}},\n    \"certificateLabel\": {{certificate name}},\n    \"issuedOn\": {{issued time}}\n}"
200

OK

{
  "id": "sunbird-rc.registry.create",
  "ver": "1.0",
  "ets": 1646201090982,
  "params": {
    "resmsgid": "",
    "msgid": "05682949-5917-452d-b82f-5b9a5c353564",
    "err": "",
    "status": "SUCCESSFUL",
    "errmsg": ""
  },
  "responseCode": "OK",
  "result": {
    "PublicKey": {
      "osid": "1-21c8ecab-7b8d-40f1-9961-cae7fcb6a5f9"
    }
  }
}

Create PublicKey

post
Header parameters
AuthorizationstringOptionalExample: {{rc_api_key}}
Body
objectOptionalExample: {"value":"{{key}}"}
Responses
200
OK
application/json
Responseobject
post
POST /registry-service/api/v1/PublicKey HTTP/1.1
Host: {{rc_private_host}}
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "value": "{{key}}"
}
200

OK

{
  "id": "sunbird-rc.registry.create",
  "ver": "1.0",
  "ets": 1646201090982,
  "params": {
    "resmsgid": "",
    "msgid": "05682949-5917-452d-b82f-5b9a5c353564",
    "err": "",
    "status": "SUCCESSFUL",
    "errmsg": ""
  },
  "responseCode": "OK",
  "result": {
    "TrainingCertificate": {
      "osid": "1-21c8ecab-7b8d-40f1-9961-cae7fcb6a5f9"
    }
  }
}

Update certificate

put
Path parameters
osidstringRequired
Header parameters
AuthorizationstringOptionalExample: {{rc_api_key}}
Body
objectOptionalExample: { /// updated fields }
Responses
200
OK
application/json
Responseobject
put
PUT /registry-service/api/v1/TrainingCertificate/{osid} HTTP/1.1
Host: {{rc_private_host}}
Content-Type: application/json
Accept: */*
Content-Length: 30

"{\n    /// updated fields\n}"
200

OK

{
  "id": "sunbird-rc.registry.update",
  "ver": "1.0",
  "ets": 1646201090982,
  "params": {
    "resmsgid": "",
    "msgid": "05682949-5917-452d-b82f-5b9a5c353564",
    "err": "",
    "status": "SUCCESSFUL",
    "errmsg": ""
  },
  "responseCode": "OK"
}

Search Certificate

post
Header parameters
AuthorizationstringOptionalExample: {{rc_api_key}}
Body
objectOptionalExample: { "filters": { // fields } }
Responses
200
OK
application/json
Responseobject
post
POST /registry-service/api/v1/TrainingCertificate/search HTTP/1.1
Host: {{rc_private_host}}
Content-Type: application/json
Accept: */*
Content-Length: 52

"{\n    \"filters\": {\n        // fields\n    }\n}"
200

OK

[
  {
    "osUpdatedAt": "2022-04-12T11:54:37.188Z",
    "osUpdatedBy": "anonymous",
    "@type": "TrainingCertificate",
    "training": {
      "osUpdatedAt": "2022-04-12T11:54:37.188Z",
      "osCreatedAt": "2022-04-12T11:54:36.990Z",
      "osUpdatedBy": "anonymous",
      "@type": "training",
      "name": "4.8 reg report Course for Question set",
      "osCreatedBy": "anonymous",
      "id": "do_213505518232150016154",
      "osid": "a6f3defd-202e-4c67-8fba-4e89d3d58862",
      "type": "Course",
      "batchId": "01350552513233715292"
    },
    "osid": "8928890e-5997-42c1-9f79-5f874215e531",
    "_osSignedData": "{\"@context\":[\"https://obj.stage.sunbirded.org/sunbird-content-staging/schema/v1_context.json\",\"https://obj.stage.sunbirded.org/sunbird-content-staging/schema/sunbird_context.json\"],\"type\":[\"VerifiableCredential\"],\"id\":\"did:sunbird:1-8928890e-5997-42c1-9f79-5f874215e531\",\"issuanceDate\":\"2022-04-12T11:54:36.990Z\",\"credentialSubject\":{\"type\":\"Merit Certificate\",\"recipientName\":\"ಪ್ರಿಯಾ\",\"trainingName\":\"4.8 reg report Course for Question set\",\"trainingId\":\"do_213505518232150016154\"},\"issuer\":{\"id\":\"https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#Issuer\",\"type\":[\"Issuer\"],\"name\":\"Gujarat Council of Educational Research and Training\",\"url\":\"https://gcert.gujarat.gov.in/gcert/\",\"publicKey\":[\"d50937e1-9359-4451-a66a-ebee45d1d605\"]},\"proof\":{\"type\":\"RsaSignature2018\",\"created\":\"2022-04-12T11:54:37Z\",\"verificationMethod\":\"did:india\",\"proofPurpose\":\"assertionMethod\",\"jws\":\"eyJhbGciOiJQUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..phI5GuJd45TiNjo5JJSvrLPvVGvcqGy7rZH8TclcH3PaGIeUJkD5FH6mFKnID3Qz8uiKfaHwzOG2VXZzBLy68ivAx3QHdwjUzVRA5PG__JA9RJZ8XRFBLJwNT-TLocOpoQGuq5KvmIX4g9zWj70rb-MpU_deqkcCzM_0kTsmlEin8_Bt2cb1cguPANVJ0Q9IUScyqOTk9Lg6v6X8IOnyMX54P4KAi2dnT6ICPEGHAryQQp69uzYzLmMBFp7rCLg_8PT3chiUTjkqo3MemiJtBbDbqKdSAZ-G61tP_SMWC-12bwfH10fTQLAgKR2kaUIyGcx23n1kLCaUnOhcd5h9KQ\"}}",
    "osOwner": [
      "anonymous"
    ],
    "issuer": {
      "osUpdatedAt": "2022-04-12T11:54:37.188Z",
      "osCreatedAt": "2022-04-12T11:54:36.990Z",
      "osUpdatedBy": "anonymous",
      "@type": "issuer",
      "kid": "d50937e1-9359-4451-a66a-ebee45d1d605",
      "name": "Gujarat Council of Educational Research and Training",
      "osCreatedBy": "anonymous",
      "osid": "d2d336a4-149f-45bc-951d-2272cbb25cb5",
      "url": "https://gcert.gujarat.gov.in/gcert/"
    },
    "templateUrl": "https://obj.stage.sunbirded.org/sunbird-content-staging/content/do_21348140209112678412/artifact/do_21348140209112678412_1645678966806_certificate_2022-02-24_10_32.svg",
    "certificateLabel": "Merit Certificate",
    "osCreatedAt": "2022-04-12T11:54:36.990Z",
    "recipient": {
      "osUpdatedAt": "2022-04-12T11:54:37.188Z",
      "osCreatedAt": "2022-04-12T11:54:36.990Z",
      "osUpdatedBy": "anonymous",
      "@type": "recipient",
      "name": "ಪ್ರಿಯಾ",
      "osCreatedBy": "anonymous",
      "id": "a7939df7-7c7b-4178-9325-cb13a0eaf87f",
      "osid": "f4932960-c0ad-4e77-b99c-41d5fa51ee72"
    },
    "osCreatedBy": "anonymous",
    "signatory": [
      {
        "image": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/wAALCAAuAHABAREA/8QAHQABAAICAgMAAAAAAAAAAAAAAAYHBQgBAwIECf/EADAQAAEEAQMDAgQGAgMAAAAAAAIBAwQFAAYHERITIQhBFCIxMiNCUWFxchUzgYKS/9oACAEBAAA/APv5jGMYyP6z3Bq9vKhJltJ+HbccFhoBAnHpDpfa02AopGa+wiirmA036iNN6l1gxp8ytKa7mATkWDcVr9e9NEfJKz3RFHOn36VXjJ/jGMYxjGRTdLcFnbfTLk5Yz0ya6YxoENr/AGTpJr0ttD/K/VfyjyuYLYK91HcytWM6jsIti9WWoRW1jR0aZjl8JHcdab9yAHXDFCL5l485ZGVJvGx2PUNtLLlKg1oy7OOPP2pNchr2F/t2wkin85075wF11v3tTRRi+eitn9VzSD6ssMw34oIv7G7LFP8AquXDjILvXuhI22rKZmtitWF5qO3jVNfGcNRElMuXXF489LbIuuL/AEydYxjGMrXTElvc3eu7sj6Xa/QzqVEAfy/GG0Dkl3+RBxtpP0/F/XIXpD1U6egauvamg03Yf4eFPR6TZo62LVg/KlqyrjAqSk91P9aeOPKZZkLefTlpa18OLZBKkWk6XXx0ZbIkN2L1JI88fa2QqJF9vVwnOQHezdbTGv8A00zL6Q/OixZkhxNPux0QpcmWw8Xw0mOPv87XdFV8dv5i4TnjVOJ6t9yr7ZvUFxXQLqt3E1VNj0thdV1L8Y2xLNwGIkOuFz8NIwi+jwvvF+J3XDEPPjcrRu/MdjU8PSEyt1A1bQagLGa9YuwxNiKik2kh/oeXp6ybNfp7Lk1m68paszSRa17KtvsxS65Aj0uvcIy35X7j6k6U9+cgs5gNcesCCJILjGg9OHJ/rKsHu2C/yjMR3/h3LXxjGMZTlhsRqqQGoaWs1W1p/T2obKTYvyoMVf8ALN/EeXG2nCXtt8Eq8OdJF+2cae9I9fpfRdDWQLmXFmUrzLiTmojIkYtRzjtgIdPSCALhEHHPSa9XnILvXsDo/wBPexdhduXWs3JGn6CZVxO1NQpc+MTan8EKC2n3E2hKYILnKKRH45SNbN7AG1M0JW7ly6loKXSsaQtcLvTWxgDpbCCx18IQB20cfcX5nS7X5E4y0qXQ8T1CTtVXUOQdfUyLGsco7FhtFV1+vXuDLESTpNtXCRtPYhaX6eM85notprx24nWV9qV6/wBTxDgXttHfbjSLWOQqIsEgh0ttgi/IIcccryq5ibb0V2BXjFjX65nynI161qQWLqA1NakTQYFgSdUO2RAAj1NgCgIF5T9pb6ftnbnbLWO4U+5mv28nU1rGmN2LzqdcoQhMNKKNj4ZbBwXEEE9vPvlr4xjGMZ6lnYM1MJyVIcBiOwCuOuGXSLYp5VVzW3Vt5J3yrYIui8M3chCg0MJeO5VUKkHxc9wfym81/wCe60HP1zYa/wBIVGqo7TFpV11kywXW0EuMDwtqnuiEi8L++ZNtoWgQREREftTOzGMYxjGMZgtxNExdxtA3VBPN5uFeQnoD5Ml0uI26CgXC/rwq5itutl6rbR+RNadmWVzOAGZNlMMSkPNh9jadIiDbY+wNiIp+mTLGMYxjGf/Z",
        "osUpdatedAt": "2022-04-12T11:54:37.188Z",
        "osCreatedAt": "2022-04-12T11:54:36.990Z",
        "osUpdatedBy": "anonymous",
        "name": "AK director",
        "osCreatedBy": "anonymous",
        "designation": "CEO",
        "osid": "edde9972-e443-4afa-9fdd-ae087c8dcef4",
        "id": "CEO/CEO"
      }
    ],
    "status": "ACTIVE"
  }
]

Public key Search

post
Header parameters
AuthorizationstringOptionalExample: {{rc_api_key}}
Body
objectOptionalExample: {"filters":{}}
Responses
200
Successful response
application/json
post
POST /registry-service/api/v1/PublicKey/search HTTP/1.1
Host: {{rc_private_host}}
Content-Type: application/json
Accept: */*
Content-Length: 14

{
  "filters": {}
}
200

Successful response

No content