Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction:

...

  • Authorization and x-authenticated-user-token are mandatory headers in every requestx-requested-by header is mandatory in all state update apis

  • UserId will be captured using the user-token from headers for all api requests

Code Block
languagejson
{
    "id": "api.view", // required. id of the api request
    "ver": "1.0",  // required. Current version of api 
    "ts": "2021-01-01T00:00:00+05:30", //mandatory. Timestamp of the request
    "params": {
        "msgid": "4f04da60-1e24-4d31-aa7b-1daf91c46341" // unique request message id, UUID
    },
    "request": {                  // required
        ....
        ....                            
    }       
    

...

Expand
titlePOST - /v1/view/start

Request Spec:

Code Block
languagejson
{
    "id": "api.view.start",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
       "msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
    },
    "request": {
        "userIdcontentId": "{{userIdcontentId}}",       // required
        "contentIdcollectionId" : "{{contentIdcollectionId}}"   // requiredoptional
        "collectionIdcontextId" : "{{collectionIdbatchId}}"  // optional.required
    }
}

Sample Requests:

Sample1: consume organic content

Code Block
languagejson
{
    "id": "api.view.start",
    "ver": "v1",
    "ts": "2021-06-23 05:37:50:175+0000",
    "params": {
           "msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
    }
    "request": {
only when contextid is present
        "contextIdcontentId" : "{{batchId}}" // optional 
  content_123"
 } }

Sample Requests:

Sample1Sample2: consume organic content through collection

Code Block
languagejson
SampleRequest1
{
    "id": "api.view.start",
    "ver": "v1",
    "ts": "2021-06-23 05:37:5040:175575+0000",
    "params": {
       "msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
    }
    "request": {
      "userIdcontentId" : "usercontent_123",
      "contentIdcollectionId" : "contentcollection_123"      
    }

Sample2Sample3: consume content through collectioncontext

Code Block
languagejson
{
    "id": "api.view.start",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
       "msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
    }
    "request": {
      "userId" : "user_123",
      "contentId" : "content_123",
      "collectionIdcontextId" : "collectioncontext_123"      
    }

Sample3Response: consume content through context

200 Ok Response:

Code Block
languagejson
{
    "id": "api.view.start",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
        "resmsgid": null,
        "msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
,
   }     "requesterr": {null,
        "userIdstatus" : "user_123success",
        "contentIderrmsg": null
 : "content_123",  },
    "collectionIdresponseCode" : "collection_123OK",
    "result": {
  "contextId"  : "context_123"   "{{contentId}}": "Progress started"
    }
}

Response:

200 Ok 4XX or 5XX Error Response:

Code Block
languagejson
{
    "id": "api.view.start",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
        "resmsgid": null,
        "msgid": "5e763bc2-b072b072440d-440d-916e-da787881b1b9",
        "err": nullERR_Error_Code,
        "status": "successfailed",
        "errmsg": nullERR_error_msg
    },
    "responseCode": "OKBAD_REQUEST"/"SERVER_ERROR",
    "result": {
      //  "{{contentId}}": "Progress started"error message
     }
}
4XX or 5XX Error

Sample Response:

Sample1: Valid Request

Code Block
languagejson
{
    "id": "api.view.start",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
        "resmsgid": null,
        "msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
        "err": ERR_Error_Codenull,
        "status": "failedsuccess",
        "errmsg": ERR_error_msgnull
    },
    "responseCode": "BAD_REQUEST"/"SERVER_ERROROK",
    "result": {
      // error message  "content_123": "Progress started"
    }
}

Sample Response:

Sample1: Valid Sample2: InValid Request

Code Block
languagejson
{
    "id": "api.view.start",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
        "resmsgid": null,
        "msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
         "err": null"CLIENT_ERROR",
        "status": "successFAILED",
        "errmsg": nullERR_error_msg
    },
    "responseCode": "OKBAD_REQUEST",
    "result": {
        "content_123request.contentId": "Progress startedContent Id cannot be empty"
    }
}

Sample2Sample3: InValid Invalid ContextId in Request

