Versions Compared

Key

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

...

Once the view ends, the progress and score will be updated asynchronously by the flink jobs.

...

Assessment Flow:

...

Viewer-Service - Content Consumption Scenarios:

...

Expand
titlePOST - /v2/view/update

Request:

Code Block
languagejson
{
    "request": {
        "userId": "{{userId}}",
        "collectionId" : "{{collectionId}}",
        "batchId": "{{batchId}}",
        "contentId": "{{contentId}}",
        "progress": 34
    }
}

Response:

Code Block
languagejson
200 OK:
{
    "id": "api.view.update",
    "ver": "v2",
    "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}}": "SUCCESS"
    }
}

4XX or 5XX Error:
{
    "id": "api.view.update",
    "ver": "v2",
    "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": {
    }
}

Content View Submit Assess

Expand
titlePOST - /v2/viewassessment/assesssubmit

Request:

Code Block
languagejson
{
    "request": {
        "userId": "{{userId}}",
        "collectionId" : "{{collectionId}}",
        "batchId": "{{batchId}}",
        "contentId": "{{contentId}}",
        "assessments": [{
            {{assess_event}} //Mandatory for self-assess contents
        }]
    }
}

Response:

Code Block
{
    "id": "api.view.assess",
    "ver": "v2",
    "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}}": "SUCCESS"
    }
}

...