Example XML Request & Response - POST Item

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

Header:
Content-length: 1783
Content-type: application/xml

Accept: application/xml
Authorization: Basic Q1RMRGVtbzpQYXNzd29yZa==

Body:

<item xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

  <allowOpenImageInPopup>false</allowOpenImageInPopup>

  <comment>Sample comment 1</comment>

  <correctFeedback>

    <text>Correct feedback example</text>

  </correctFeedback>

  <folder>

    <id>0</id>

    <position>0</position>

  </folder>

  <incorrectFeedback>

    <text>Incorrect feedback example</text>

  </incorrectFeedback>

  <itemPurpose>Unspecified</itemPurpose>

  <mark>1</mark>

  <markingType>Computer</markingType>

  <mediaLayout>AutoSelect</mediaLayout>

  <multipleChoiceQuestions>

    <item>

      <addLabelsToOptions>true</addLabelsToOptions>

      <markType>Standard</markType>

      <optionList>

        <options>

          <itemOption>

            <contentType>RichText</contentType>

            <correct>true</correct>

            <id>1</id>

            <label>A</label>

            <text>Italy</text>

          </itemOption>

          <itemOption>

            <contentType>RichText</contentType>

            <correct>false</correct>

            <id>1</id>

            <label>B</label>

            <text>Spain</text>

          </itemOption>

          <itemOption>

            <contentType>RichText</contentType>

            <correct>false</correct>

            <id>1</id>

            <label>C</label>

            <text>France</text>

          </itemOption>

        </options>

      </optionList>

      <randomise>true</randomise>

    </item>

  </multipleChoiceQuestions>

  <name>JL Test MCQ</name>

  <questionText>Where would you find the Leaning Tower of Pisa?</questionText>

  <seedPValue>1</seedPValue>

  <seedUsageCount>1</seedUsageCount>

  <status>Draft</status>

  <subject>

    <id>1427</id>

    <reference></reference>

  </subject>

</item>


Response:

 <response xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

  <id>363134</id>

  <href>https://...surpass.com/api/v2/Item/363134</href>

  <errors i:nil="true" />

</response>

Feedback and Knowledge Base