Certificate: Attach to a batch
- 1 Introduction:
- 2 Background:
- 3 Problem Statement:
- 4 Key design problems:
- 5 Solution:
- 5.1 Create: Cert Template for a tenant
- 5.2 Get: Certificate template for a tenant
- 5.3 Create: Certificate rules for a tenant
- 5.4 Get: Certificate rules for a tenant
- 5.5 Create: Certificate templates list of a tenant
- 5.6 Create: Attach certificate to a batch of the course
- 5.7 Get: Certificate attached to a batch of the course
Introduction:
This document describes how to issue/assign the certificate to a batch of the specific course.
Background:
Jira Issues
UI designs: https://project-sunbird.atlassian.net/browse/SH-641
Related stories
Problem Statement:
How to assign the specific certificate to a batch(Of a course)?
Key design problems:
How to create an independent module/component of issues/assign certificate?
How to assign cert to any trackable content?
How to preview the certificate template?
Solution:
https://projects.invisionapp.com/share/YTY9E6H2BZV#/screens/427016703
Create: Cert Template for a tenant
POST v2/org/preferences/create
Request
{
"request": {
"orgId": "0126825293972439041", // rootOrgIg or ChannelId
"key": "iGOTCourseTemplate",
"data": {
"template": "https://preprodall.blob.core.windows.net/user/certificate/File-01301994007487283297.zip",
"identifier": "iGOTCourseTemplate",
"previewUrl": "https://sunbirddev.blob.core.windows.net/e-credentials/svgcerts/cert.svg",
"name": "Acknowledgement Certificate",
"issuer": {
"name": "iGOT",
"publicKey": [
"33"
],
"url": "https://igot.gov.in/igot/"
},
"signatoryList": [
{
"image": "https://igot.gov.in/tenant/igot/logo.png",
"name": "iGOT",
"id": "iGOT",
"designation": "GOVT"
}
]
}
}
}
Response
Get: Certificate template for a tenant
POST v2/org/preferences/read
Request
request: {
"orgId":"0126825293972439041", // rootOrgIg or ChannelId
"key": "iGOTCourseTemplate"
}
Response
Create: Certificate rules for a tenant
POST v2/org/preferences/create
Request
Get: Certificate rules for a tenant
POST v2/org/preferences/read
Request
Response:
Create: Certificate templates list of a tenant
POST /api/org/v2/preferences/create
Request
Create: Attach certificate to a batch of the course
POST /api/course/batch/cert/v1/template/add
Note:
PreviewUrl - This is mandatory for the certificate preview
Request
Get: Certificate attached to a batch of the course
GET /api/course/v1/batch/read/0130838444540149762
NOTE:cert_templates.previewUrl:
To show the preview of the certificate while managing the certificate
cert_templates.criteria.enrolment:
To identify the “certificate type”
enrolment.status: "2”
indicates Completion certificateenrolment.score: ">=80”
indicates Merit certificate
cert_templates.criteria.user:
To identify the certificate can be “issue to whom“
user.rootOrgId: "ORG_001"
to the state teachers onlyuser.{}
to all users
Request
Response