Code Block
languagejson
{
    "id": "api.view.start",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
        "resmsgid": null,
        "msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
         "err": "CLIENT_ERROR",
        "status": "FAILED",
        "errmsg": ERR_error_msg
    },
    "responseCode": "BAD_REQUEST",
    "result": {
        "request.contentIdcontextId": "ContentInvalid Context Id cannot be empty"
    }
}
Sample3: Invalid ContextId in Request

Content View Update

Expand
titlePOST - /v1/view/update

Request:

Code Block
languagejson
{
    "id": "api.view.startupdate",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
        "resmsgid": null,
        "msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
    }
    "errrequest": "CLIENT_ERROR",{
        "statuscontentId": "FAILED{{contentId}}",         "errmsg": ERR_error_msg// required   
   },     "responseCodecollectionId" : "BAD_REQUEST{{collectionId}}", //optional
   "result": {         "request.contextId": "Invalid Context Id""{{batchId}}",         } }

Content View Update

POST - v1/viewupdate
Expand
title
/
/

Request:

Code Block
languagejson
{
  optional
  "id": "api.view.update",     "verprogressDetails": "v1",{     "ts": "2021-06-23 05:37:40:575+0000",     "params": {    // required. Progress details "msgid": "5e763bc2-b072-440d-916e-da787881b1b9"specific 
    }     "request": {...          "userId": "{{userId}}",              // required           "contentId": "{{contentId}}",   for each mimetype 
    // required            "collectionId" : "{{collectionId}}", //optional. required only when...                                              
           contextId present in request},
        "contextIdtimeSpent" : "{{batchIdtimeSpent}}",          // optionalrequired
        "progressDetails": {} 
        // required. Progress details specific 
                                                      for each mimetype
    }
}

Sample Requests:

Sample1: Without Context

Code Block
languagejson
{
    "id": "api.view.update",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
       "msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
    }
    "request": {
      "userIdcontentId" : "usercontent_123",
      "contentIdprogressDetails" : "content_123", {
       "progressDetails" : {
         "mimetype" : "appliation/pdf",
         "progress" : 20,
       }
 "timespent" : 10    "timespent" : 10
 }
}

Sample1: With Context

Code Block
languagejson
{
    "id": "api.view.update",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
       "msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
    }
    "request": {
      "userId" : "user_123",
      "contentId" : "content_123",
      "collectionId" : "collection_123",
      "contextId" : "context_123",
      "progressDetails" : {
         "mimetype" : "application/pdf",
         "progress" : 20,
       }
      "timespent" : 10
       }
}

Response:

Code Block
languagejson
200 OK:
{
    "id": "api.view.update",
    "ver": "v1",
    "ts": "2021-06-23 contents05:37:40:575+0000",
    "params": {
        "resmsgid": null,
        "msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
        "err": null,
        "status": "success",
        "errmsg": null
    },
    "responseCode": "OK",
    "result": {
        "{{contentId}}": "Progress Updated"
    }
}

4XX or 5XX Error:
{
    "id": "api.view.update",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
        "resmsgid": null,
        "msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
        "err": ERR_Error_Code,
        "status": "failed",
        "errmsg": ERR_error_msg
    },
    "responseCode": "BAD_REQUEST"/"SERVER_ERROR",
    "result": {
    }
}

...

Expand
titlePOST - /v1/view/end

Request:

Code Block
languagejson
{
    "id": "api.view.end",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
       "msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
    }
    "request": {
        "userId": "{{userId}}",              //required
        "contentId": "{{contentId}}"          //required.
        "collectionId" : "{{collectionId}}",  // required.required only when 
                                                   contextId present in request 
        "contextId": "{{batchId}}",           // optional
    }
}

Sample Request:

Sample1: Without Context

Code Block
languagejson
{
    "id": "api.view.end",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
       "msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
    }
    "request": {
      "userIdcontentId" : "usercontent_123",
      "contentId" : "content_123"
    }}

Sample2: With Context

Code Block
languagejson
{
    "id": "api.view.end",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
       "msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
    }
    "request": {
      "userId" : "user_123",
      "contentId" : "content_123",
      "collectionId" : "collection_123",
      "contextId" : "context_123"   
    }

