Example JSON Request & Response - POST Item

https://...surpass.com/api/v2/Item/

Header:

Content-length: 1026
Content-type: application/json
Accept: application/json
Authorization: Basic Q1RMRGVtbzpQYXNzd29yZa==

Body:


{

            "subject": {

                        "id": 1427,

            },

            "folder": ,

            "name": "API test question 1",

            "questionText": "Sample Essay question",

            "htmlText": "Sample Essay question",

            "mark": 1,

            "seedUsageCount": 1,

            "seedPValue": 0,

            "status": "Draft",

            "itemPurpose": "Unspecified",

            "markingType": "Computer",

            "comment": "Comment 1",

            "generalFeedback": {

                        "text": "General feedback example",

                        "htmlText": "sample html text",

                        "mediaItems": [],

                        "sourceMaterials": []

            },

            "correctFeedback": null,

            "incorrectFeedback": null,

            "mediaItems": [],

            "sourceMaterials": [],

            "multipleChoiceQuestions": null,

            "multipleResponseQuestions": null,

            "essayQuestions": [{

                        "enableTextFormatting": true,

                        "maxCharacters": 250,

                        "displayCounter": true,

                        "numberOfLinesPerResponse": 0,

                        "wordCounterLabel": "Word Count"

            }],

            "shortAnswerQuestions": null,

            "eitherOrQuestions": null,

            "numericalEntryQuestions": null,

            "fillInTheBlankQuestions": null,

            "selectFromAListQuestions": null,

            "allowOpenImageInPopup": false,

            "mediaLayout": "AutoSelect"

}


Response:

{

  "id": 359381,

  "href": "https://...surpass.com/api/v2/Item/359381",

  "errors": null

}





Feedback and Knowledge Base