Content Discard API specification

Overview

Content Retire API retires the Live as well as Draft version of content. It is actually soft delete.

The requirement is to discard the edited version of content, but persisting the live version.

Content Discard API

DELETE - content/v3/discard/{content_id}

Request Body

{
     "request": {}
}

Response - Successful

Draft version of the content is deleted.

{
     "id": "ekstep.learning.content.discard",
     "ver": "3.0",
     "ts": "YYYY-MM-DDThh:mm:ssZ+/-nn.nn",
     "params": {
          "resmsgid": "",
          "msgid": "",
          "err": "",
          "status": "successful",
          "errmsg": ""
     },
     "responseCode": "OK",
     "result": {
          "node_id": "do_112352147776856064160",
          "message": "Draft version of content do_112352147776856064160 is discarded."
     }
}


Response - Fail

Content draft version is not available

{
     "id": "ekstep.learning.content.discard",
     "ver": "3.0",
     "ts": "YYYY-MM-DDThh:mm:ssZ+/-nn.nn",
     "params": {
          "resmsgid": "",
          "msgid": "",
          "err": "",
          "status": "failed",
          "errmsg": ""
     },
     "responseCode": "RESOURCE_NOT_FOUND",
     "result": {
          "node_id": "do_112352147776856064160",
          "message": "Draft version of content do_112352147776856064160 is not found."
     }
}