Response:

Code Block
languagejson
{
    "id": "api.view.end",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
        "resmsgid": null,
        "msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
        "err": null,
        "status": "success",
        "errmsg": null
    },
    "responseCode": "OK",
    "result": {
        "{{contentId}}": "Progress ended"
    }
}

...

Expand
titlePOST - /v1/view/read

Request:

Code Block
languagejson
{
    "id": "api.view.read",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
       "msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
    }
    "request": {
        "userIdcontentId": "{{userIdcontentId}}",    // required
        "contentIdcollectionId" : "{{contentIdcollectionId}}", //requiredoptional 
        "collectionIdcontextId" : "{{collectionIdbatchId}}",   // optional.required
only when    }
}

Response:

Code Block
languagejson
{
    "id": "api.view.read",
    "ver": "v1",
        "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
        "resmsgid": null,
        "msgid":  contextId present in request "5e763bc2-b072-440d-916e-da787881b1b9",
        "err": null,
        "contextIdstatus": "{{batchId}}"success",
    //   optional "errmsg": null
   } }

Response:

Code Block
languagejson
{,
    "idresponseCode": "api.view.readOK",
    "verresult": "v1", {
      "tsuserId" : "2021-06-23 05:37:40:575+0000",{{userId}}",
      "paramscontentId" : "{{contentId}}",
      "type" : "resmsgidcontent":
  null,    contents:[{
    	"msgidcollectionId": "5e763bc2-b072-440d-916e-da787881b1b9{{collectionId}}",
        "err	"contextId": null,"{{batchId}}",  
        "statuscontentId": "success{{contentId}}",
        "errmsgstatus" : null "{{content_status}}"  
   },     "responseCodeprogressDetails": "OK{}",
    "result": {   }]
   	"userId": "{{userId}}",
}

Sample Response:

Sample1: Without context(organic consumption)

Code Block
{
    	"collectionIdid": "{{collectionId}}api.view.read", // optional
    	"contextIdver": "{{batchId}}v1",
 // optional  "ts": "2021-06-23 05:37:40:575+0000",
    "contentIdparams": "{contentId}",
        "statusresmsgid" : "{{content_status}}"null,
  // 0,1 or 2          "progressDetails"msgid": "{}"5e763bc2-b072-440d-916e-da787881b1b9",
        }
"err": null,
   } }

Sample Response:

Sample1: Without context(organic consumption)

Code Block
{     "idstatus": "api.view.readsuccess",
        "vererrmsg": "v1" null
    },
    "tsresponseCode": "2021-06-23 05:37:40:575+0000OK",
    "paramsresult": {
        "resmsgid	"userId": null,"user_123"
        "msgidcontentId": "5e763bc2-b072-440d-916e-da787881b1b9content_123",
        "errtype": null,
        "status": "success","content"
         "errmsgcontents":[{
null      },     "responseCodecontentid" : "OKcontent_123",
     "result": {     	"userIdcollectionid" : "usercontent_123",
           "contentIdcontenxtid" : "content_123",
           "status" : "1",
           "progressDetails": {
             "progressmimeType" :20, "application/video"
              "timespentprogress" :20
 10           }
        }]
    }
}

Example2: With context or collection

Code Block
languagejson
{
    "id": "api.view.read",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
        "resmsgid": null,
        "msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
        "err": null,
        "status": "success",
        "errmsg": null
    },
    "responseCode": "OK",
    "result": {
    	"userId": "user_123",
        "collectionIdcontentId" : "collectioncontent_!23123",
        "contextIdtype" : "context_123content",
        "contentIdcontents": "content_123",[{
           "progressDetailscontentid" : "{
 content_123",
           "collectionid" :"collection_123",
           "progresscontenxtid" :20, "context_123"
           "status" : "timespent" : 101",
           "progressDetails": {
             "mimeType" : }"application/video"
           status  : "1"progress" :20
            }
        }]
    }
}
Expand
titlePOST - /v1/view/read?context=all

Request:

