Content Copy API specification - For supporting CurriculumCourse

Overview

Content Copy API supports two types of copy: 1. Deep Copy and 2. Shallow Copy

As per the current requirement Content has to be copied with same TOC but with different contentType.

For Supporting this, we are proposing below request structure to support content copy to different contentType.

Content Copy API

POST - content/v3/Copy/{content_id}

Request Body

{
     "request": {

           "copysheme":{

                       "target": "CurriculumCourse"

           },

           "content": {

                       "name": "Copy Textbook to CurriculumCourse",
                       "framework":"TPD",
                       "organisation":["Ekstep"],
                       "createdBy":"ABC",
                       "createdFor":["ABC"],

            }

      }
}

Response - Successful

Draft version of the content is created.

{
    "id""api.content.copy",
    "ver""3.0",
    "ts""2020-04-23T09:01:06ZZ",
    "params": {
        "resmsgid""5f30b7bc-5c63-4ca6-9efc-a08957ac104f",
        "msgid"null,
        "err"null,
        "status""successful",
        "errmsg"null
    },
    "responseCode""OK",
    "result": {
        "node_id": {
            {content_id}: {copied_content_id}
        }
    }
}


Response - Fail

Content not found.

{
    "id""api.content.copy",
    "ver""3.0",
    "ts""2020-05-04T14:48:10ZZ",
    "params": {
        "resmsgid""cf01740f-1c24-4498-b5cc-e7f68778bc10",
        "msgid"null,
        "err""NOT_FOUND",
        "status""failed",
        "errmsg""Error! Node(s) doesn't Exists. | [Invalid Node Id.]: {content_id}"
    },
    "responseCode""RESOURCE_NOT_FOUND",
    "result": {
        "messages"null
    }
}