The UserEnrolmentList api provides the detail of a user's all enrolled CourseBatches
The endpoint for UserEnrolment List is /user/enrollment/list/{{user-id}}
The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.
{"id":"api.user.courses.list","ver":"v1","ts":"2020-12-03 06:56:38:376+0000","params": {"resmsgid":null,"msgid":"83f3347f-0d7a-4369-bde2-daae13aa5938","err":null,"status":"success","errmsg":null },"responseCode":"OK","result": {"courses": [ {"dateTime":1594191696100,"lastReadContentStatus":2,"enrolledDate":"2020-07-08 07:01:36:100+0000","addedBy":null,"contentId":"do_11305961646828748812224","active":true,"description":"<p>Enter description for Course</p>", "courseLogoUrl": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/do_11305961646828748812224/artifact/06_maths_book_1566813333849_1580197829074.thumb.jpg",
"batchId":1305961938705612800,"userId":"95e4942d-cbe8-477d-aebd-ad8e6de4bfc8","content": {"ownershipType": ["createdBy" ],"copyright":"Sunbird","channel":"b00bc992ef25f1a9a8d63291e20efc8d", "downloadUrl": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/ecar_files/do_11305961646828748812224/test-auto-certificate-8thjuly_1594191511275_do_11305961646828748812224_1.0_spine.ecar",
"organisation": ["Sunbird" ],"language": ["English" ],"mimeType":"application/vnd.ekstep.content-collection","variants": {"online": { "ecarUrl": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/ecar_files/do_11305961646828748812224/test-auto-certificate-8thjuly_1594191511612_do_11305961646828748812224_1.0_online.ecar",
"size":4936 },"spine": { "ecarUrl": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/ecar_files/do_11305961646828748812224/test-auto-certificate-8thjuly_1594191511275_do_11305961646828748812224_1.0_spine.ecar",
"size":76289 } },"leafNodes": ["do_11305605610466508811" ],"c_sunbird_dev_private_batch_count":0,"objectType":"Content", "appIcon": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/do_11305961646828748812224/artifact/06_maths_book_1566813333849_1580197829074.thumb.jpg",
"children": ["do_11305605610466508811" ],"primaryCategory":"Course","appId":"dev.sunbird.portal","contentEncoding":"gzip","lockKey":"097e65a0-9c65-4198-b65c-269de9ae6072","totalCompressedSize":499149, "mimeTypesCount": "{\"application/vnd.ekstep.content-collection\":1,\"application/vnd.ekstep.ecml-archive\":1}",
"contentType":"Course","trackable": {"enabled":"Yes","autoBatch":"Yes" },"identifier":"do_11305961646828748812224","lastUpdatedBy":"8454cb21-3ce9-4e30-85b5-fade097880d8","audience": ["Teacher" ],"visibility":"Default", "toc_url": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/do_11305961646828748812224/artifact/do_11305961646828748812224_toc.json",
"contentTypesCount":"{\"CourseUnit\":1,\"Resource\":1}","consumerId":"6533af82-f38b-429a-bcfb-681ed02a62e3","childNodes": ["do_11305961679918694412225","do_11305605610466508811" ],"mediaType":"content","osId":"org.ekstep.quiz.app","graph_id":"domain","nodeType":"DATA_NODE","lastPublishedBy":"Ekstep","version":2,"license":"CC BY 4.0","prevState":"Draft","size":76289,"lastPublishedOn":"2020-07-08T06:58:31.132+00:00","IL_FUNC_OBJECT_TYPE":"Content","name":"Test-auto-certificate-8thjuly","status":"Live","code":"org.sunbird.DuGnxI","credentials": {"enabled":"Yes" },"prevStatus":"Processing","description":"<p>Enter description for Course</p>","idealScreenSize":"normal", "posterImage": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/do_11294498061374259215/artifact/06_maths_book_1566813333849_1580197829074.jpg",
"createdOn":"2020-07-08T06:57:43.417+00:00","reservedDialcodes":"{\"U6K9M6\":0}","batches": [ {"createdFor": ["ORG_001" ],"endDate":null,"name":"Test-auto-certificate-8thjuly","batchId":1305961938705612800,"enrollmentType":"open","enrollmentEndDate":null,"startDate":"2020-07-08","status":1 }, {"createdFor": ["ORG_001" ],"endDate":null,"name":"Test-auto-certificate-8thjuly","batchId":1306956038530662400,"enrollmentType":"open","enrollmentEndDate":null,"startDate":"2020-07-22","status":1 } ],"copyrightYear":2020,"contentDisposition":"inline","lastUpdatedOn":"2020-07-08T06:58:30.585+00:00", "licenseterms": "By creating and uploading content on DIKSHA, you consent to publishing this content under the Creative Commons Framework, specifically under the CC-BY-SA 4.0 license.",
"SYS_INTERNAL_LAST_UPDATED_ON":"2020-07-23T12:24:29.5+00:00","dialcodeRequired":"No","createdFor": ["ORG_001" ],"lastStatusChangedOn":"2020-07-08T06:58:31.95+00:00","creator":"Mentor First User","IL_SYS_NODE_TYPE":"DATA_NODE","os": ["All" ],"pkgVersion":1,"versionKey":1594191510585,"idealScreenDensity":"hdpi","framework":"TPD","depth":0, "s3Key": "ecar_files/do_11305961646828748812224/test-auto-certificate-8thjuly_1594191511275_do_11305961646828748812224_1.0_spine.ecar",
"dialcodes": ["U6K9M6" ],"createdBy":"8454cb21-3ce9-4e30-85b5-fade097880d8","compatibilityLevel":4,"leafNodesCount":1,"IL_UNIQUE_ID":"do_11305961646828748812224","resourceType":"Course","node_id":452442,"c_sunbird_dev_open_batch_count":2,"__$markdownParsed":true },"contentStatus": {"do_11305605610466508811":2 },"issuedCertificates": [],"completionPercentage":100,"courseName":"Test-auto-certificate-8thjuly","certificates": [ {"id":"fe2aadc6-5065-460a-98ed-4de17bc13f62","lastIssuedOn":"2020-07-22T12:57:44.335+00:00","name":"Course completion certificate prad","token":"A8T4Q7", "url": "https://dev.sunbirded.org/certs/ORG_001_01305961938705612812/eedc6a60-cc1a-11ea-bff5-c98df349f522.pdf"
} ],"completedOn":1595422613486,"leafNodesCount":1,"progress":1,"lastReadContentId":"do_11305605610466508811","courseId":"do_11305961646828748812224","collectionId":"do_11305961646828748812224","status":2,"__$markdownParsed":true } ] }}
Error with https://308610995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ZKyfmmhMWpPkD6iYvKF%2Fuploads%2Fx06ZVcTCQKP5fxJUP9zb%2Fgroupactivityapi.yaml?alt=media&token=2bc183af-38b3-4349-bbca-7478f6852943: Failed to parse YAML: Multi-line single-quoted string needs to be sufficiently indented
Error with https://308610995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ZKyfmmhMWpPkD6iYvKF%2Fuploads%2Fgit-blob-8e1e781e7f481e6bd37e81f06ca81a40b3643f1f%2Fcourseprogressapi.yaml?alt=media: Failed to parse YAML: Multi-line single-quoted string needs to be sufficiently indented
Error with https://308610995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ZKyfmmhMWpPkD6iYvKF%2Fuploads%2Fgit-blob-8e1e781e7f481e6bd37e81f06ca81a40b3643f1f%2Fcourseprogressapi.yaml?alt=media: Failed to parse YAML: Multi-line single-quoted string needs to be sufficiently indented
Error with https://308610995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ZKyfmmhMWpPkD6iYvKF%2Fuploads%2Fgit-blob-d632fad08af22d741a889f188bac008da84e08ea%2Fcoursebatchmanapi.yaml?alt=media: Failed to parse YAML: Multi-line single-quoted string needs to be sufficiently indented
Error with https://308610995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ZKyfmmhMWpPkD6iYvKF%2Fuploads%2Fgit-blob-d632fad08af22d741a889f188bac008da84e08ea%2Fcoursebatchmanapi.yaml?alt=media: Failed to parse YAML: Multi-line single-quoted string needs to be sufficiently indented
Error with https://308610995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ZKyfmmhMWpPkD6iYvKF%2Fuploads%2Fgit-blob-d632fad08af22d741a889f188bac008da84e08ea%2Fcoursebatchmanapi.yaml?alt=media: Failed to parse YAML: Multi-line single-quoted string needs to be sufficiently indented
Error with https://308610995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ZKyfmmhMWpPkD6iYvKF%2Fuploads%2Fgit-blob-d632fad08af22d741a889f188bac008da84e08ea%2Fcoursebatchmanapi.yaml?alt=media: Failed to parse YAML: Multi-line single-quoted string needs to be sufficiently indented
Add certificate template to a course batch
This API allows you to attach certificate templates.
On request, the _ /template/add_ endpoint attaches a template to the course batch.
This API will internally call ‘/dataset/v1/request/submit’ API in SB-Obsrv ‘On Demand Data Exhaust API’, to submit the on demand exhaust job request. The job status will be in the submitted state.
This API should encrypt the password using auto generated encryption key and pass it in the exhaust API request if the security level is L2 or L3.
L1 and L4 do not need encryption keys.
Fetch the security level using tenant preference APIs to check this.
constresponse=awaitfetch('https://staging.open-sunbird.org/api/data/v1/page/create', { method:'POST', headers: {"Content-Type":"application/json" }, body:JSON.stringify({"id":"api.page.create","ts":"2020/12/11 16:16:39","params": {},"request": {"name":"Resources", "organisationId": "id of organisation, if you want to create page for your org only. if not pass then page will be created for all org.",
"portalMap": [ {"id":1228383082462412800,"index":1,"group":1 }, {"id":1228383384379392000,"index":1,"group":2 } ],"appMap": [ {"id":1228383082462412800,"index":1,"group":1 }, {"id":1228383384379392000,"index":1,"group":2 } ] } }),});constdata=awaitresponse.json();