Code Block
languagejson
{
    "id": "api.view.read.contextall",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
       "msgid": "5e763bc2-b072-440d-916e-da787881b1b9"
    }
    "request": {          "userId": "{{userId}}",    // required            // either of the three options is mandatory
        "contentId": "{{contentId}}" //optional
        "collectionId" : "{{collectionId}}", //optional
        "contentIdcontextId" : "{{contentIdcontextId}}" //requiredoptional
     }
}

Response:

Code Block
languagejson
{
 
  "id": "api.view.read.contextall",
    "ver": "v1",
 
  "ts": "2021-06-23 05:37:40:575+0000",
 
  "params": {

       "resmsgid": null,
   
    "msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
   
    "err": null,
  
     "status": "success",
   
    "errmsg": null
 
  },
    "responseCode": "OK",
    "result": {
    	"userId": "{{userId}}",...
    ...      "contentDetails": [       // Array of the contents details with context and without context       //requested_data
 {   "type": "contextall",
    "contents" : [                    // ContentList of Mapall withoutcontents contextirresepcitvie of context
     ]
  "contentId": "{contentId}",           "status" :
"{{content_status}}" 

Sample Response:

Code Block
languagejson
{
 // 0,1 or 2 
          "progressDetails": "{}" "id": "api.view.read.contextall",
  "ver": "v1",
  "ts": "2021-06-23 05:37:40:575+0000",
  "params": {
        }"resmsgid": null,
    "msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
  {  "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
  "userId"    // Content Map with context: "user_123",
  "collectionId" : "collection_123"
  "contents":[
    {
      "contentIduserid" : "{{contentId}}"user_123",
   
      "collectionIdcontentId" : "{{collectionId}}content_123",
          "contextIdstatus" : "{{contextId}}1",
      "progressDetails": {
  "status" : "{{content_status}}"    "progress": 20,
        "progressDetailstimespent": "{}" 10
      }
    }],
    {
} } 

Sample Response:

Code Block
languagejson
{     "iduserid" : "api.view.read.contextall",user_123"
      "vercollectionId": "v1collection_!23",
      "tscontextId": "2021-06-23 05:37:40:575+0000context_123",
      "paramscontentId": {"content_123",
        "resmsgidprogressDetails": null,{
        "msgidprogress": "5e763bc2-b072-440d-916e-da787881b1b9"20,
        "errtimespent": null, 10
      },
      "status": "success2",
    }
  ]
"errmsg": null }
}

Content Submit Assess

Expand
titlePOST - /v1/assessment/submit

Request:

Code Block
languagejson
{
  },
    "responseCodeid": "OKapi.assess.submit",
    "resultver": {"v1",
    	"userIdts": "user_123",
   2021-06-23 05:37:40:575+0000",
    "contentDetailsparams": [{
  
       "contentIdmsgid": "content_123",5e763bc2-b072-440d-916e-da787881b1b9"
    }     
 "status"  : "1request",:  {
        "progressDetailscontentId": {
"{{contentId}}",         // required  
 "progress       "collectionId" :20 "{{collectionId}}",  // required
        "contextId":  "timespent" : 10{{batchId}}",           // required 
 }       "attemptId" : "{{attemptId}}",        // {
 required
        "collectionIdassessments" : "collection_!23",[{
          "contextId" : "context_123",{{assess_event}}      // required for self-assess contents
 "contentId": "content_123",      }]
    "progressDetails": }
}

Response:

Code Block
{
    "id": "api.view.assess",
    "ver": "v1",
 "progress" :20   "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
        "timespent" : 10
  resmsgid": null,
        "msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
       } "err": null,
        "status" : "1success",
        }
  "errmsg": null
     }],
    "responseCode": "OK",
    "result": {
        "{{contentId}}": "Score Updated"
    }
}

Content Submit AssessAssesment Read

Expand
titlePOST - /v1/assessment/submitread

Request:

