Versions Compared

Key

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

...

  • Step 1: Get the content which doesn't have itemset property using composite search

    Code Block
    languagejson
      EndPoint: /composite/v3/search
      requestParameters:  
      {
      		  "request": {
      		    "exists": "questions",
      		    "filters": {
      		      "contentType": "PracticeQuestionSet",
      		      "medium": "English",
      		      "objectType": "Content"
      		    },
      		    "not_exists": "itemSets",
      		    "sort_by": {
      		      "createdOn": "desc"
      		    }
      		  }
      		}
    
  • Step 2: Get the question from content

    Code Block
    languagetext
      EndPoint: /assessment/v3/items/read
    
  • Step 3: update the structure as per QUML version 1.0 which is to add editorState and responseDeclaration and update the question

    Code Block
      EndPoint: /assessment/v3/items/update/
    
  • Step 4: Create the itemset using items/Questions

    Code Block
      EndPoint: /itemset/v3/create
      requestParameter: 
      {
          "request": {
              "itemset": {
                  "code": uuidv4()UUID,
                  "name": value.name,
                  "description": value.name,
                  "language": _.split(value.language),
                  "owner": value.author,
                  "items": questionIdObjForItemsetitemset
              }
          }
      }
    
  • Step 5: update content with itemset

    Code Block
     	Endpoint: /content/v3/update/
     	requestParameters:
     	{
         "request": {
           "content": {
             "itemSets": [
               {
                 "identifier": itemSetIdentifier
               }
             ],
             "versionKey": versionKey
           }
         }
       }  
    
  • Step 6: Publish content if status of content is live

    Code Block
    languagejson
      	EndPoint: /content/v3/publish/
      	requestParameters:
      	 {
              "request": {
                "content": {
                  "publisher": "EkStep",
                  "lastPublishedBy": "EkStep"
                }
              }
            }