Resources
...
Continue support for awarding honor/verified/professional course certificates.
Continue support for allowing recipients to share achievements via social media (LinkedIn, Facebook, Twitter).
Add support for awarding programs (XSeries) certificates.
Migrate existing web and PDF certificates to any new system.
Preserve existing PDFs in S3.
Update dashboard links to point to web certificates, instead of directly to S3.
Add support for external verification of web certificates via verify.edx.org (SOL-1335, SOL-1298)
New system must support multi-tenancy—partitioning credentials by site/microsite (use django sites framework).
...
Every certificate has a template representing the rendered (HTML+CSS) certificate. Most certificates will use the same template—signatures, organization logo, course name—with variations for mode 'certificate_type' (e.g. honor, verified, professional). There is a case where the certificate templates can include other assets. Hence the 'CertificateTemplateAsset model', responsible for tracking assets for these special cases. Also for now certificates uses organization app for creating a template against a particular organization or related to one of its specific modes e.g. 'honor', 'verified' etc. This current feature allows instructor/admins to set an explicit template for the certificate at various level of depth. specific course mode override, course override, org override. then the base templates. This template override functionality will also carried over to the credentials.
The UserCredential model tracks which users have been awarded credentials. Only two statuses are supported at this time: 'awarded' and 'revoked'. To save the extra attributes e.g. 'grade' and 'whitelist' we have have a generic model 'UserCredentialAttribute'. For specificity of course related attributes we will use the prefix 'course' for the field 'namespace' e.g. 'course.grade'. The 'download_url' field will be used to distinguish between the course web certificates and course pdf certificates. This field will have the link for the PDF e.g. ff the UUID is 'abc123', the download URL should simply be 'https://<S3-HOST>/<UUID>/certificate.pdf'.
...
To support course/programs specific roles for credentials service we will have to create an endpoint in edx-platform.
Anyone | Learner | Course Team | PM | UX | Support | System | |
View user credential(s) | X | X | X | X | X | X | |
Share user credential via social media | X | ||||||
Create/edit/delete credential (data/template) | X | X | X | ||||
Create/edit/delete signatory | X | X | |||||
Issue credential | X (self-paced) | X | X | X | X | ||
Revoke credential | X | X | X |
Credentials APIs
RESTful endpoints are below. With the exception of the user-credential GET endpoint, all endpoints will require OAuth2 or session authentication.
Some basic response codes for endpoints:
- 200 indicates success for any operation other than a create operation
- 201 indicates success for a create operation
- 401 if the user is not authenticated
Pagination:
- Default DRF pagination will be used with page size 100 (http://www.django-rest-framework.org/api-guide/pagination/)
Administer credentials configurations
Credentials administration APIs for instructors and staff members.
GET/PUT/POST /api/v1/course-certificates/ |
---|
Add/Update a course related certificates configuration.
Code Block | ||
---|---|---|
| ||
{ "course_id": "edX/DemoX/Demo_Course", "certificate_type": "(honor|verified|professional)", "template": 2, "title": "Demo Course Credential"(optional), "is_active": (True,False), "signatories": [2,3,4] } |
GET/PUT/POST /api/v1/program-certificates/ |
---|
Add/Update a program related certificates configuration.
Code Block | ||
---|---|---|
| ||
{
"program_id": 1,
"template": 2,
"title": "Demo Program Credential"(optional)
"is_active": (True,False),
"signatories": [2,3,4]
} |
POST /api/v1/user-credentials/ (in case of course) |
---|
Issue course credential for a user.
Code Block | ||
---|---|---|
| ||
Input For Course Certificate
{
"username": "edxapp",
"course_id": "edx/DemoCourse/DemoX",
"certificate_type": "(honor|verified|professional)"
"attributes": [
{"namespace": "course.grade", "name": "Final Grade", "value": "80"}, (optional for non whitelist course credential)
{"namespace": "whitelist", "name": "Whitelist", "value": "Reason"}, (optional for whitelisting)
]
}
Output
{
"credential_type": "course-certificate",
"credential_id": 123,
"certificate_type": "(honor|verified|professional)",
"username": "edxapp",
"course_id": "edx/DemoCourse/DemoX",
"status": "(awarded|revoked)",
"uuid": "abc123",
"download_url": "", (empty other than pdf certs)
"attributes": [
{"namespace": "course.grade", "name": "Final Grade", "value": "80"}, (optional for non whitelist course credential)
{"namespace": "whitelist", "name": "Whitelist", "value": "Reason"}, (optional for whitelisting)
]
} |
POST /api/v1/user-credentials/ (in case of program) |
---|
Issue program credential for a user.
Code Block | ||
---|---|---|
| ||
Input For Program Certificate { "username": "edxapp", "program_id": 1, "attributes": [ {"namespace": "whitelist", "name": "Whitelist", "value": "Reason"}, (optional for whitelisting) ] } Output { "credential_type": "program-certificate", "credential_id": 123, "username": "edxapp", "program_id": 1, " |
status": |
"(awarded|revoked)", " |
uuid": " |
abc123", "attributes": [ {"namespace": "whitelist", "name": "Whitelist", "value": "Reason"}, (optional for whitelisting) ] } |
GET /api/v1/users/:username/credentials/ |
---|
Code Block | ||
---|---|---|
| ||
[ { "credential_type": "course-certificate", "credential_id": 123, "course_id": "edX/DemoX/Demo_Course", "certificate_type": "(honor|verified|professional)", "username": "edxapp", "status": "(awarded|revoked)", "uuid": "abc123", "download_url": "", (empty other than pdf certs) "attributes": [ {"namespace": "course.grade", "name": "Final Grade", "value": "80"}, (optional for non whitelist course credential) ] }, { "credential_type": "program-certificate", "credential_id": 123, "program_id": 1, "username": "edxapp", "status": "(awarded|revoked)", "uuid": "abc456", "attributes": [ {"namespace": "whitelist", "name": "Program Whitelist", "value": "Reason"}, (optional for whitelisting) ] } ] |
GET /api/v1/courses/:course_id/credentials/ |
---|
Get all user credentials related to a specific course.
Code Block | ||
---|---|---|
| ||
[ { "credential_type": "course-certificate", "credential_id": 123, "course_id": "edX/DemoX/Demo_Course", "certificate_type": "(honor|verified|professional)", "username": "edxapp", "status": "(awarded|revoked)", "uuid": "abc123", "download_url": "", (empty for non pdf certs) "attributes": [ {"namespace": "course.grade", "name": "Final Grade", "value": "80"}, (optional for non whitelist course credential) ] } { "credential_type": "course-certificate", "credential_id": 456, "course_id": "edX/DemoX/Demo_Course", "certificate_type": "(honor|verified|professional)", "username": "dummy_user", "status": "(awarded|revoked)", "uuid": "abc456", "download_url": "", (empty for non pdf certs) "attributes": [ {"namespace": "whitelist", "name": "Whitelist", "value": "Reason"}, (optional for whitelisting) ] } ] |
GET /api/v1/programs/:program_id/credentials/ |
---|
Get all user credentials related to a specific program.
Code Block | ||
---|---|---|
| ||
[ { "credential_type": "program-certificate", "credential_id": 123, "program_id": 1, "username": "edxapp", "status": "(awarded|revoked)", "uuid": "abc456", "attributes": [] }, { "credential_type": "program-certificate", "credential_id": 456, "program_id": 1, "username": "dummy_user", "status": "(awarded|revoked)", "uuid": "abc789", "attributes": [ {"namespace": "whitelist", "name": "Program Whitelist", "value": "Reason"}, (optional for whitelisting) ] } ] |
POST /api/v1/certificate-templates/ |
---|
Add template for certificates configuration.
Code Block | ||
---|---|---|
| ||
{ "name": "Dummy Template Name", "organization_id": 1, (optional) "certificate_type": "(honor|verified|professional)", (optional) "content": "HTML content" } |
GET/PUT/POST /api/v1/certificate-template-assets/ |
---|
Add/Update file assets for certificate templates.
Code Block | ||
---|---|---|
| ||
{ "name": "ABC", "file": "Asset file path" } |
GET/PUT/POST /api/v1/signatories/ |
---|
Add/Update a signatory.
Code Block | ||
---|---|---|
| ||
{ "name": "ABC", "title": "XYZ", "image": "Path to the image" } |
PATCH /api/v1/user-credentials/:id |
---|
Revoke a specific user credential.
Code Block | ||
---|---|---|
| ||
{ "status": "revoked" } |
Public accessible credentials endpoints
...
Some basic analytics related to course certificates for migration point of view.
Web Certificates:
Total courses | Total cert issued | Min cert count | Max cert count | Avg cert count |
171 | 60599 | 1 | 4839 | 354 |
...
Total Templates | Total template assets |
5 | 30 |