Code Block
languagejson
{
    "idrequest": "api.assess.submit",
 {
  "ver": "v1",     "tscontentId" : "2021-06-23 05:37:40:575+0000{{contentId}}",     "params": {//required
        "msgidcollectionId" : "5e763bc2-b072-440d-916e-da787881b1b9"
{{collectionId}}", //required
   }     "contextId": "{{batchId}}"    "request": {// required
   }
}

Response:

Code Block
languagejson
{
    "userIdid": "{{userId}}api.assessment.read",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
  // required "params": {
        "contentIdresmsgid": "{{contentId}}"null,
        // required"msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
          "collectionIderr" : "{{collectionId}}"null,
 // required
        "contextIdstatus": "{{batchId}}success",
        "errmsg": null
// required     },
    "attemptIdresponseCode" : "{{attemptId}}OK",
    "result": {
 // required         "assessments	"userId": [{"{{userId}}",
        "contentId" :   "{{assess_eventcontentId}}"
     // required for self-assess contents
  	"collectionId": "{{collectionId}}",
    	"contextId": "{{batchId}}",
     }]     }
}

Response:

Code Block
"assessments": [{
    "id": "api.view.assess",     "verattemptId" : "v1{{attemptId}}",
    	  "tsscore": "2021-06-23 05:37:40:575+0000", {{score}},
    	  "paramsmax_score": {{max_score}}
        "resmsgid": null,},{
          "msgidattemptId" : "5e763bc2-b072-440d-916e-da787881b1b9{{attemptId}}",
    	    "errscore": null{{score}},
    	    "statusmax_score": "success",
  {{max_score}}
     "errmsg": null     },
    "responseCode": "OK",     "result": {
        "{{contentId}}": "Score Updated"]
    }
}

Content Assesment ReadViewer Summary - All enrolments

Request
Expand
titlePOST GET - /v1/summary/assessmentlist/read
:userId

Response:

Code Block
languagejson
{
 
  "requestid": {
     "api.summary.list",
  "userIdver": "{{userId}}v1",
  "ts": "2021-06-23 05:59:54:984+0000",
  "params": {
  //required    "resmsgid": null,
    "contentIdmsgid" : "{{contentId}}95e4942d-cbe8-477d-aebd-ad8e6de4bfc8",  
 //required   "err": null,
    "collectionIdstatus" : "{{collectionId}}success",
//required    "errmsg": null
  },
  "contextIdresponseCode": "{{batchId}}OK",
  // required"result": {
   }
}

Response:

Code Block
languagejson
{ "summary": [
      {
        "iduserId": "api.assessment.read{{userId}}",
        "vercollectionId": "v1{{collectionId}}",
        "tscontextId": "2021-06-23 05:37:40:575+0000",{{batchId}}",
        "paramsenrolledDate": {1624275377301,
        "resmsgidactive": nulltrue,
        "msgidcontentStatus": "5e763bc2-b072-440d-916e-da787881b1b9",{
          "err{{contentId}}": null,{{status}}
        "status": "success"},
        "errmsgassessmentStatus": {
null     },     "responseCodeassessmentId": "OK", {
      "result": {     	"userIdscore": "{{userIdbest_score}}",
 
      "contentId" : "{{contentId}}"     	"collectionIdmax_score": "{{collectionIdmax_score}}",
    	"contextId": "{{batchId}}",     }
   "assessments": [{    },
        "attemptIdcollection": {
          "identifier": "{{attemptIdcollectionId}}",
       	   "scorename": "{{scorecollectionName}}",
        	  "max_scorelogo": "{{max_scorelogo Url}}",
          "leafNodesCount": {{leafNodeCount}},{
          "attemptIddescription" : "{{attemptIddescription}}",
     	  "score": {{score}},
      	  "max_scoreissuedCertificates": {[{max_score}}
        }  "name": "{{certName}}",
     ]     }
}

Viewer Summary - All enrolments

Expand
titleGET - /v1/summary/list/:userId

Response:

Code Block
languagejson
{
  "id": "api.summary.list",
  "ver": "v1",
  "ts": "2021-06-23 05:59:54:984+0000",
  "params": {
    "resmsgid": null,
    "msgid": "95e4942d-cbe8-477d-aebd-ad8e6de4bfc8",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "summary": [
      {
        "userId": "{{userId}}",
        "collectionId": "{{collectionId}}",
        "contextId": "{{batchId}}",
        "enrolledDate": 1624275377301,
        "active": true,
        "contentStatus": {
          "{{contentId}}": {{status}}
        },
        "assessmentStatus": {
          "assessmentId": {
            "score": {{best_score}},
            "max_score": {{max_score}}
          }
        },
        "collection": {
          "identifier": "{{collectionId}}",
          "name": "{{collectionName}}",
          "logo": "{{logo Url}}",
          "leafNodesCount": {{leafNodeCount}},
          "description": "{{description}}"
        },
        "issuedCertificates": [{
          "name": "{{certName}}",
          "id": ""id": "certificateId",
          "token": "{{certToken}}",
          "lastIssuedOn": "{{lastIssuedOn}}"
        }],
        "completedOn": {{completion_date}},
        "progress": {{progress}},
        "status": {{status}}
      }
    ]
  }
}

Sample Response:

Sample1:

Code Block
languagejson
{
  "id": "api.summary.list",
  "ver": "v1",
  "ts": "2021-06-23 05:59:54:984+0000",
  "params": {
    "resmsgid": null,
    "msgid": "95e4942d-cbe8-477d-aebd-ad8e6de4bfc8",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "summary": [
      {
        "userId": "user_123",
        "collectionId": "collection_123",
        "contextId": "context_123",
        "enrolledDate": 1624275377301,
        "active": true,
        "contentStatus": {
          "content_123": 2,
          "content_456": 1
        },
        "assessmentStatus": {
          "content_123": {
            "score": {{best_score}},
            "max_score": {{max_score}}
          }
        },
        "collection": {
          "identifier": "collection_123",
          "name": "Mathematics",
          "logo": "http://logoimage",
          "leafNodesCount": 4,
          "description": "Dummy Collection"
        },
        "issuedCertificates": [{
          "name": "Certificate-1",
          "id": "cert_123",
          "token": "sdfjkldjk23j2kj2k3jk2",
          "lastIssuedOn": "1624275377301"
        }],
        "completedOn": "2021-09-10",
        "progress": 70,
        "status": 1
      }
    ]
  }
}

...

Expand
titlePOST - /v1/summary/read

Request:

Code Block
{
    "request": {
        "userId": "{{userId}}", // required
        "collectionId" : "{{collectionId}}", // required
        "contextId": "{{batchId}}" //required
    }
}

Response:

Code Block
languagejson
{
  "id": "api.summary.read",
  "ver": "v1",
  "ts": "2021-06-23 05:59:54:984+0000",
  "params": {
    "resmsgid": null,
    "msgid": "95e4942d-cbe8-477d-aebd-ad8e6de4bfc8",
    "err": null,
    "status": "success",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
        "userId": "{{userId}}",
        "collectionId": "{{collectionId}}",
        "contextId": "{{batchId}}",
        "enrolledDate": 1624275377301,
     
  "activeresponseCode": true"OK",
        "contentStatus"result": {
          "{{contentId}}"userId": "{{statususerId}}",
        "collectionId": "{{collectionId}}",
        "assessmentStatuscontextId": {
 "{{batchId}}",
        "assessmentIdenrolledDate": {1624275377301,
            "scoreactive": {{best_score}},
   true,
        "max_scorecontentStatus": {{max_score}}
          "{{contentId}}": {{status}}
        },
        "collection": {
 
        "identifierassessmentStatus": "{{collectionId}}",
          "nameassessmentId": "{{collectionName}}",{
            "logoscore": "{{logo Urlbest_score}}",
            "leafNodesCountmax_score": {{leafNodeCountmax_score}},
          "description": "{{description}}"
        },
        "issuedCertificatescollection": [{
          "nameidentifier": "{{certNamecollectionId}}",
          "idname": "certificateId{{collectionName}}",
          "tokenlogo": "{{certTokenlogo Url}}",
          "lastIssuedOnleafNodesCount": "{{lastIssuedOnleafNodeCount}}",
          "description": }],"{{description}}"
        "completedOn": {{completion_date}},
        "progressissuedCertificates": {{progress}},[{
          "statusname": "{{statuscertName}}",
  } } 

Viewer Summary Delete

Expand
titleDELETE - /v1/summary/delete/:userId?all - To Delete all enrolments

Response:

Code Block
languagejson
Response:  {     "id": "api.summary.deletecertificateId",
          "vertoken": "v1{{certToken}}",
          "tslastIssuedOn": "2021-06-23 05:37:40:575+0000","{{lastIssuedOn}}"
       "params": { }],
        "resmsgidcompletedOn": null{{completion_date}},
        "msgidprogress": "5e763bc2-b072-440d-916e-da787881b1b9"{{progress}},
        "errstatus": null,{{status}}
  }
}

Viewer Summary Download - Default Format : CSV

Expand
titleGET - /v1/summary/download/:userId

Response:

Code Block
{
    "statusid": "successapi.summary.download",

       "errmsgver": null
    }"v1",
    "responseCodets": "OK2021-06-23 05:37:40:575+0000",
    "resultparams": {
        "{{userid}}resmsgid": :null,
"Enrolment Deleted Succesfully"     } }
Expand
titleDELETE - /v1/summary/delete/:userId - To Delete specific enrolments

Request:

Code Block
{"msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
        "requesterr": {null,
        "userIdstatus": "{{userId}}success",
        // required"errmsg": null
    },
    "collectionIdresponseCode" : "{{collectionId}}OK",
   // required
  "result": {
      "contextIdurl": "{{batchIduserId}}_viewer_summary.csv"
 // required     }
}
Expand
titleGET - /v1/summary/download/:userId?format=json

Response:

Code Block
languagejson
Response: 
{
    "id": "api.summary.deletedownload",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",+0000",
    "params": {
        "resmsgid": null,
        "msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
        "err": null,
        "paramsstatus": {"success",
        "resmsgiderrmsg": null,
    },
    "msgidresponseCode": "5e763bc2-b072-440d-916e-da787881b1b9OK",
    "result": {
      "errurl": null,
   "{{userId}}_viewer_summary.json"
    }
}

Viewer Summary Delete

Expand
titleDELETE - /v1/summary/delete/:userId?all - To Delete all enrolments

Response:

Code Block
languagejson
Response: 
{
    "statusid": "successapi.summary.delete",
   
    "errmsgver": null
    }"v1",
    "responseCodets": "OK2021-06-23 05:37:40:575+0000",
    "resultparams": {
      "{{userid}}" : "Enrolment Deleted Succesfullyresmsgid": null,
   } }

Viewer Summary Download - Default Format : CSV

Expand
titleGET - /v1/summary/download/:userId

Response:

Code Block
{
    "idmsgid": "api.summary.download",5e763bc2-b072-440d-916e-da787881b1b9",
        "vererr": "v1"null,
        "tsstatus": "2021-06-23 05:37:40:575+0000success",
        "paramserrmsg": null
{    },
    "resmsgidresponseCode": null"OK",
    "result": {
     "msgid{{userid}}" : "5e763bc2-b072-440d-916e-da787881b1b9",
 Enrolment Deleted Succesfully"
    }
 "err": null,
   }
GET - /v1/summary/download/:userId?format=json
Expand
titleDELETE - /v1/summary/delete/:userId - To Delete specific enrolments

Request:

Code Block
{
    "statusrequest": "success",{
        "errmsguserId": null
"{{userId}}",   // required
   },     "responseCodecollectionId" : "OK{{collectionId}}",  // required
 "result": {       "urlcontextId": "{{userIdbatchId}}_viewer_summary.csv"  // required
    }
}
Expand
title

Response:

Code Block
languagejson
Response: 
{
    "id": "api.summary.downloaddelete",
    "ver": "v1",
    "ts": "2021-06-23 05:37:40:575+0000",
    "params": {
        "resmsgid": null,
        "msgid": "5e763bc2-b072-440d-916e-da787881b1b9",
        "err": null,
        "status": "success",
        "errmsg": null
    },
    "responseCode": "OK",
    "result": {
      "url{{userid}}" : "{{userId}}_viewer_summary.jsonEnrolment Deleted Succesfully"
    }
}

Clarifications:

  • For assessment submit, do we need consider the assess events without context as well