openapi: 3.1.0
info:
  title: QTI API
  version: 1.0.0
  description: A robust assessment engine implementing the QTI 3.0 specification,
    designed for creating, managing, and delivering educational assessments.
servers:
  - url: https://qti.alpha-1edtech.ai/api
    description: Main Server
security:
  - OAuth2: []
  - MCP: []
tags:
  - name: Validation
    description: Validate XML strings against QTI compliant XSD files. XSD version
      supported is 3.0.0 (3p0)
  - name: Feedback
    description: Feedback for questions and lessons
  - name: Assessment Test Management
    description: Enables the management of Assessment Tests. Assessment Tests are
      the main entities that contain Assessment Test Parts, Sections, and
      Assessment Items.
  - name: Test Part Management
    description: Enables the management of Test Parts. Assessment Test Parts are
      used to group sections inside of an Assessment Test.
  - name: Section Management
    description: Enables the management of Sections. Assessment Sections are used to
      group Assessment Items.
  - name: Assessment Item Management
    description: Enables the management of Assessment ITems. Assessment Items are
      made up of QTI Interactions (e.g. questions, multiple choice, etc.).
  - name: Stimulus Management
    description: Enables the management of Stimuli. Stimuli are shared content
      pieces (text, images, audio, video) that provide context for assessment
      items and can be referenced by multiple questions.
paths:
  /stimuli:
    get:
      operationId: searchStimuli
      summary: Search and filter stimuli
      description: Get all stimuli on the service provider. Search with advanced
        filtering capabilities. Supports text search across titles and
        identifiers, sorting, and pagination.
      tags: &a1
        - Stimulus Management
      parameters:
        - in: query
          name: query
          description: Search title and identifier fields using a search term. This is a
            fuzzy search.
          schema:
            type: string
            description: Search title and identifier fields using a search term. This is a
              fuzzy search.
        - in: query
          name: page
          description: Page number for pagination
          schema:
            type: string
            default: "1"
            description: Page number for pagination
            example: 1
        - in: query
          name: limit
          description: Number of items per page
          schema:
            type: string
            default: "10"
            description: Number of items per page
            example: 10
        - in: query
          name: sort
          description: Field to sort by
          schema:
            type: string
            enum: &a17
              - title
              - identifier
              - createdAt
              - updatedAt
            description: Field to sort by
            example: createdAt
        - in: query
          name: order
          description: Sort order
          schema:
            type: string
            enum: &a2
              - asc
              - desc
            default: desc
            description: Sort order
            example: desc
      responses:
        "200":
          description: Successfully retrieved stimuli
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        title:
                          type: string
                          description: Human-readable title of the entity on the service provider.
                        catalogInfo:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                description: Catalog entry identifier (must be valid XML NCName). The unique
                                  identifier used to locate the catalog from a
                                  data-catalog-idref.
                              support:
                                type: string
                                description: This attribute names either pre-defined supports or a custom-named
                                  support. The named support will indicate for
                                  whom the dormant content is intended. Use only
                                  one card for any particular named support in a
                                  catalog
                              content:
                                type: string
                                description: A data structure within a catalog which contains dormant HTML
                                  content or a resource reference for a specific
                                  support/feature. A card may also contain
                                  multiple CardEntry containers. For example,
                                  you might have multiple CardEntry nodes for
                                  different language versions of a particular
                                  support.
                            required:
                              - id
                              - support
                              - content
                          description: Array of catalog cards.
                        label:
                          type: string
                          description: A human readable label that can be used to describe the Stimulus.
                        language:
                          type: string
                          description: The default language for the Stimulus.
                          default: en
                        stylesheet:
                          type: object
                          properties:
                            href:
                              type: string
                              description: The identifier or location of the external stylesheet.
                            type:
                              type: string
                              description: The type of the external stylesheet.
                          required:
                            - href
                            - type
                          description: The set of external style sheets that are associated with the
                            Stimulus. The order of definition is significant.
                        toolName:
                          type: string
                          description: The tool name characteristic allows the tool creating the stimulus
                            to identify itself. Other processing systems may use
                            this information to interpret the content of
                            application specific data, such as labels on the
                            elements of the stimulus's stimulus body.
                        toolVersion:
                          type: string
                          description: The tool version characteristic allows the tool creating the item
                            to identify its version. This value must only be
                            interpreted in the context of the tool-name.
                        metadata:
                          type: object
                          additionalProperties: {}
                          description: Additional custom metadata for extending entity properties beyond
                            standard specification for QTI entities.
                        rawXml:
                          type: string
                          description: Raw XML representation of the entity, automatically generated from
                            the JSON or XML sent when creating entities on the
                            service provider. The rawxml field will contain all
                            content sent when creating the entity on the service
                            provider. This field is stable and should be used
                            when working within this QTI API.
                        content:
                          type: object
                          properties:
                            qti-assessment-stimulus:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    xmlns:
                                      type: string
                                    xmlns:xsi:
                                      type: string
                                    xsi:schemaLocation:
                                      type: string
                                    identifier:
                                      type: string
                                    xml:lang:
                                      type: string
                                    title:
                                      type: string
                                  required:
                                    - xmlns
                                    - xmlns:xsi
                                    - xsi:schemaLocation
                                    - identifier
                                    - xml:lang
                                    - title
                                qti-stimulus-body:
                                  type: object
                                  additionalProperties: true
                                qti-stylesheet:
                                  type: object
                                  properties:
                                    _attributes:
                                      type: object
                                      properties:
                                        href:
                                          type: string
                                        type:
                                          type: string
                                      required:
                                        - href
                                        - type
                                  required:
                                    - _attributes
                                qti-catalog-info:
                                  type: object
                                  properties:
                                    qti-catalog:
                                      type: object
                                      properties:
                                        _attributes:
                                          type: object
                                          properties:
                                            id:
                                              type: string
                                          required:
                                            - id
                                        qti-card:
                                          type: object
                                          properties:
                                            _attributes:
                                              type: object
                                              properties:
                                                support:
                                                  type: string
                                              required:
                                                - support
                                            qti-html-content:
                                              type: object
                                              additionalProperties: true
                                          required:
                                            - _attributes
                                            - qti-html-content
                                      required:
                                        - _attributes
                                        - qti-card
                                  required:
                                    - qti-catalog
                              required:
                                - _attributes
                                - qti-stimulus-body
                          required:
                            - qti-assessment-stimulus
                          description: Parsed XML content generated by the service provider. For
                            production use, rawXml is recommended over this
                            parsed structure.
                        createdAt:
                          type: string
                          format: date-time
                          description: ISO 8601 timestamp when the entity was created
                        updatedAt:
                          type: string
                          format: date-time
                          description: ISO 8601 timestamp when the entity was last updated
                        __v:
                          type: number
                          description: MongoDB version key for optimistic concurrency control
                      required:
                        - identifier
                        - title
                        - catalogInfo
                        - rawXml
                        - content
                        - createdAt
                        - updatedAt
                      description: Complete stimulus data structure returned from the database
                        including parsed content and metadata
                    description: The items array will contain all stimuli that match the search
                      criteria on the service provider.
                  total:
                    type: number
                    description: The total number of entities that match the search criteria.
                  page:
                    type: number
                    description: The page number of the entities that match the search criteria.
                    default: 1
                  pages:
                    type: number
                    description: The total number of pages of entities that match the search
                      criteria.
                  limit:
                    type: number
                    description: The number of entities per page.
                    default: 10
                  sort:
                    type: string
                    description: The field to sort the entities by.
                  order:
                    type: string
                    enum: &a6
                      - asc
                      - desc
                    description: The order to sort the entities by. Either 'asc' or 'desc'.
                required:
                  - items
                  - total
                  - page
                  - pages
                  - limit
                  - sort
                  - order
                description: Paginated response containing all stimuli that match the search
                  criteria with navigation metadata
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
    post:
      operationId: createStimulus
      summary: Create a new stimulus
      description: Create a new Stimulus on the service provider. Stimuli can be
        referenced by Assessment Items.
      tags: *a1
      requestBody:
        description: The stimulus content to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Stimulus"
            examples:
              json-example:
                summary: JSON - Forest Ecosystem Stimulus Example
                value:
                  format: json
                  identifier: stimulus-science-ecosystems
                  title: Forest Ecosystem Reading Passage
                  content: "

                    \    <div class=\"stimulus-content\">

                    \      <h2>Forest Ecosystems</h2>

                    \      <p>A forest ecosystem is a complex community of
                    plants, animals, and microorganisms that interact with each
                    other and their physical environment. These ecosystems play
                    crucial roles in maintaining environmental balance and
                    supporting biodiversity.</p>

                    \      <h3>Layers of the Forest</h3>

                    \      <p><strong>Canopy Layer:</strong> The uppermost layer
                    formed by the crowns of tall trees. This layer receives the
                    most sunlight and is home to many birds, insects, and
                    mammals.</p>

                    \      <p><strong>Understory:</strong> Below the canopy,
                    this layer consists of smaller trees and shrubs that can
                    tolerate lower light conditions. Many flowering plants and
                    young trees grow here.</p>

                    \      <p><strong>Forest Floor:</strong> The ground level
                    where decomposition occurs. Fallen leaves, branches, and
                    other organic matter break down, providing nutrients for
                    plant growth.</p>

                    \      <h3>Ecological Relationships</h3>

                    \      <p>Forest ecosystems demonstrate various ecological
                    relationships:</p>

                    \      <ul>

                    \        <li><em>Producers:</em> Trees and plants that make
                    their own food through photosynthesis</li>

                    \        <li><em>Primary Consumers:</em> Herbivores that eat
                    plants, such as deer and rabbits</li>

                    \        <li><em>Secondary Consumers:</em> Carnivores that
                    eat herbivores, such as foxes and hawks</li>

                    \        <li><em>Decomposers:</em> Organisms like fungi and
                    bacteria that break down dead material</li>

                    \      </ul>

                    \    </div>

                    \  "
                  metadata:
                    subject: Science
                    grade: "7"
                    standard: Life Science
                    lesson: Ecosystems and Biodiversity
                    difficulty: medium
              xml-example:
                summary: XML - Forest Ecosystem Stimulus Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-stimulus
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_stimulusv3p0p1_v1p0.xsd"
                      identifier="stimulus-science-ecosystems"
                      xml:lang="en"
                      title="Forest Ecosystem Reading Passage">
                      <qti-stimulus-body>
                        <div class="stimulus-content">
                          <h2>Forest Ecosystems</h2>
                          <p>A forest ecosystem is a complex community of plants, animals, and microorganisms that interact with each other and their physical environment. These ecosystems play crucial roles in maintaining environmental balance and supporting biodiversity.</p>
                          
                          <h3>Layers of the Forest</h3>
                          <p><strong>Canopy Layer:</strong> The uppermost layer formed by the crowns of tall trees. This layer receives the most sunlight and is home to many birds, insects, and mammals.</p>
                          
                          <p><strong>Understory:</strong> Below the canopy, this layer consists of smaller trees and shrubs that can tolerate lower light conditions. Many flowering plants and young trees grow here.</p>
                          
                          <p><strong>Forest Floor:</strong> The ground level where decomposition occurs. Fallen leaves, branches, and other organic matter break down, providing nutrients for plant growth.</p>
                          
                          <h3>Ecological Relationships</h3>
                          <p>Forest ecosystems demonstrate various ecological relationships:</p>
                          <ul>
                            <li><em>Producers:</em> Trees and plants that make their own food through photosynthesis</li>
                            <li><em>Primary Consumers:</em> Herbivores that eat plants, such as deer and rabbits</li>
                            <li><em>Secondary Consumers:</em> Carnivores that eat herbivores, such as foxes and hawks</li>
                            <li><em>Decomposers:</em> Organisms like fungi and bacteria that break down dead material</li>
                          </ul>
                        </div>
                      </qti-stimulus-body>
                    </qti-assessment-stimulus>
                  metadata:
                    subject: Science
                    grade: "7"
                    standard: Life Science
                    lesson: Ecosystems and Biodiversity
                    difficulty: medium
      responses:
        "201":
          description: Stimulus created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  catalogInfo:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Catalog entry identifier (must be valid XML NCName). The unique
                            identifier used to locate the catalog from a
                            data-catalog-idref.
                        support:
                          type: string
                          description: This attribute names either pre-defined supports or a custom-named
                            support. The named support will indicate for whom
                            the dormant content is intended. Use only one card
                            for any particular named support in a catalog
                        content:
                          type: string
                          description: A data structure within a catalog which contains dormant HTML
                            content or a resource reference for a specific
                            support/feature. A card may also contain multiple
                            CardEntry containers. For example, you might have
                            multiple CardEntry nodes for different language
                            versions of a particular support.
                      required:
                        - id
                        - support
                        - content
                    description: Array of catalog cards.
                  label:
                    type: string
                    description: A human readable label that can be used to describe the Stimulus.
                  language:
                    type: string
                    description: The default language for the Stimulus.
                    default: en
                  stylesheet:
                    type: object
                    properties:
                      href:
                        type: string
                        description: The identifier or location of the external stylesheet.
                      type:
                        type: string
                        description: The type of the external stylesheet.
                    required:
                      - href
                      - type
                    description: The set of external style sheets that are associated with the
                      Stimulus. The order of definition is significant.
                  toolName:
                    type: string
                    description: The tool name characteristic allows the tool creating the stimulus
                      to identify itself. Other processing systems may use this
                      information to interpret the content of application
                      specific data, such as labels on the elements of the
                      stimulus's stimulus body.
                  toolVersion:
                    type: string
                    description: The tool version characteristic allows the tool creating the item
                      to identify its version. This value must only be
                      interpreted in the context of the tool-name.
                  metadata:
                    type: object
                    additionalProperties: {}
                    description: Additional custom metadata for extending entity properties beyond
                      standard specification for QTI entities.
                  rawXml:
                    type: string
                    description: Raw XML representation of the entity, automatically generated from
                      the JSON or XML sent when creating entities on the service
                      provider. The rawxml field will contain all content sent
                      when creating the entity on the service provider. This
                      field is stable and should be used when working within
                      this QTI API.
                  content:
                    type: object
                    properties:
                      qti-assessment-stimulus:
                        type: object
                        properties:
                          _attributes:
                            type: object
                            properties:
                              xmlns:
                                type: string
                              xmlns:xsi:
                                type: string
                              xsi:schemaLocation:
                                type: string
                              identifier:
                                type: string
                              xml:lang:
                                type: string
                              title:
                                type: string
                            required:
                              - xmlns
                              - xmlns:xsi
                              - xsi:schemaLocation
                              - identifier
                              - xml:lang
                              - title
                          qti-stimulus-body:
                            type: object
                            additionalProperties: true
                          qti-stylesheet:
                            type: object
                            properties:
                              _attributes:
                                type: object
                                properties:
                                  href:
                                    type: string
                                  type:
                                    type: string
                                required:
                                  - href
                                  - type
                            required:
                              - _attributes
                          qti-catalog-info:
                            type: object
                            properties:
                              qti-catalog:
                                type: object
                                properties:
                                  _attributes:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                    required:
                                      - id
                                  qti-card:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          support:
                                            type: string
                                        required:
                                          - support
                                      qti-html-content:
                                        type: object
                                        additionalProperties: true
                                    required:
                                      - _attributes
                                      - qti-html-content
                                required:
                                  - _attributes
                                  - qti-card
                            required:
                              - qti-catalog
                        required:
                          - _attributes
                          - qti-stimulus-body
                    required:
                      - qti-assessment-stimulus
                    description: Parsed XML content generated by the service provider. For
                      production use, rawXml is recommended over this parsed
                      structure.
                  createdAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was created
                  updatedAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was last updated
                  __v:
                    type: number
                    description: MongoDB version key for optimistic concurrency control
                required:
                  - identifier
                  - title
                  - catalogInfo
                  - rawXml
                  - content
                  - createdAt
                  - updatedAt
                description: Complete stimulus data structure returned from the database
                  including parsed content and metadata
        "400":
          description: Invalid stimulus data
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "409":
          description: Stimulus with this identifier already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /stimuli/{identifier}:
    get:
      operationId: getStimulus
      summary: Get a stimulus with its complete content
      description: Get a specific Stimulus by identifier from the service provider.
        Stimuli can be referenced by Assessment Items to display relevant
        content to the learner.
      tags: *a1
      parameters:
        - name: identifier
          description: Stimulus identifier
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successfully retrieved stimulus
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  catalogInfo:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Catalog entry identifier (must be valid XML NCName). The unique
                            identifier used to locate the catalog from a
                            data-catalog-idref.
                        support:
                          type: string
                          description: This attribute names either pre-defined supports or a custom-named
                            support. The named support will indicate for whom
                            the dormant content is intended. Use only one card
                            for any particular named support in a catalog
                        content:
                          type: string
                          description: A data structure within a catalog which contains dormant HTML
                            content or a resource reference for a specific
                            support/feature. A card may also contain multiple
                            CardEntry containers. For example, you might have
                            multiple CardEntry nodes for different language
                            versions of a particular support.
                      required:
                        - id
                        - support
                        - content
                    description: Array of catalog cards.
                  label:
                    type: string
                    description: A human readable label that can be used to describe the Stimulus.
                  language:
                    type: string
                    description: The default language for the Stimulus.
                    default: en
                  stylesheet:
                    type: object
                    properties:
                      href:
                        type: string
                        description: The identifier or location of the external stylesheet.
                      type:
                        type: string
                        description: The type of the external stylesheet.
                    required:
                      - href
                      - type
                    description: The set of external style sheets that are associated with the
                      Stimulus. The order of definition is significant.
                  toolName:
                    type: string
                    description: The tool name characteristic allows the tool creating the stimulus
                      to identify itself. Other processing systems may use this
                      information to interpret the content of application
                      specific data, such as labels on the elements of the
                      stimulus's stimulus body.
                  toolVersion:
                    type: string
                    description: The tool version characteristic allows the tool creating the item
                      to identify its version. This value must only be
                      interpreted in the context of the tool-name.
                  metadata:
                    type: object
                    additionalProperties: {}
                    description: Additional custom metadata for extending entity properties beyond
                      standard specification for QTI entities.
                  rawXml:
                    type: string
                    description: Raw XML representation of the entity, automatically generated from
                      the JSON or XML sent when creating entities on the service
                      provider. The rawxml field will contain all content sent
                      when creating the entity on the service provider. This
                      field is stable and should be used when working within
                      this QTI API.
                  content:
                    type: object
                    properties:
                      qti-assessment-stimulus:
                        type: object
                        properties:
                          _attributes:
                            type: object
                            properties:
                              xmlns:
                                type: string
                              xmlns:xsi:
                                type: string
                              xsi:schemaLocation:
                                type: string
                              identifier:
                                type: string
                              xml:lang:
                                type: string
                              title:
                                type: string
                            required:
                              - xmlns
                              - xmlns:xsi
                              - xsi:schemaLocation
                              - identifier
                              - xml:lang
                              - title
                          qti-stimulus-body:
                            type: object
                            additionalProperties: true
                          qti-stylesheet:
                            type: object
                            properties:
                              _attributes:
                                type: object
                                properties:
                                  href:
                                    type: string
                                  type:
                                    type: string
                                required:
                                  - href
                                  - type
                            required:
                              - _attributes
                          qti-catalog-info:
                            type: object
                            properties:
                              qti-catalog:
                                type: object
                                properties:
                                  _attributes:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                    required:
                                      - id
                                  qti-card:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          support:
                                            type: string
                                        required:
                                          - support
                                      qti-html-content:
                                        type: object
                                        additionalProperties: true
                                    required:
                                      - _attributes
                                      - qti-html-content
                                required:
                                  - _attributes
                                  - qti-card
                            required:
                              - qti-catalog
                        required:
                          - _attributes
                          - qti-stimulus-body
                    required:
                      - qti-assessment-stimulus
                    description: Parsed XML content generated by the service provider. For
                      production use, rawXml is recommended over this parsed
                      structure.
                  createdAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was created
                  updatedAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was last updated
                  __v:
                    type: number
                    description: MongoDB version key for optimistic concurrency control
                required:
                  - identifier
                  - title
                  - catalogInfo
                  - rawXml
                  - content
                  - createdAt
                  - updatedAt
                description: Complete stimulus data structure returned from the database
                  including parsed content and metadata
        "404":
          description: Stimulus not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
    put:
      operationId: updateStimulus
      summary: Update a stimulus and its content
      description: Update a Stimulus on the service provider.
      tags: *a1
      parameters:
        - name: identifier
          description: Stimulus identifier
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: The stimulus content to update.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Stimulus"
      responses:
        "200":
          description: Stimulus updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  catalogInfo:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Catalog entry identifier (must be valid XML NCName). The unique
                            identifier used to locate the catalog from a
                            data-catalog-idref.
                        support:
                          type: string
                          description: This attribute names either pre-defined supports or a custom-named
                            support. The named support will indicate for whom
                            the dormant content is intended. Use only one card
                            for any particular named support in a catalog
                        content:
                          type: string
                          description: A data structure within a catalog which contains dormant HTML
                            content or a resource reference for a specific
                            support/feature. A card may also contain multiple
                            CardEntry containers. For example, you might have
                            multiple CardEntry nodes for different language
                            versions of a particular support.
                      required:
                        - id
                        - support
                        - content
                    description: Array of catalog cards.
                  label:
                    type: string
                    description: A human readable label that can be used to describe the Stimulus.
                  language:
                    type: string
                    description: The default language for the Stimulus.
                    default: en
                  stylesheet:
                    type: object
                    properties:
                      href:
                        type: string
                        description: The identifier or location of the external stylesheet.
                      type:
                        type: string
                        description: The type of the external stylesheet.
                    required:
                      - href
                      - type
                    description: The set of external style sheets that are associated with the
                      Stimulus. The order of definition is significant.
                  toolName:
                    type: string
                    description: The tool name characteristic allows the tool creating the stimulus
                      to identify itself. Other processing systems may use this
                      information to interpret the content of application
                      specific data, such as labels on the elements of the
                      stimulus's stimulus body.
                  toolVersion:
                    type: string
                    description: The tool version characteristic allows the tool creating the item
                      to identify its version. This value must only be
                      interpreted in the context of the tool-name.
                  metadata:
                    type: object
                    additionalProperties: {}
                    description: Additional custom metadata for extending entity properties beyond
                      standard specification for QTI entities.
                  rawXml:
                    type: string
                    description: Raw XML representation of the entity, automatically generated from
                      the JSON or XML sent when creating entities on the service
                      provider. The rawxml field will contain all content sent
                      when creating the entity on the service provider. This
                      field is stable and should be used when working within
                      this QTI API.
                  content:
                    type: object
                    properties:
                      qti-assessment-stimulus:
                        type: object
                        properties:
                          _attributes:
                            type: object
                            properties:
                              xmlns:
                                type: string
                              xmlns:xsi:
                                type: string
                              xsi:schemaLocation:
                                type: string
                              identifier:
                                type: string
                              xml:lang:
                                type: string
                              title:
                                type: string
                            required:
                              - xmlns
                              - xmlns:xsi
                              - xsi:schemaLocation
                              - identifier
                              - xml:lang
                              - title
                          qti-stimulus-body:
                            type: object
                            additionalProperties: true
                          qti-stylesheet:
                            type: object
                            properties:
                              _attributes:
                                type: object
                                properties:
                                  href:
                                    type: string
                                  type:
                                    type: string
                                required:
                                  - href
                                  - type
                            required:
                              - _attributes
                          qti-catalog-info:
                            type: object
                            properties:
                              qti-catalog:
                                type: object
                                properties:
                                  _attributes:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                    required:
                                      - id
                                  qti-card:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          support:
                                            type: string
                                        required:
                                          - support
                                      qti-html-content:
                                        type: object
                                        additionalProperties: true
                                    required:
                                      - _attributes
                                      - qti-html-content
                                required:
                                  - _attributes
                                  - qti-card
                            required:
                              - qti-catalog
                        required:
                          - _attributes
                          - qti-stimulus-body
                    required:
                      - qti-assessment-stimulus
                    description: Parsed XML content generated by the service provider. For
                      production use, rawXml is recommended over this parsed
                      structure.
                  createdAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was created
                  updatedAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was last updated
                  __v:
                    type: number
                    description: MongoDB version key for optimistic concurrency control
                required:
                  - identifier
                  - title
                  - catalogInfo
                  - rawXml
                  - content
                  - createdAt
                  - updatedAt
                description: Complete stimulus data structure returned from the database
                  including parsed content and metadata
        "400":
          description: Invalid stimulus data
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "404":
          description: Stimulus not found or Failed to update Stimulus
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
    delete:
      operationId: deleteStimulus
      summary: Delete a stimulus
      description: "Permanently delete a stimulus. This operation cannot be undone.
        Warning: Assessment items that reference this stimulus may be affected.
        Consider checking for references before deletion."
      tags: *a1
      parameters:
        - name: identifier
          description: Stimulus identifier
          in: path
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
          content: {}
        "404":
          description: Stimulus not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-items:
    get:
      operationId: searchAssessmentItems
      summary: Search and filter assessment items
      description: Search and retrieve assessment items (questions) with advanced
        filtering capabilities. Supports text search across titles and
        identifiers, filtering by type, sorting, and pagination. Assessment
        items are the core content units that contain questions, answer choices,
        and scoring logic.
      tags: &a7
        - Assessment Item Management
      parameters:
        - in: query
          name: query
          description: Search title and identifier fields using a search term. This is a
            fuzzy search.
          schema:
            type: string
            description: Search title and identifier fields using a search term. This is a
              fuzzy search.
        - in: query
          name: page
          description: Page number for pagination
          schema:
            type: string
            default: "1"
            description: Page number for pagination
            example: 1
        - in: query
          name: limit
          description: Number of items per page
          schema:
            type: string
            default: "10"
            description: Number of items per page
            example: 10
        - in: query
          name: sort
          description: Field to sort by
          schema:
            type: string
            enum:
              - title
              - identifier
              - type
              - createdAt
              - updatedAt
            default: createdAt
            description: Field to sort by
            example: createdAt
        - in: query
          name: order
          description: Sort order
          schema:
            type: string
            enum: *a2
            default: desc
            description: Sort order
            example: desc
        - in: query
          name: filter
          description: "Advanced filter expression using =, !=, >, >=, <, <=, ~ and
            logical AND/OR. Example: type='choice'"
          schema:
            type: string
            description: "Advanced filter expression using =, !=, >, >=, <, <=, ~ and
              logical AND/OR. Example: type='choice'"
            example: type='choice'
        - in: query
          name: subject
          description: Filter by subject from qti-parent-tests array (indexed for fast
            lookup)
          schema:
            type: string
            description: Filter by subject from qti-parent-tests array (indexed for fast
              lookup)
            example: Math
        - in: query
          name: grade
          description: Filter by grade from qti-parent-tests array (indexed for fast lookup)
          schema:
            type: string
            description: Filter by grade from qti-parent-tests array (indexed for fast
              lookup)
            example: "5"
        - in: query
          name: type
          description: Filter by question type - native field with simple index
          schema:
            type: string
            description: Filter by question type - native field with simple index
            example: choice
        - in: query
          name: search
          description: Full-text search on qti-prompt-text field (uses text index)
          schema:
            type: string
            description: Full-text search on qti-prompt-text field (uses text index)
            example: pythagorean
      responses:
        "200":
          description: List of assessment items with pagination metadata
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        title:
                          type: string
                          description: Human-readable title of the entity on the service provider.
                        type:
                          type: string
                          enum: &a10
                            - choice
                            - text-entry
                            - extended-text
                            - inline-choice
                            - match
                            - order
                            - associate
                            - select-point
                            - graphic-order
                            - graphic-associate
                            - graphic-gap-match
                            - hotspot
                            - hottext
                            - slider
                            - drawing
                            - media
                            - upload
                          description: Assessment item interaction types that are supported by the service
                            provider.
                        customInteractionTypeIdentifier:
                          type: string
                          description: For portable-custom interactions, the
                            custom-interaction-type-identifier attribute from
                            the QTI XML element.
                        qtiVersion:
                          type: string
                          default: "3.0"
                          description: QTI version of the assessment item
                        timeDependent:
                          type: boolean
                          default: false
                          description: Indicates whether the candidate's response time affects the scoring
                            or outcome of this assessment item. When true,
                            timing data is used in response processing
                            calculations.
                        adaptive:
                          type: boolean
                          default: false
                          description: Indicates whether this assessment item adapts its presentation or
                            behavior based on the candidate's responses.
                            Adaptive items can modify their content, difficulty,
                            or available options during the assessment session.
                        responseDeclarations:
                          type: array
                          items:
                            type: object
                            properties:
                              identifier:
                                type: string
                                description: Unique identifier for this response variable within the item; must
                                  be distinct from other item variables and
                                  cannot use reserved names (completionStatus,
                                  numAttempts, duration).
                              cardinality:
                                type: string
                                enum: &a3
                                  - single
                                  - multiple
                                  - ordered
                                  - record
                                description: Specifies how many values the response variable can hold and
                                  whether order matters.
                              baseType:
                                type: string
                                enum: &a4
                                  - identifier
                                  - boolean
                                  - integer
                                  - float
                                  - string
                                  - point
                                  - pair
                                  - directedPair
                                  - duration
                                  - file
                                  - uri
                                description: Primitive data type for each answer stored in the variable (e.g.,
                                  integer, string, boolean). Omit when
                                  cardinality is 'record', because each field in
                                  a record may have its own type.
                              correctResponse:
                                type: object
                                properties:
                                  value:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - value
                                description: Optional model answer; must conform to the variable's cardinality
                                  (single = one value, multiple/ordered =
                                  ordered or unordered list); omit when no
                                  optimal answer exists (e.g., essays); delivery
                                  engines may display it as the solution in
                                  review mode.
                            required:
                              - identifier
                              - cardinality
                              - correctResponse
                        outcomeDeclarations:
                          type: array
                          items:
                            type: object
                            properties:
                              identifier:
                                type: string
                                description: Unique identifier for this response variable within the item; must
                                  be distinct from other item variables and
                                  cannot use reserved names (completionStatus,
                                  numAttempts, duration).
                              cardinality:
                                type: string
                                enum: *a3
                                description: Specifies how many values the response variable can hold and
                                  whether order matters.
                              baseType:
                                type: string
                                enum: *a4
                                description: Primitive data type for each answer stored in the variable (e.g.,
                                  integer, string, boolean). Omit when
                                  cardinality is 'record', because each field in
                                  a record may have its own type.
                            required:
                              - identifier
                              - cardinality
                        responseProcessing:
                          type: object
                          properties:
                            templateType:
                              type: string
                              enum: &a11
                                - match_correct
                                - map_response
                              description: Response processing template type. 'match_correct' compares the
                                candidate's response directly against the
                                correct response and assigns binary feedback.
                                'map_response' uses mapping rules to assign
                                scores and feedback based on response values.
                            responseDeclarationIdentifier:
                              type: string
                              description: Identifier of the response declaration that this response
                                processing rule applies to. Must match an
                                existing responseDeclaration identifier within
                                the same assessment item.
                            outcomeIdentifier:
                              type: string
                              description: Identifier of the outcome variable that will be set by this
                                response processing rule. Common values include
                                'SCORE' for numeric scoring or 'FEEDBACK' for
                                feedback identifiers.
                            correctResponseIdentifier:
                              type: string
                              description: Identifier value assigned to the outcome variable when the
                                candidate's response is evaluated as correct.
                                Used primarily with match_correct template type.
                            incorrectResponseIdentifier:
                              type: string
                              description: Identifier value assigned to the outcome variable when the
                                candidate's response is evaluated as incorrect.
                                Used primarily with match_correct template type.
                            inlineFeedback:
                              type: object
                              properties:
                                outcomeIdentifier:
                                  type: string
                                  description: Identifier of the outcome variable to be set with the inline
                                    feedback value.
                                variableIdentifier:
                                  type: string
                                  description: Identifier of the variable whose value will be assigned to the
                                    outcome variable during response processing.
                              required:
                                - outcomeIdentifier
                                - variableIdentifier
                              description: Optional inline feedback configuration that sets an outcome
                                variable based on another variable's value
                                during response processing.
                          required:
                            - templateType
                            - responseDeclarationIdentifier
                            - outcomeIdentifier
                            - correctResponseIdentifier
                            - incorrectResponseIdentifier
                          description: Response processing is the process by which the Delivery Engine
                            assigns outcomes based on the candidate's responses.
                            The outcomes may be used to provide feedback to the
                            candidate. Response processing must only take place
                            in direct response to a user action or in response
                            to some expected event, such as the end of a test.
                        metadata:
                          type: object
                          properties:
                            subject:
                              type: string
                              description: Subject area for the assessment item
                              example: Math
                            grade:
                              type: string
                              enum: &a12
                                - "-1"
                                - "0"
                                - "1"
                                - "2"
                                - "3"
                                - "4"
                                - "5"
                                - "6"
                                - "7"
                                - "8"
                                - "9"
                                - "10"
                                - "11"
                                - "12"
                                - "13"
                              description: Grade level for the assessment item. Must use a value from K-12
                              example: "10"
                            difficulty:
                              type: string
                              enum: &a13
                                - easy
                                - medium
                                - hard
                              description: Difficulty level of the assessment item
                              example: easy
                            learningObjectiveSet:
                              type: array
                              items:
                                type: object
                                properties:
                                  source:
                                    type: string
                                    description: The source of the learning objective set or learning standards.
                                    example: CASE
                                  learningObjectiveIds:
                                    type: array
                                    items:
                                      type: string
                                    description: Array of learning objective identifiers. If source is 'CASE', these
                                      can be the CFItem sourcedIds or CFItem's
                                      Human Coding Schema.
                                    example: &a14
                                      - D1.5.6-8
                                      - C2.6.7-8
                                      - E3.1.2-3
                                required:
                                  - source
                                  - learningObjectiveIds
                              description: Learning objectives associated with this assessment item
                              example: &a15
                                - source: CASE
                                  learningObjectiveIds:
                                    - id-123
                                    - id-456
                                    - id-789
                          additionalProperties: true
                          description: Additional custom metadata for assessment items with validation for
                            specific fields used by external applications
                        rawXml:
                          type: string
                          description: Raw XML representation of the entity, automatically generated from
                            the JSON or XML sent when creating entities on the
                            service provider. The rawxml field will contain all
                            content sent when creating the entity on the service
                            provider. This field is stable and should be used
                            when working within this QTI API.
                        content:
                          type: object
                          properties:
                            qti-assessment-item:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    xmlns:
                                      type: string
                                    xmlns:xsi:
                                      type: string
                                    xsi:schemaLocation:
                                      type: string
                                    identifier:
                                      type: string
                                    title:
                                      type: string
                                    adaptive:
                                      type: string
                                    time-dependent:
                                      type: string
                                  required:
                                    - xmlns
                                    - xmlns:xsi
                                    - xsi:schemaLocation
                                    - identifier
                                    - title
                                    - adaptive
                                    - time-dependent
                                qti-response-declaration:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          identifier:
                                            type: string
                                          cardinality:
                                            type: string
                                          baseType:
                                            type: string
                                        required:
                                          - identifier
                                          - cardinality
                                          - baseType
                                      qti-correct-response:
                                        type: object
                                        properties:
                                          qti-value:
                                            type: array
                                            items:
                                              type: string
                                        required:
                                          - qti-value
                                    required:
                                      - _attributes
                                      - qti-correct-response
                                qti-outcome-declaration:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          identifier:
                                            type: string
                                          cardinality:
                                            type: string
                                          baseType:
                                            type: string
                                        required:
                                          - identifier
                                          - cardinality
                                          - baseType
                                    required:
                                      - _attributes
                                qti-assessment-stimulus-ref:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          identifier:
                                            type: string
                                          href:
                                            type: string
                                          title:
                                            type: string
                                        required:
                                          - identifier
                                          - href
                                          - title
                                    required:
                                      - _attributes
                                qti-item-body: {}
                                qti-response-processing: {}
                              required:
                                - _attributes
                                - qti-response-declaration
                                - qti-outcome-declaration
                          required:
                            - qti-assessment-item
                          description: Parsed XML content generated by the service provider. For
                            production use, rawXml is recommended over this
                            parsed structure.
                        modalFeedback:
                          type: array
                          items:
                            type: object
                            properties:
                              outcomeIdentifier:
                                type: string
                                description: Identifier of the outcome variable that controls when this feedback
                                  is displayed. The feedback is shown or hidden
                                  based on the value of this outcome variable
                                  after response processing.
                              identifier:
                                type: string
                                description: Unique identifier for this specific feedback element within the
                                  assessment item. Used to reference and control
                                  this particular piece of feedback.
                              showHide:
                                type: string
                                enum: &a5
                                  - show
                                  - hide
                                description: Determines the feedback visibility behavior. 'show' displays the
                                  feedback when the outcome variable matches the
                                  identifier, 'hide' conceals it when the
                                  outcome variable matches.
                              content:
                                type: string
                                description: The HTML or text content to be displayed as feedback to the
                                  candidate.
                              title:
                                type: string
                                description: Optional title displayed in the modal feedback dialog header. Only
                                  used with modal feedback presentations.
                            required:
                              - outcomeIdentifier
                              - identifier
                              - showHide
                              - content
                              - title
                          description: Modal feedback shown to candidates in popup dialogs immediately
                            following response processing. Cannot contain
                            interaction elements and is displayed based on
                            outcome variable values.
                        feedbackInline:
                          type: array
                          items:
                            type: object
                            properties:
                              outcomeIdentifier:
                                type: string
                                description: Identifier of the outcome variable that controls when this feedback
                                  is displayed. The feedback is shown or hidden
                                  based on the value of this outcome variable
                                  after response processing.
                              identifier:
                                type: string
                                description: Unique identifier for this specific feedback element within the
                                  assessment item. Used to reference and control
                                  this particular piece of feedback.
                              showHide:
                                type: string
                                enum: *a5
                                description: Determines the feedback visibility behavior. 'show' displays the
                                  feedback when the outcome variable matches the
                                  identifier, 'hide' conceals it when the
                                  outcome variable matches.
                              content:
                                type: string
                                description: The HTML or text content to be displayed as feedback to the
                                  candidate.
                              class:
                                type: array
                                items:
                                  type: string
                                description: CSS class names applied to the feedback element for styling
                                  purposes. Multiple classes can be specified
                                  for flexible presentation control.
                            required:
                              - outcomeIdentifier
                              - identifier
                              - showHide
                              - content
                              - class
                          description: Inline feedback embedded within interaction elements, displayed
                            alongside choices or input areas. Provides
                            contextual feedback.
                        feedbackBlock:
                          type: array
                          items:
                            type: object
                            properties:
                              outcomeIdentifier:
                                type: string
                                description: Identifier of the outcome variable that controls when this feedback
                                  is displayed. The feedback is shown or hidden
                                  based on the value of this outcome variable
                                  after response processing.
                              identifier:
                                type: string
                                description: Unique identifier for this specific feedback element within the
                                  assessment item. Used to reference and control
                                  this particular piece of feedback.
                              showHide:
                                type: string
                                enum: *a5
                                description: Determines the feedback visibility behavior. 'show' displays the
                                  feedback when the outcome variable matches the
                                  identifier, 'hide' conceals it when the
                                  outcome variable matches.
                              content:
                                type: string
                                description: The HTML or text content to be displayed as feedback to the
                                  candidate.
                              class:
                                type: array
                                items:
                                  type: string
                                description: CSS class names applied to the feedback element for styling
                                  purposes. Multiple classes can be specified
                                  for flexible presentation control.
                            required:
                              - outcomeIdentifier
                              - identifier
                              - showHide
                              - content
                              - class
                          description: Inline feedback embedded within interaction elements, displayed
                            alongside choices or input areas. Provides
                            contextual feedback.
                        createdAt:
                          type: string
                          format: date-time
                          description: ISO 8601 timestamp when the entity was created
                        updatedAt:
                          type: string
                          format: date-time
                          description: ISO 8601 timestamp when the entity was last updated
                        __v:
                          type: number
                          description: MongoDB version key for optimistic concurrency control
                      required:
                        - identifier
                        - title
                        - type
                        - qtiVersion
                        - timeDependent
                        - adaptive
                        - rawXml
                        - content
                        - createdAt
                        - updatedAt
                    description: Array of assessment items that match the search criteria
                  total:
                    type: number
                    description: The total number of entities that match the search criteria.
                  page:
                    type: number
                    description: The page number of the entities that match the search criteria.
                    default: 1
                  pages:
                    type: number
                    description: The total number of pages of entities that match the search
                      criteria.
                  limit:
                    type: number
                    description: The number of entities per page.
                    default: 10
                  sort:
                    type: string
                    description: The field to sort the entities by.
                  order:
                    type: string
                    enum: *a6
                    description: The order to sort the entities by. Either 'asc' or 'desc'.
                required:
                  - items
                  - total
                  - page
                  - pages
                  - limit
                  - sort
                  - order
                description: Paginated response containing all assessment items available on the
                  service provider with navigation metadata
        "400":
          description: Validation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: High-level error message
                  code:
                    type: string
                    description: Machine code identifying error type
                  details:
                    type: string
                    description: Additional human details
                  meta:
                    type: object
                    properties:
                      issues:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              description: Parameter name
                            message:
                              type: string
                              description: Validation message
                            code:
                              type: string
                              description: Zod issue code
                          required:
                            - field
                            - message
                            - code
                        description: Array of individual validation errors
                      eventId:
                        type: string
                        description: Sentry event id
                    required:
                      - issues
                    description: Structured metadata from validation layer
                required:
                  - error
                  - code
                  - meta
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
    post:
      operationId: createAssessmentItem
      summary: Create a new assessment item
      description: "Create a QTI 3.0 assessment item, preferably from XML. Send
        format: 'xml' with the XML string in the body; the XML is validated
        against IMS QTI XSDs and must conform to the standard. JSON creation is
        also supported but is experimental and may change."
      tags: *a7
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AssessmentItem"
            examples: &a16
              xml-choice:
                summary: XML - Choice Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-choice-item-1"
                      title="Sample Choice Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="identifier">
                        <qti-correct-response>
                          <qti-value>B</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>
                      <qti-outcome-declaration identifier="FEEDBACK-INLINE" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Math Context"/>
                      <qti-assessment-stimulus-ref identifier="Stimulus2" href="stimuli/Stimulus2" title="Additional Context"/>

                      <qti-item-body>
                        <qti-choice-interaction response-identifier="RESPONSE" shuffle="false" max-choices="1">
                          <qti-prompt>What is 2 + 2?</qti-prompt>
                          <qti-simple-choice identifier="A">
                            3
                            <qti-feedback-inline outcome-identifier="FEEDBACK-INLINE" identifier="A" show-hide="show">
                              <span style="color: #D9534F;">Incorrect: Try counting again.</span>
                            </qti-feedback-inline>
                          </qti-simple-choice>
                          <qti-simple-choice identifier="B">
                            4
                            <qti-feedback-inline outcome-identifier="FEEDBACK-INLINE" identifier="B" show-hide="show">
                              <span style="color: #2E8B57;">Correct: Well done!</span>
                            </qti-feedback-inline>
                          </qti-simple-choice>
                        </qti-choice-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: Math
                    grade: "5"
                    standard: Number Operations
                    lesson: Basic Addition
                    difficulty: hard
              xml-text-entry:
                summary: XML - Text Entry Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-text-entry-item-1"
                      title="Robust Text Entry Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="string">
                        <qti-correct-response>
                          <qti-value>Paris</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>
                      <qti-outcome-declaration identifier="FEEDBACK-INLINE" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Geography Context"/>

                      <qti-item-body>
                        <p>
                          What is the capital of France?
                          <qti-text-entry-interaction response-identifier="RESPONSE" expected-length="5" pattern-mask="[A-Za-z]+" placeholder-text="Enter city name"/>
                        </p>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                            <qti-set-outcome-value identifier="FEEDBACK-INLINE">
                              <qti-base-value base-type="identifier">B</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                            <qti-set-outcome-value identifier="FEEDBACK-INLINE">
                              <qti-base-value base-type="identifier">A</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK-INLINE" identifier="A" show-hide="show" class="text-danger">
                        <qti-content-body>
                          <span style="color:#D9534F;">Incorrect: The capital of France is Paris.</span>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK-INLINE" identifier="B" show-hide="show" class="text-success">
                        <qti-content-body>
                          <span style="color:#2E8B57;">Correct!</span>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: Geography
                    grade: "5"
                    standard: World Capitals
                    lesson: European Capitals
                    difficulty: easy
              xml-inline-choice:
                summary: XML - Inline Choice Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-inline-choice-item-1"
                      title="Robust Inline Choice Cloze Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="identifier">
                        <qti-correct-response>
                          <qti-value>B</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>
                      <qti-outcome-declaration identifier="FEEDBACK-INLINE" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" />

                      <qti-item-body>
                        <p>The capital of France is
                          <qti-inline-choice-interaction response-identifier="RESPONSE" shuffle="false">
                            <qti-inline-choice identifier="A">London</qti-inline-choice>
                            <qti-inline-choice identifier="B">Paris</qti-inline-choice>
                            <qti-inline-choice identifier="C">Berlin</qti-inline-choice>
                            <qti-inline-choice identifier="D">Madrid</qti-inline-choice>
                          </qti-inline-choice-interaction>.
                        </p>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: Geography
                    grade: "4"
                    standard: World Capitals
                    lesson: European Capitals
                    difficulty: easy
              xml-extended-text:
                summary: XML - Extended Text Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-extended-text-item-1"
                      title="Robust Extended Text Essay Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="string">
                        <qti-correct-response>
                          <qti-value></qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>
                      <qti-outcome-declaration identifier="SCORE" cardinality="single" base-type="float"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="ELA Context"/>

                      <qti-item-body>
                        <qti-extended-text-interaction response-identifier="RESPONSE" expected-length="200" expected-lines="10" format="plain" max-strings="1" min-strings="1" pattern-mask="[a-zA-Z0-9\s\p{P}]*">
                          <qti-prompt>Write a short essay about your favorite book.</qti-prompt>
                        </qti-extended-text-interaction>
                      </qti-item-body>

                      <qti-response-processing template="map_response">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-not>
                              <qti-is-null>
                                <qti-variable identifier="RESPONSE"/>
                              </qti-is-null>
                            </qti-not>
                            <qti-set-outcome-value identifier="SCORE">
                              <qti-base-value base-type="float">1.0</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="SCORE" identifier="COMPLETED" show-hide="show" title="Essay Submitted">
                        <qti-content-body>
                          <p>Your essay has been submitted and will be scored shortly.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: ELA
                    grade: "8"
                    standard: Writing
                    lesson: Personal Narrative
                    difficulty: hard
              xml-match:
                summary: XML - Match Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-match-item-1"
                      title="Robust Country-Capital Match Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="multiple" base-type="directedPair">
                        <qti-correct-response>
                          <qti-value>C1 T1</qti-value>
                          <qti-value>C2 T2</qti-value>
                          <qti-value>C3 T3</qti-value>
                          <qti-value>C4 T4</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Geography Context"/>
                      <qti-assessment-stimulus-ref identifier="Stimulus2" href="stimuli/Stimulus2" title="European Map"/>

                      <qti-item-body>
                        <qti-match-interaction response-identifier="RESPONSE" shuffle="true" max-associations="4">
                          <qti-prompt>Match each country with its capital.</qti-prompt>
                          <qti-simple-match-set>
                            <qti-simple-associable-choice identifier="C1" match-max="1">France</qti-simple-associable-choice>
                            <qti-simple-associable-choice identifier="C2" match-max="1">Germany</qti-simple-associable-choice>
                            <qti-simple-associable-choice identifier="C3" match-max="1">Italy</qti-simple-associable-choice>
                            <qti-simple-associable-choice identifier="C4" match-max="1">Spain</qti-simple-associable-choice>
                          </qti-simple-match-set>
                          <qti-simple-match-set>
                            <qti-simple-associable-choice identifier="T1" match-max="1">Paris</qti-simple-associable-choice>
                            <qti-simple-associable-choice identifier="T2" match-max="1">Berlin</qti-simple-associable-choice>
                            <qti-simple-associable-choice identifier="T3" match-max="1">Rome</qti-simple-associable-choice>
                            <qti-simple-associable-choice identifier="T4" match-max="1">Madrid</qti-simple-associable-choice>
                          </qti-simple-match-set>
                        </qti-match-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: Geography
                    grade: "6"
                    standard: World Capitals
                    lesson: European Geography
                    difficulty: medium
              xml-order:
                summary: XML - Order Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-order-item-1"
                      title="Robust Historical Events Ordering Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="ordered" base-type="identifier">
                        <qti-correct-response>
                          <qti-value>C1</qti-value>
                          <qti-value>C2</qti-value>
                          <qti-value>C3</qti-value>
                          <qti-value>C4</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="History Context"/>

                      <qti-item-body>
                        <qti-order-interaction response-identifier="RESPONSE" shuffle="true" orientation="vertical">
                          <qti-prompt>Place these historical events in chronological order (earliest to latest).</qti-prompt>
                          <qti-simple-choice identifier="C1">Declaration of Independence (1776)</qti-simple-choice>
                          <qti-simple-choice identifier="C2">Constitution Ratified (1788)</qti-simple-choice>
                          <qti-simple-choice identifier="C3">Louisiana Purchase (1803)</qti-simple-choice>
                          <qti-simple-choice identifier="C4">Civil War Begins (1861)</qti-simple-choice>
                        </qti-order-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: History
                    grade: "7"
                    standard: Chronology
                    lesson: American History Timeline
                    difficulty: medium
              xml-associate:
                summary: XML - Associate Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-associate-item-1"
                      title="Robust Country–Capital Association Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="multiple" base-type="directedPair">
                        <qti-correct-response>
                          <qti-value>C1 T1</qti-value>
                          <qti-value>C2 T2</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Geography Context"/>

                      <qti-item-body>
                        <qti-associate-interaction response-identifier="RESPONSE" shuffle="false" max-associations="4">
                          <qti-prompt>Associate each country with its capital.</qti-prompt>
                          <qti-simple-associable-choice identifier="C1" match-max="1">France</qti-simple-associable-choice>
                          <qti-simple-associable-choice identifier="C2" match-max="1">Germany</qti-simple-associable-choice>
                          <qti-simple-associable-choice identifier="T1" match-max="1">Paris</qti-simple-associable-choice>
                          <qti-simple-associable-choice identifier="T2" match-max="1">Berlin</qti-simple-associable-choice>
                        </qti-associate-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: Geography
                    grade: "6"
                    standard: World Capitals
                    lesson: European Capitals
                    difficulty: medium
              xml-select-point:
                summary: XML - Select Point Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-select-point-item-1"
                      title="Robust Map Location Selection Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="multiple" base-type="point">
                        <qti-correct-response>
                          <qti-value>200 300</qti-value>
                          <qti-value>400 500</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Geography Context"/>

                      <qti-item-body>
                        <qti-select-point-interaction response-identifier="RESPONSE" max-choices="2" min-choices="1">
                          <qti-prompt>Select two major cities on the map.</qti-prompt>
                          <object data="https://example.com/map-image.jpg" width="800" height="600" type="image/jpeg"/>
                        </qti-select-point-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: Geography
                    grade: "6"
                    standard: Map Skills
                    lesson: Major World Cities
                    difficulty: medium
              xml-graphic-order:
                summary: XML - Graphic Order Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-graphic-order-item-1"
                      title="Robust Timeline Graphic Order Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="ordered" base-type="identifier">
                        <qti-correct-response>
                          <qti-value>EVENT1</qti-value>
                          <qti-value>EVENT2</qti-value>
                          <qti-value>EVENT3</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="History Context"/>

                      <qti-item-body>
                        <qti-graphic-order-interaction response-identifier="RESPONSE" shuffle="true">
                          <qti-prompt>Order these 20th-century events chronologically on the timeline.</qti-prompt>
                          <object data="data:image/png;base64,PLACEHOLDER" width="800" height="400" type="image/png"/>
                          <qti-hotspot-choice identifier="EVENT1" shape="rect" coords="50,50,150,100" />
                          <qti-hotspot-choice identifier="EVENT2" shape="rect" coords="200,50,300,100" />
                          <qti-hotspot-choice identifier="EVENT3" shape="rect" coords="350,50,450,100" />
                        </qti-graphic-order-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: History
                    grade: "8"
                    standard: Chronology
                    lesson: 20th Century Events
                    difficulty: medium
              xml-graphic-associate:
                summary: XML - Graphic Associate Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-graphic-associate-item-1"
                      title="Robust Map Landmark Association Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="multiple" base-type="directedPair">
                        <qti-correct-response>
                          <qti-value>C1 C2</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Geography Context"/>

                      <qti-item-body>
                        <qti-graphic-associate-interaction response-identifier="RESPONSE" max-associations="4">
                          <qti-prompt>Match city markers to landmarks.</qti-prompt>
                          <object data="data:image/png;base64,PLACEHOLDER" width="800" height="600" type="image/png"/>
                          <qti-associable-hotspot identifier="C1" shape="circle" coords="100,100,10" match-max="1" />
                          <qti-associable-hotspot identifier="C2" shape="circle" coords="200,200,10" match-max="1" />
                        </qti-graphic-associate-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: Geography
                    grade: "7"
                    standard: Cartography
                    lesson: Landmark Identification
                    difficulty: medium
              xml-graphic-gap-match:
                summary: XML - Graphic Gap Match Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-graphic-gap-match-item-1"
                      title="Robust Graphic Gap Match Map Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="multiple" base-type="directedPair">
                        <qti-correct-response>
                          <qti-value>GAP1 SPOT1</qti-value>
                          <qti-value>GAP2 SPOT2</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Geography Context"/>

                      <qti-item-body>
                        <qti-graphic-gap-match-interaction response-identifier="RESPONSE" shuffle="false">
                          <qti-prompt>Drag each city label to its correct location on the map.</qti-prompt>
                          <object data="data:image/png;base64,PLACEHOLDER" width="800" height="600" type="image/png"/>
                          <qti-gap-img identifier="GAP1" match-max="1">
                            <object data="data:image/png;base64,PLACEHOLDER" width="50" height="30" type="image/png"/>
                          </qti-gap-img>
                          <qti-gap-img identifier="GAP2" match-max="1">
                            <object data="data:image/png;base64,PLACEHOLDER" width="50" height="30" type="image/png"/>
                          </qti-gap-img>
                          <qti-associable-hotspot identifier="SPOT1" shape="circle" coords="100,100,20" match-max="1"/>
                          <qti-associable-hotspot identifier="SPOT2" shape="rect" coords="200,200,250,250" match-max="1"/>
                        </qti-graphic-gap-match-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: Geography
                    grade: "7"
                    standard: Map Skills
                    lesson: Label Placement
                    difficulty: medium
              xml-hotspot:
                summary: XML - Hotspot Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-hotspot-item-1"
                      title="Robust Region Selection Hotspot Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="multiple" base-type="identifier">
                        <qti-correct-response>
                          <qti-value>REGION1</qti-value>
                          <qti-value>REGION2</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Geography Context"/>

                      <qti-item-body>
                        <qti-hotspot-interaction response-identifier="RESPONSE" max-choices="2">
                          <qti-prompt>Select the two regions that are known for their historical landmarks.</qti-prompt>
                          <object data="data:image/png;base64,PLACEHOLDER" width="800" height="600" type="image/png"/>
                          <qti-hotspot-choice identifier="REGION1" shape="rect" coords="100,100,200,200"/>
                          <qti-hotspot-choice identifier="REGION2" shape="circle" coords="300,300,50"/>
                          <qti-hotspot-choice identifier="REGION3" shape="poly" coords="500,100,600,100,550,200"/>
                        </qti-hotspot-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: Geography
                    grade: "5"
                    standard: Map Skills
                    lesson: Landmark Regions
                    difficulty: easy
              xml-hottext:
                summary: XML - Hottext Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-hottext-item-1"
                      title="Robust Hottext Reading Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="multiple" base-type="identifier">
                        <qti-correct-response>
                          <qti-value>H1</qti-value>
                          <qti-value>H2</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="English Context"/>

                      <qti-item-body>
                        <qti-hottext-interaction response-identifier="RESPONSE">
                          <qti-prompt>Select the highlighted terms in the paragraph.</qti-prompt>
                          <p>This is a <qti-hottext identifier="H1">sample</qti-hottext> text with another <qti-hottext identifier="H2">example</qti-hottext>.</p>
                        </qti-hottext-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show" title="Great Job!">
                        <qti-content-body>
                          <p>You correctly selected all highlighted terms.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show" title="Review Needed">
                        <qti-content-body>
                          <p>Please reread the passage and select the highlighted words.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: ELA
                    grade: "6"
                    standard: Reading Comprehension
                    lesson: Vocabulary in Context
                    difficulty: medium
              xml-slider:
                summary: XML - Slider Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-slider-item-1"
                      title="Robust Temperature Slider Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="float">
                        <qti-correct-response>
                          <qti-value>20</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Science Context"/>

                      <qti-item-body>
                        <qti-slider-interaction response-identifier="RESPONSE" lower-bound="0" upper-bound="50" step="1" orientation="horizontal">
                          <qti-prompt>Set the slider to room temperature in Celsius.</qti-prompt>
                        </qti-slider-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: Science
                    grade: "5"
                    standard: Thermodynamics
                    lesson: Temperature Scales
                    difficulty: medium
              xml-drawing:
                summary: XML - Drawing Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-drawing-item-1"
                      title="Robust Drawing Task"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="file">
                        <qti-correct-response>
                          <qti-value></qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Art Context"/>

                      <qti-item-body>
                        <qti-drawing-interaction response-identifier="RESPONSE">
                          <qti-prompt>Draw a simple house with a door and two windows.</qti-prompt>
                          <object data="data:image/png;base64,PLACEHOLDER" width="800" height="600" type="image/png"/>
                        </qti-drawing-interaction>
                      </qti-item-body>

                      <qti-response-processing template="map_response">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-not>
                              <qti-is-null>
                                <qti-variable identifier="RESPONSE"/>
                              </qti-is-null>
                            </qti-not>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">SUBMITTED</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: Art
                    grade: "6"
                    standard: Creative Expression
                    lesson: Basic Shapes
                    difficulty: easy
              xml-media:
                summary: XML - Media Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-media-item-1"
                      title="Robust Media Analysis Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="string">
                        <qti-correct-response>
                          <qti-value>Inertia</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Physics Context"/>

                      <qti-item-body>
                        <qti-media-interaction response-identifier="RESPONSE" autostart="true" min-plays="0" max-plays="2" loop="false">
                          <qti-prompt>Watch the video and identify the key concept.</qti-prompt>
                          <object data="https://example.com/sample-video.mp4" width="640" height="360" type="video/mp4"/>
                        </qti-media-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: Science
                    grade: "8"
                    standard: Physics – Motion
                    lesson: Newton's Laws
                    difficulty: medium
              xml-upload:
                summary: XML - Upload Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-upload-item-1"
                      title="Robust File Upload Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="string">
                        <qti-correct-response>
                          <qti-value></qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus-Upload1" href="stimuli/Stimulus-Upload1" title="English Context"/>

                      <qti-item-body>
                        <qti-upload-interaction response-identifier="RESPONSE">
                          <qti-prompt>Upload your completed persuasive essay as a PDF.</qti-prompt>
                        </qti-upload-interaction>
                      </qti-item-body>

                      <qti-response-processing template="map_response">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-not>
                              <qti-is-null>
                                <qti-variable identifier="RESPONSE"/>
                              </qti-is-null>
                            </qti-not>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">SUBMITTED</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: English
                    grade: "7"
                    standard: Writing Assessment
                    lesson: Persuasive Essay
                    difficulty: hard
              xml-gap-match:
                summary: XML - Gap Match Example
                value:
                  format: xml
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-gap-match-item-1"
                      title="Robust Text Gap Match Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="multiple" base-type="directedPair">
                        <qti-correct-response>
                          <qti-value>DRAG1 GAP1</qti-value>
                          <qti-value>DRAG2 GAP2</qti-value>
                          <qti-value>DRAG3 GAP3</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Science Context"/>

                      <qti-item-body>
                        <qti-gap-match-interaction response-identifier="RESPONSE" shuffle="true">
                          <qti-prompt>Drag the correct words to complete the sentences about the water cycle.</qti-prompt>

                          <qti-gap-text identifier="DRAG1" match-max="1">evaporation</qti-gap-text>
                          <qti-gap-text identifier="DRAG2" match-max="1">condensation</qti-gap-text>
                          <qti-gap-text identifier="DRAG3" match-max="1">precipitation</qti-gap-text>
                          <qti-gap-text identifier="DRAG4" match-max="1">sublimation</qti-gap-text>

                          <p>The water cycle consists of several key processes:</p>
                          <ol>
                            <li><p>When water heats up and turns into vapor, this process is called <qti-gap identifier="GAP1" required="true"/>.</p></li>
                            <li><p>When water vapor cools and forms droplets in clouds, this is called <qti-gap identifier="GAP2" required="true"/>.</p></li>
                            <li><p>When water falls from clouds as rain, snow, or hail, this is called <qti-gap identifier="GAP3" required="true"/>.</p></li>
                          </ol>
                        </qti-gap-match-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Excellent!</strong> You correctly identified all the water cycle processes.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Try again.</strong> Review the definitions of each water cycle process.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
                  metadata:
                    subject: Science
                    grade: "4"
                    standard: Earth Science
                    lesson: Water Cycle
                    difficulty: medium
              json-choice:
                summary: JSON - Choice Example (Experimental)
                value:
                  format: json
                  identifier: choice-item-1
                  type: choice
                  title: Sample Choice Question
                  metadata:
                    subject: Math
                    grade: "5"
                    standard: Number Operations
                    lesson: Basic Addition
                    difficulty: hard
                  interaction:
                    type: choice
                    responseIdentifier: RESPONSE
                    shuffle: false
                    maxChoices: 1
                    questionStructure:
                      prompt: What is 2 + 2?
                      choices:
                        - identifier: A
                          content: "3"
                          feedbackInline: '<span style="color: #D9534F;">Incorrect: Try counting
                            again.</span>'
                          feedbackOutcomeIdentifier: FEEDBACK-INLINE
                        - identifier: B
                          content: "4"
                          feedbackInline: '<span style="color: #2E8B57;">Correct: Well done!</span>'
                          feedbackOutcomeIdentifier: FEEDBACK-INLINE
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: single
                      baseType: identifier
                      correctResponse:
                        value:
                          - B
                  outcomeDeclarations: &a8
                    - identifier: FEEDBACK
                      cardinality: single
                      baseType: identifier
                    - identifier: FEEDBACK-INLINE
                      cardinality: single
                      baseType: identifier
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  feedbackBlock: &a9
                    - outcomeIdentifier: FEEDBACK
                      identifier: CORRECT
                      showHide: show
                      content: <p><strong>Correct!</strong> Well done.</p>
                    - outcomeIdentifier: FEEDBACK
                      identifier: INCORRECT
                      showHide: show
                      content: <p><strong>Incorrect.</strong> Please review and try again.</p>
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: <p>Grading Criteria:</p><ul><li>The response must correctly identify 4 as
                        the answer.</li><li>Partial credit may be awarded for
                        showing work.</li></ul>
                  stimulus:
                    identifier: Stimulus1
                experimental: true
              json-text-entry:
                summary: JSON - Text Entry Example (Experimental)
                value:
                  format: json
                  identifier: text-entry-item-1
                  type: text-entry
                  title: Robust Text Entry Question
                  metadata:
                    subject: Geography
                    grade: "5"
                    standard: World Capitals
                    lesson: European Capitals
                    difficulty: easy
                  interaction:
                    type: text-entry
                    responseIdentifier: RESPONSE
                    attributes:
                      expected-length: 5
                      pattern-mask: "[A-Za-z]+"
                      placeholder: Enter city name
                    questionStructure:
                      prompt: What is the capital of France?
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: single
                      baseType: string
                      correctResponse:
                        value:
                          - Paris
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  feedbackInline:
                    - outcomeIdentifier: FEEDBACK-INLINE
                      identifier: A
                      showHide: show
                      content: '<span style="color:#D9534F;">Incorrect: The capital of France is
                        Paris.</span>'
                      class:
                        - text-danger
                    - outcomeIdentifier: FEEDBACK-INLINE
                      identifier: B
                      showHide: show
                      content: <span style="color:#2E8B57;">Correct!</span>
                      class:
                        - text-success
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Award credit for the exact answer &quot;Paris&quot;.</p>"
                  stimulus:
                    identifier: Stimulus1
                experimental: true
              json-extended-text:
                summary: JSON - Extended Text Example (Experimental)
                value:
                  format: json
                  identifier: extended-text-item-1
                  type: extended-text
                  title: Robust Extended Text Essay Question
                  metadata:
                    subject: ELA
                    grade: "8"
                    standard: Writing
                    lesson: Personal Narrative
                    difficulty: hard
                  interaction:
                    type: extended-text
                    responseIdentifier: RESPONSE
                    questionStructure:
                      prompt: Write a short essay about your favorite book.
                      expectedLength: 200
                      expectedLines: 10
                      format: plain
                      maxStrings: 1
                      minStrings: 1
                      patternMask: "[a-zA-Z0-9\\s\\p{P}]*"
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: single
                      baseType: string
                      correctResponse:
                        value:
                          - ""
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: map_response
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: SCORE
                    correctResponseIdentifier: ""
                    incorrectResponseIdentifier: ""
                  modalFeedback:
                    - outcomeIdentifier: SCORE
                      identifier: COMPLETED
                      showHide: show
                      title: Essay Submitted
                      content: <p>Your essay has been submitted and will be scored shortly.</p>
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Essays will be scored on idea development, organization,
                        voice, word choice, sentence fluency, and
                        conventions.</p>"
                  stimulus:
                    identifier: Stimulus1
                experimental: true
              json-inline-choice:
                summary: JSON - Inline Choice Example (Experimental)
                value:
                  format: json
                  identifier: inline-choice-item-1
                  type: inline-choice
                  title: Robust Inline Choice Cloze Question
                  metadata:
                    subject: Geography
                    grade: "4"
                    standard: World Capitals
                    lesson: European Capitals
                    difficulty: easy
                  interaction:
                    type: inline-choice
                    responseIdentifier: RESPONSE
                    questionStructure:
                      prompt: The capital of France is _____.
                      inlineChoices:
                        - identifier: A
                          content: London
                        - identifier: B
                          content: Paris
                        - identifier: C
                          content: Berlin
                        - identifier: D
                          content: Madrid
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: single
                      baseType: identifier
                      correctResponse:
                        value:
                          - B
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  feedbackBlock: *a9
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: '<p>Rubric: Award full credit for selecting "Paris".</p>'
                  stimulus:
                    identifier: Stimulus1
                experimental: true
              json-match:
                summary: JSON - Match Example (Experimental)
                value:
                  format: json
                  identifier: match-item-1
                  type: match
                  title: Robust Country-Capital Match Question
                  metadata:
                    subject: Geography
                    grade: "6"
                    standard: World Capitals
                    lesson: European Geography
                    difficulty: medium
                  interaction:
                    type: match
                    responseIdentifier: RESPONSE
                    shuffle: true
                    maxAssociations: 4
                    questionStructure:
                      prompt: Match each country with its capital.
                      sourceChoices:
                        - identifier: C1
                          content: France
                        - identifier: C2
                          content: Germany
                        - identifier: C3
                          content: Italy
                        - identifier: C4
                          content: Spain
                      targetChoices:
                        - identifier: T1
                          content: Paris
                        - identifier: T2
                          content: Berlin
                        - identifier: T3
                          content: Rome
                        - identifier: T4
                          content: Madrid
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: multiple
                      baseType: directedPair
                      correctResponse:
                        value:
                          - - C1
                            - T1
                          - - C2
                            - T2
                          - - C3
                            - T3
                          - - C4
                            - T4
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  feedbackBlock: *a9
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Full credit requires correctly matching all four pairs.</p>"
                  stimulus:
                    - identifier: Stimulus1
                    - identifier: Stimulus2
                experimental: true
              json-order:
                summary: JSON - Order Example (Experimental)
                value:
                  format: json
                  identifier: order-item-1
                  type: order
                  title: Robust Historical Events Ordering Question
                  metadata:
                    subject: History
                    grade: "7"
                    standard: Chronology
                    lesson: American History Timeline
                    difficulty: medium
                  interaction:
                    type: order
                    responseIdentifier: RESPONSE
                    shuffle: true
                    orientation: vertical
                    questionStructure:
                      prompt: Place these historical events in chronological order (earliest to
                        latest).
                      choices:
                        - identifier: C1
                          content: Declaration of Independence (1776)
                        - identifier: C2
                          content: Constitution Ratified (1788)
                        - identifier: C3
                          content: Louisiana Purchase (1803)
                        - identifier: C4
                          content: Civil War Begins (1861)
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: ordered
                      baseType: identifier
                      correctResponse:
                        value:
                          - C1
                          - C2
                          - C3
                          - C4
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  feedbackBlock: *a9
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Full credit requires correct chronological ordering.</p>"
                  stimulus:
                    identifier: Stimulus1
                experimental: true
              json-associate:
                summary: JSON - Associate Example (Experimental)
                value:
                  format: json
                  identifier: associate-item-1
                  type: associate
                  title: Robust Country–Capital Association Question
                  metadata:
                    subject: Geography
                    grade: "6"
                    standard: World Capitals
                    lesson: European Capitals
                    difficulty: medium
                  interaction:
                    type: associate
                    responseIdentifier: RESPONSE
                    shuffle: false
                    maxAssociations: 4
                    questionStructure:
                      prompt: Associate each country with its capital.
                      sourceChoices:
                        - identifier: C1
                          content: France
                        - identifier: C2
                          content: Germany
                      targetChoices:
                        - identifier: T1
                          content: Paris
                        - identifier: T2
                          content: Berlin
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: multiple
                      baseType: directedPair
                      correctResponse:
                        value:
                          - - C1
                            - T1
                          - - C2
                            - T2
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  feedbackBlock: *a9
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Award points for each correct country–capital pair.</p>"
                  stimulus:
                    - identifier: Stimulus1
                    - identifier: Stimulus2
                experimental: true
              json-select-point:
                summary: JSON - Select Point Example (Experimental)
                value:
                  format: json
                  identifier: select-point-item-1
                  type: select-point
                  title: Robust Map Location Selection Question
                  metadata:
                    subject: Geography
                    grade: "6"
                    standard: Map Skills
                    lesson: Major World Cities
                    difficulty: medium
                  interaction:
                    type: select-point
                    responseIdentifier: RESPONSE
                    maxChoices: 2
                    minChoices: 1
                    questionStructure:
                      prompt: Select two major cities on the map.
                      object:
                        data: https://example.com/map-image.jpg
                        width: 800
                        height: 600
                        type: image/jpeg
                        mediaType: image/jpeg
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: multiple
                      baseType: point
                      correctResponse:
                        value:
                          - 200 300
                          - 400 500
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  feedbackBlock: *a9
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Full credit requires selecting both city points
                        accurately.</p>"
                  stimulus:
                    identifier: Stimulus1
                experimental: true
              json-graphic-order:
                summary: JSON - Graphic Order Example (Experimental)
                value:
                  format: json
                  identifier: graphic-order-item-1
                  type: graphic-order
                  title: Robust Timeline Graphic Order Question
                  metadata:
                    subject: History
                    grade: "8"
                    standard: Chronology
                    lesson: 20th Century Events
                    difficulty: medium
                  interaction:
                    type: graphic-order
                    responseIdentifier: RESPONSE
                    shuffle: true
                    questionStructure:
                      prompt: Order these 20th-century events chronologically on the timeline.
                      object:
                        data: data:image/png;base64,PLACEHOLDER
                        width: 800
                        height: 400
                        type: image/png
                        mediaType: image/png
                      orderChoices:
                        - identifier: EVENT1
                          label: World War I (1914)
                          shape: rect
                          coords: 50,50,150,100
                        - identifier: EVENT2
                          label: Great Depression (1929)
                          shape: rect
                          coords: 200,50,300,100
                        - identifier: EVENT3
                          label: Moon Landing (1969)
                          shape: rect
                          coords: 350,50,450,100
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: ordered
                      baseType: identifier
                      correctResponse:
                        value:
                          - EVENT1
                          - EVENT2
                          - EVENT3
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  feedbackBlock: *a9
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Full credit for correct chronological ordering of all
                        events.</p>"
                  stimulus:
                    identifier: Stimulus1
                experimental: true
              json-graphic-associate:
                summary: JSON - Graphic Associate Example (Experimental)
                value:
                  format: json
                  identifier: graphic-associate-item-1
                  type: graphic-associate
                  title: Robust Map Landmark Association Question
                  metadata:
                    subject: Geography
                    grade: "7"
                    standard: Cartography
                    lesson: Landmark Identification
                    difficulty: medium
                  interaction:
                    type: graphic-associate
                    responseIdentifier: RESPONSE
                    maxAssociations: 4
                    shuffle: false
                    questionStructure:
                      prompt: Match city markers to landmarks.
                      object:
                        data: data:image/png;base64,PLACEHOLDER
                        width: 800
                        height: 600
                        type: image/png
                        mediaType: image/png
                      associableHotspots:
                        - identifier: C1
                          shape: circle
                          coords: 100,100,10
                          matchMax: 1
                          label: City Hall
                        - identifier: C2
                          shape: circle
                          coords: 200,200,10
                          matchMax: 1
                          label: Museum
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: multiple
                      baseType: directedPair
                      correctResponse:
                        value:
                          - C1 C2
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  feedbackBlock: *a9
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Award points for each correct landmark association.</p>"
                  stimulus:
                    - identifier: Stimulus1
                    - identifier: Stimulus2
                experimental: true
              json-graphic-gap-match:
                summary: JSON - Graphic Gap Match Example (Experimental)
                value:
                  format: json
                  identifier: graphic-gap-match-item-1
                  type: graphic-gap-match
                  title: Robust Graphic Gap Match Map Question
                  metadata:
                    subject: Geography
                    grade: "7"
                    standard: Map Skills
                    lesson: Label Placement
                    difficulty: medium
                  interaction:
                    type: graphic-gap-match
                    responseIdentifier: RESPONSE
                    shuffle: false
                    questionStructure:
                      prompt: Drag each city label to its correct location on the map.
                      object:
                        data: data:image/png;base64,PLACEHOLDER
                        width: 800
                        height: 600
                        type: image/png
                        mediaType: image/png
                      gapImgs:
                        - identifier: GAP1
                          matchMax: 1
                          object:
                            data: data:image/png;base64,PLACEHOLDER
                            width: 50
                            height: 30
                            type: image/png
                        - identifier: GAP2
                          matchMax: 1
                          object:
                            data: data:image/png;base64,PLACEHOLDER
                            width: 50
                            height: 30
                            type: image/png
                      associableHotspots:
                        - identifier: SPOT1
                          shape: circle
                          coords: 100,100,20
                          matchMax: 1
                        - identifier: SPOT2
                          shape: rect
                          coords: 200,200,250,250
                          matchMax: 1
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: multiple
                      baseType: directedPair
                      correctResponse:
                        value:
                          - GAP1 SPOT1
                          - GAP2 SPOT2
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  feedbackBlock: *a9
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Award points for each correctly placed label.</p>"
                  stimulus:
                    identifier: Stimulus1
                experimental: true
              json-hotspot:
                summary: JSON - Hotspot Example (Experimental)
                value:
                  format: json
                  identifier: hotspot-item-1
                  type: hotspot
                  title: Robust Region Selection Hotspot Question
                  metadata:
                    subject: Geography
                    grade: "5"
                    standard: Map Skills
                    lesson: Landmark Regions
                    difficulty: easy
                  interaction:
                    type: hotspot
                    responseIdentifier: RESPONSE
                    maxChoices: 2
                    questionStructure:
                      prompt: Select the two regions that are known for their historical landmarks.
                      object:
                        data: data:image/png;base64,PLACEHOLDER
                        width: 800
                        height: 600
                        type: image/png
                        mediaType: image/png
                      hotspots:
                        - identifier: REGION1
                          shape: rect
                          coords: 100,100,200,200
                        - identifier: REGION2
                          shape: circle
                          coords: 300,300,50
                        - identifier: REGION3
                          shape: poly
                          coords: 500,100,600,100,550,200
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: multiple
                      baseType: identifier
                      correctResponse:
                        value:
                          - REGION1
                          - REGION2
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  feedbackBlock: *a9
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Full credit for selecting both correct regions.</p>"
                  stimulus:
                    identifier: Stimulus1
                experimental: true
              json-hottext:
                summary: JSON - Hottext Example (Experimental)
                value:
                  format: json
                  identifier: hottext-item-1
                  type: hottext
                  title: Robust Hottext Reading Question
                  metadata:
                    subject: ELA
                    grade: "6"
                    standard: Reading Comprehension
                    lesson: Vocabulary in Context
                    difficulty: medium
                  interaction:
                    type: hottext
                    responseIdentifier: RESPONSE
                    questionStructure:
                      prompt: Select the highlighted terms in the paragraph.
                      text: <p>This is a <hottext identifier="H1">sample</hottext> text with another
                        <hottext identifier="H2">example</hottext>.</p>
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: multiple
                      baseType: identifier
                      correctResponse:
                        value:
                          - H1
                          - H2
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  modalFeedback:
                    - outcomeIdentifier: FEEDBACK
                      identifier: CORRECT
                      showHide: show
                      title: Great Job!
                      content: <p>You correctly selected all highlighted terms.</p>
                    - outcomeIdentifier: FEEDBACK
                      identifier: INCORRECT
                      showHide: show
                      title: Review Needed
                      content: <p>Please reread the passage and select the highlighted words.</p>
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Full credit requires selecting both highlighted terms.</p>"
                  stimulus:
                    identifier: Stimulus1
                experimental: true
              json-slider:
                summary: JSON - Slider Example (Experimental)
                value:
                  format: json
                  identifier: slider-item-1
                  type: slider
                  title: Robust Temperature Slider Question
                  metadata:
                    subject: Science
                    grade: "5"
                    standard: Thermodynamics
                    lesson: Temperature Scales
                    difficulty: medium
                  interaction:
                    type: slider
                    responseIdentifier: RESPONSE
                    lower-bound: 0
                    upper-bound: 50
                    step: 1
                    orientation: horizontal
                    questionStructure:
                      prompt: Set the slider to room temperature in Celsius.
                      object:
                        data: https://example.com/temperature-scale.jpg
                        width: 800
                        height: 100
                        type: image/jpeg
                        mediaType: image/jpeg
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: single
                      baseType: float
                      correctResponse:
                        value:
                          - "20"
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  feedbackBlock: *a9
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Full credit for selecting exactly 20°C. Partial credit for
                        19-21°C.</p>"
                  stimulus:
                    identifier: Stimulus1
                experimental: true
              json-drawing:
                summary: JSON - Drawing Example (Experimental)
                value:
                  format: json
                  identifier: drawing-item-1
                  type: drawing
                  title: Robust Drawing Task
                  metadata:
                    subject: Art
                    grade: "6"
                    standard: Creative Expression
                    lesson: Basic Shapes
                    difficulty: easy
                  interaction:
                    type: drawing
                    responseIdentifier: RESPONSE
                    questionStructure:
                      prompt: Draw a simple house with a door and two windows.
                      canvas:
                        width: 800
                        height: 600
                      object:
                        data: data:image/png;base64,PLACEHOLDER
                        width: 800
                        height: 600
                        type: image/png
                        mediaType: image/png
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: single
                      baseType: file
                      correctResponse:
                        value:
                          - ""
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: map_response
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: SUBMITTED
                    incorrectResponseIdentifier: NOT_SUBMITTED
                  feedbackBlock: *a9
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: The house should include a rectangular body, a triangular
                        roof, one door, and two windows.</p>"
                  stimulus:
                    identifier: Stimulus1
                experimental: true
              json-media:
                summary: JSON - Media Example (Experimental)
                value:
                  format: json
                  identifier: media-item-1
                  type: media
                  title: Robust Media Analysis Question
                  metadata:
                    subject: Science
                    grade: "8"
                    standard: Physics – Motion
                    lesson: Newton's Laws
                    difficulty: medium
                  interaction:
                    type: media
                    responseIdentifier: RESPONSE
                    autostart: true
                    minPlays: 0
                    maxPlays: 2
                    loop: false
                    questionStructure:
                      prompt: Watch the video and identify the key concept.
                      object:
                        data: https://example.com/sample-video.mp4
                        width: 640
                        height: 360
                        type: video/mp4
                        mediaType: video/mp4
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: single
                      baseType: string
                      correctResponse:
                        value:
                          - Inertia
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: match_correct
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: CORRECT
                    incorrectResponseIdentifier: INCORRECT
                  feedbackBlock: *a9
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Answers should clearly state the concept of inertia and
                        reference examples from the video.</p>"
                  stimulus:
                    identifier: Stimulus1
                experimental: true
              json-upload:
                summary: JSON - Upload Example (Experimental)
                value:
                  format: json
                  identifier: upload-item-1
                  type: upload
                  title: Robust File Upload Question
                  metadata:
                    subject: English
                    grade: "7"
                    standard: Writing Assessment
                    lesson: Persuasive Essay
                    difficulty: hard
                  interaction:
                    type: upload
                    responseIdentifier: RESPONSE
                    questionStructure:
                      prompt: Upload your completed persuasive essay as a PDF.
                      allowedTypes:
                        - application/pdf
                      maxSize: 10485760
                      maxFiles: 1
                  responseDeclarations:
                    - identifier: RESPONSE
                      cardinality: single
                      baseType: string
                      correctResponse:
                        value:
                          - ""
                  outcomeDeclarations: *a8
                  responseProcessing:
                    templateType: map_response
                    responseDeclarationIdentifier: RESPONSE
                    outcomeIdentifier: FEEDBACK
                    correctResponseIdentifier: SUBMITTED
                    incorrectResponseIdentifier: NOT_SUBMITTED
                  feedbackBlock: *a9
                  rubrics:
                    - use: ext:criteria
                      view: scorer
                      body: "<p>Rubric: Essays will be scored on clarity, structure, and persuasive
                        techniques.</p>"
                  stimulus:
                    identifier: Stimulus-Upload1
                experimental: true
      responses:
        "201":
          description: Assessment item created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  type:
                    type: string
                    enum: *a10
                    description: Assessment item interaction types that are supported by the service
                      provider.
                  customInteractionTypeIdentifier:
                    type: string
                    description: For portable-custom interactions, the
                      custom-interaction-type-identifier attribute from the QTI
                      XML element.
                  qtiVersion:
                    type: string
                    default: "3.0"
                    description: QTI version of the assessment item
                  timeDependent:
                    type: boolean
                    default: false
                    description: Indicates whether the candidate's response time affects the scoring
                      or outcome of this assessment item. When true, timing data
                      is used in response processing calculations.
                  adaptive:
                    type: boolean
                    default: false
                    description: Indicates whether this assessment item adapts its presentation or
                      behavior based on the candidate's responses. Adaptive
                      items can modify their content, difficulty, or available
                      options during the assessment session.
                  responseDeclarations:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for this response variable within the item; must
                            be distinct from other item variables and cannot use
                            reserved names (completionStatus, numAttempts,
                            duration).
                        cardinality:
                          type: string
                          enum: *a3
                          description: Specifies how many values the response variable can hold and
                            whether order matters.
                        baseType:
                          type: string
                          enum: *a4
                          description: Primitive data type for each answer stored in the variable (e.g.,
                            integer, string, boolean). Omit when cardinality is
                            'record', because each field in a record may have
                            its own type.
                        correctResponse:
                          type: object
                          properties:
                            value:
                              type: array
                              items:
                                type: string
                          required:
                            - value
                          description: Optional model answer; must conform to the variable's cardinality
                            (single = one value, multiple/ordered = ordered or
                            unordered list); omit when no optimal answer exists
                            (e.g., essays); delivery engines may display it as
                            the solution in review mode.
                      required:
                        - identifier
                        - cardinality
                        - correctResponse
                  outcomeDeclarations:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for this response variable within the item; must
                            be distinct from other item variables and cannot use
                            reserved names (completionStatus, numAttempts,
                            duration).
                        cardinality:
                          type: string
                          enum: *a3
                          description: Specifies how many values the response variable can hold and
                            whether order matters.
                        baseType:
                          type: string
                          enum: *a4
                          description: Primitive data type for each answer stored in the variable (e.g.,
                            integer, string, boolean). Omit when cardinality is
                            'record', because each field in a record may have
                            its own type.
                      required:
                        - identifier
                        - cardinality
                  responseProcessing:
                    type: object
                    properties:
                      templateType:
                        type: string
                        enum: *a11
                        description: Response processing template type. 'match_correct' compares the
                          candidate's response directly against the correct
                          response and assigns binary feedback. 'map_response'
                          uses mapping rules to assign scores and feedback based
                          on response values.
                      responseDeclarationIdentifier:
                        type: string
                        description: Identifier of the response declaration that this response
                          processing rule applies to. Must match an existing
                          responseDeclaration identifier within the same
                          assessment item.
                      outcomeIdentifier:
                        type: string
                        description: Identifier of the outcome variable that will be set by this
                          response processing rule. Common values include
                          'SCORE' for numeric scoring or 'FEEDBACK' for feedback
                          identifiers.
                      correctResponseIdentifier:
                        type: string
                        description: Identifier value assigned to the outcome variable when the
                          candidate's response is evaluated as correct. Used
                          primarily with match_correct template type.
                      incorrectResponseIdentifier:
                        type: string
                        description: Identifier value assigned to the outcome variable when the
                          candidate's response is evaluated as incorrect. Used
                          primarily with match_correct template type.
                      inlineFeedback:
                        type: object
                        properties:
                          outcomeIdentifier:
                            type: string
                            description: Identifier of the outcome variable to be set with the inline
                              feedback value.
                          variableIdentifier:
                            type: string
                            description: Identifier of the variable whose value will be assigned to the
                              outcome variable during response processing.
                        required:
                          - outcomeIdentifier
                          - variableIdentifier
                        description: Optional inline feedback configuration that sets an outcome
                          variable based on another variable's value during
                          response processing.
                    required:
                      - templateType
                      - responseDeclarationIdentifier
                      - outcomeIdentifier
                      - correctResponseIdentifier
                      - incorrectResponseIdentifier
                    description: Response processing is the process by which the Delivery Engine
                      assigns outcomes based on the candidate's responses. The
                      outcomes may be used to provide feedback to the candidate.
                      Response processing must only take place in direct
                      response to a user action or in response to some expected
                      event, such as the end of a test.
                  metadata:
                    type: object
                    properties:
                      subject:
                        type: string
                        description: Subject area for the assessment item
                        example: Math
                      grade:
                        type: string
                        enum: *a12
                        description: Grade level for the assessment item. Must use a value from K-12
                        example: "10"
                      difficulty:
                        type: string
                        enum: *a13
                        description: Difficulty level of the assessment item
                        example: easy
                      learningObjectiveSet:
                        type: array
                        items:
                          type: object
                          properties:
                            source:
                              type: string
                              description: The source of the learning objective set or learning standards.
                              example: CASE
                            learningObjectiveIds:
                              type: array
                              items:
                                type: string
                              description: Array of learning objective identifiers. If source is 'CASE', these
                                can be the CFItem sourcedIds or CFItem's Human
                                Coding Schema.
                              example: *a14
                          required:
                            - source
                            - learningObjectiveIds
                        description: Learning objectives associated with this assessment item
                        example: *a15
                    additionalProperties: true
                    description: Additional custom metadata for assessment items with validation for
                      specific fields used by external applications
                  rawXml:
                    type: string
                    description: Raw XML representation of the entity, automatically generated from
                      the JSON or XML sent when creating entities on the service
                      provider. The rawxml field will contain all content sent
                      when creating the entity on the service provider. This
                      field is stable and should be used when working within
                      this QTI API.
                  content:
                    type: object
                    properties:
                      qti-assessment-item:
                        type: object
                        properties:
                          _attributes:
                            type: object
                            properties:
                              xmlns:
                                type: string
                              xmlns:xsi:
                                type: string
                              xsi:schemaLocation:
                                type: string
                              identifier:
                                type: string
                              title:
                                type: string
                              adaptive:
                                type: string
                              time-dependent:
                                type: string
                            required:
                              - xmlns
                              - xmlns:xsi
                              - xsi:schemaLocation
                              - identifier
                              - title
                              - adaptive
                              - time-dependent
                          qti-response-declaration:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    cardinality:
                                      type: string
                                    baseType:
                                      type: string
                                  required:
                                    - identifier
                                    - cardinality
                                    - baseType
                                qti-correct-response:
                                  type: object
                                  properties:
                                    qti-value:
                                      type: array
                                      items:
                                        type: string
                                  required:
                                    - qti-value
                              required:
                                - _attributes
                                - qti-correct-response
                          qti-outcome-declaration:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    cardinality:
                                      type: string
                                    baseType:
                                      type: string
                                  required:
                                    - identifier
                                    - cardinality
                                    - baseType
                              required:
                                - _attributes
                          qti-assessment-stimulus-ref:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    href:
                                      type: string
                                    title:
                                      type: string
                                  required:
                                    - identifier
                                    - href
                                    - title
                              required:
                                - _attributes
                          qti-item-body: {}
                          qti-response-processing: {}
                        required:
                          - _attributes
                          - qti-response-declaration
                          - qti-outcome-declaration
                    required:
                      - qti-assessment-item
                    description: Parsed XML content generated by the service provider. For
                      production use, rawXml is recommended over this parsed
                      structure.
                  modalFeedback:
                    type: array
                    items:
                      type: object
                      properties:
                        outcomeIdentifier:
                          type: string
                          description: Identifier of the outcome variable that controls when this feedback
                            is displayed. The feedback is shown or hidden based
                            on the value of this outcome variable after response
                            processing.
                        identifier:
                          type: string
                          description: Unique identifier for this specific feedback element within the
                            assessment item. Used to reference and control this
                            particular piece of feedback.
                        showHide:
                          type: string
                          enum: *a5
                          description: Determines the feedback visibility behavior. 'show' displays the
                            feedback when the outcome variable matches the
                            identifier, 'hide' conceals it when the outcome
                            variable matches.
                        content:
                          type: string
                          description: The HTML or text content to be displayed as feedback to the
                            candidate.
                        title:
                          type: string
                          description: Optional title displayed in the modal feedback dialog header. Only
                            used with modal feedback presentations.
                      required:
                        - outcomeIdentifier
                        - identifier
                        - showHide
                        - content
                        - title
                    description: Modal feedback shown to candidates in popup dialogs immediately
                      following response processing. Cannot contain interaction
                      elements and is displayed based on outcome variable
                      values.
                  feedbackInline:
                    type: array
                    items:
                      type: object
                      properties:
                        outcomeIdentifier:
                          type: string
                          description: Identifier of the outcome variable that controls when this feedback
                            is displayed. The feedback is shown or hidden based
                            on the value of this outcome variable after response
                            processing.
                        identifier:
                          type: string
                          description: Unique identifier for this specific feedback element within the
                            assessment item. Used to reference and control this
                            particular piece of feedback.
                        showHide:
                          type: string
                          enum: *a5
                          description: Determines the feedback visibility behavior. 'show' displays the
                            feedback when the outcome variable matches the
                            identifier, 'hide' conceals it when the outcome
                            variable matches.
                        content:
                          type: string
                          description: The HTML or text content to be displayed as feedback to the
                            candidate.
                        class:
                          type: array
                          items:
                            type: string
                          description: CSS class names applied to the feedback element for styling
                            purposes. Multiple classes can be specified for
                            flexible presentation control.
                      required:
                        - outcomeIdentifier
                        - identifier
                        - showHide
                        - content
                        - class
                    description: Inline feedback embedded within interaction elements, displayed
                      alongside choices or input areas. Provides contextual
                      feedback.
                  feedbackBlock:
                    type: array
                    items:
                      type: object
                      properties:
                        outcomeIdentifier:
                          type: string
                          description: Identifier of the outcome variable that controls when this feedback
                            is displayed. The feedback is shown or hidden based
                            on the value of this outcome variable after response
                            processing.
                        identifier:
                          type: string
                          description: Unique identifier for this specific feedback element within the
                            assessment item. Used to reference and control this
                            particular piece of feedback.
                        showHide:
                          type: string
                          enum: *a5
                          description: Determines the feedback visibility behavior. 'show' displays the
                            feedback when the outcome variable matches the
                            identifier, 'hide' conceals it when the outcome
                            variable matches.
                        content:
                          type: string
                          description: The HTML or text content to be displayed as feedback to the
                            candidate.
                        class:
                          type: array
                          items:
                            type: string
                          description: CSS class names applied to the feedback element for styling
                            purposes. Multiple classes can be specified for
                            flexible presentation control.
                      required:
                        - outcomeIdentifier
                        - identifier
                        - showHide
                        - content
                        - class
                    description: Inline feedback embedded within interaction elements, displayed
                      alongside choices or input areas. Provides contextual
                      feedback.
                  createdAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was created
                  updatedAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was last updated
                  __v:
                    type: number
                    description: MongoDB version key for optimistic concurrency control
                required:
                  - identifier
                  - title
                  - type
                  - qtiVersion
                  - timeDependent
                  - adaptive
                  - rawXml
                  - content
                  - createdAt
                  - updatedAt
        "400":
          description: Invalid request body or stimulus not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "409":
          description: Assessment item with this identifier already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                  message:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-items/{identifier}:
    get:
      operationId: getAssessmentItem
      summary: Get an assessment item with complete question content
      description: Retrieve a specific assessment item including its question content,
        answer choices, interaction types, response processing rules, and
        scoring logic. Assessment items are the fundamental units of assessment
        content that can be referenced by test sections. Supports both JSON and
        XML response formats based on the Content-Type header.
      tags: *a7
      parameters:
        - name: identifier
          description: Assessment item identifier
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Assessment item retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  type:
                    type: string
                    enum: *a10
                    description: Assessment item interaction types that are supported by the service
                      provider.
                  customInteractionTypeIdentifier:
                    type: string
                    description: For portable-custom interactions, the
                      custom-interaction-type-identifier attribute from the QTI
                      XML element.
                  qtiVersion:
                    type: string
                    default: "3.0"
                    description: QTI version of the assessment item
                  timeDependent:
                    type: boolean
                    default: false
                    description: Indicates whether the candidate's response time affects the scoring
                      or outcome of this assessment item. When true, timing data
                      is used in response processing calculations.
                  adaptive:
                    type: boolean
                    default: false
                    description: Indicates whether this assessment item adapts its presentation or
                      behavior based on the candidate's responses. Adaptive
                      items can modify their content, difficulty, or available
                      options during the assessment session.
                  responseDeclarations:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for this response variable within the item; must
                            be distinct from other item variables and cannot use
                            reserved names (completionStatus, numAttempts,
                            duration).
                        cardinality:
                          type: string
                          enum: *a3
                          description: Specifies how many values the response variable can hold and
                            whether order matters.
                        baseType:
                          type: string
                          enum: *a4
                          description: Primitive data type for each answer stored in the variable (e.g.,
                            integer, string, boolean). Omit when cardinality is
                            'record', because each field in a record may have
                            its own type.
                        correctResponse:
                          type: object
                          properties:
                            value:
                              type: array
                              items:
                                type: string
                          required:
                            - value
                          description: Optional model answer; must conform to the variable's cardinality
                            (single = one value, multiple/ordered = ordered or
                            unordered list); omit when no optimal answer exists
                            (e.g., essays); delivery engines may display it as
                            the solution in review mode.
                      required:
                        - identifier
                        - cardinality
                        - correctResponse
                  outcomeDeclarations:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for this response variable within the item; must
                            be distinct from other item variables and cannot use
                            reserved names (completionStatus, numAttempts,
                            duration).
                        cardinality:
                          type: string
                          enum: *a3
                          description: Specifies how many values the response variable can hold and
                            whether order matters.
                        baseType:
                          type: string
                          enum: *a4
                          description: Primitive data type for each answer stored in the variable (e.g.,
                            integer, string, boolean). Omit when cardinality is
                            'record', because each field in a record may have
                            its own type.
                      required:
                        - identifier
                        - cardinality
                  responseProcessing:
                    type: object
                    properties:
                      templateType:
                        type: string
                        enum: *a11
                        description: Response processing template type. 'match_correct' compares the
                          candidate's response directly against the correct
                          response and assigns binary feedback. 'map_response'
                          uses mapping rules to assign scores and feedback based
                          on response values.
                      responseDeclarationIdentifier:
                        type: string
                        description: Identifier of the response declaration that this response
                          processing rule applies to. Must match an existing
                          responseDeclaration identifier within the same
                          assessment item.
                      outcomeIdentifier:
                        type: string
                        description: Identifier of the outcome variable that will be set by this
                          response processing rule. Common values include
                          'SCORE' for numeric scoring or 'FEEDBACK' for feedback
                          identifiers.
                      correctResponseIdentifier:
                        type: string
                        description: Identifier value assigned to the outcome variable when the
                          candidate's response is evaluated as correct. Used
                          primarily with match_correct template type.
                      incorrectResponseIdentifier:
                        type: string
                        description: Identifier value assigned to the outcome variable when the
                          candidate's response is evaluated as incorrect. Used
                          primarily with match_correct template type.
                      inlineFeedback:
                        type: object
                        properties:
                          outcomeIdentifier:
                            type: string
                            description: Identifier of the outcome variable to be set with the inline
                              feedback value.
                          variableIdentifier:
                            type: string
                            description: Identifier of the variable whose value will be assigned to the
                              outcome variable during response processing.
                        required:
                          - outcomeIdentifier
                          - variableIdentifier
                        description: Optional inline feedback configuration that sets an outcome
                          variable based on another variable's value during
                          response processing.
                    required:
                      - templateType
                      - responseDeclarationIdentifier
                      - outcomeIdentifier
                      - correctResponseIdentifier
                      - incorrectResponseIdentifier
                    description: Response processing is the process by which the Delivery Engine
                      assigns outcomes based on the candidate's responses. The
                      outcomes may be used to provide feedback to the candidate.
                      Response processing must only take place in direct
                      response to a user action or in response to some expected
                      event, such as the end of a test.
                  metadata:
                    type: object
                    properties:
                      subject:
                        type: string
                        description: Subject area for the assessment item
                        example: Math
                      grade:
                        type: string
                        enum: *a12
                        description: Grade level for the assessment item. Must use a value from K-12
                        example: "10"
                      difficulty:
                        type: string
                        enum: *a13
                        description: Difficulty level of the assessment item
                        example: easy
                      learningObjectiveSet:
                        type: array
                        items:
                          type: object
                          properties:
                            source:
                              type: string
                              description: The source of the learning objective set or learning standards.
                              example: CASE
                            learningObjectiveIds:
                              type: array
                              items:
                                type: string
                              description: Array of learning objective identifiers. If source is 'CASE', these
                                can be the CFItem sourcedIds or CFItem's Human
                                Coding Schema.
                              example: *a14
                          required:
                            - source
                            - learningObjectiveIds
                        description: Learning objectives associated with this assessment item
                        example: *a15
                    additionalProperties: true
                    description: Additional custom metadata for assessment items with validation for
                      specific fields used by external applications
                  rawXml:
                    type: string
                    description: Raw XML representation of the entity, automatically generated from
                      the JSON or XML sent when creating entities on the service
                      provider. The rawxml field will contain all content sent
                      when creating the entity on the service provider. This
                      field is stable and should be used when working within
                      this QTI API.
                  content:
                    type: object
                    properties:
                      qti-assessment-item:
                        type: object
                        properties:
                          _attributes:
                            type: object
                            properties:
                              xmlns:
                                type: string
                              xmlns:xsi:
                                type: string
                              xsi:schemaLocation:
                                type: string
                              identifier:
                                type: string
                              title:
                                type: string
                              adaptive:
                                type: string
                              time-dependent:
                                type: string
                            required:
                              - xmlns
                              - xmlns:xsi
                              - xsi:schemaLocation
                              - identifier
                              - title
                              - adaptive
                              - time-dependent
                          qti-response-declaration:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    cardinality:
                                      type: string
                                    baseType:
                                      type: string
                                  required:
                                    - identifier
                                    - cardinality
                                    - baseType
                                qti-correct-response:
                                  type: object
                                  properties:
                                    qti-value:
                                      type: array
                                      items:
                                        type: string
                                  required:
                                    - qti-value
                              required:
                                - _attributes
                                - qti-correct-response
                          qti-outcome-declaration:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    cardinality:
                                      type: string
                                    baseType:
                                      type: string
                                  required:
                                    - identifier
                                    - cardinality
                                    - baseType
                              required:
                                - _attributes
                          qti-assessment-stimulus-ref:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    href:
                                      type: string
                                    title:
                                      type: string
                                  required:
                                    - identifier
                                    - href
                                    - title
                              required:
                                - _attributes
                          qti-item-body: {}
                          qti-response-processing: {}
                        required:
                          - _attributes
                          - qti-response-declaration
                          - qti-outcome-declaration
                    required:
                      - qti-assessment-item
                    description: Parsed XML content generated by the service provider. For
                      production use, rawXml is recommended over this parsed
                      structure.
                  modalFeedback:
                    type: array
                    items:
                      type: object
                      properties:
                        outcomeIdentifier:
                          type: string
                          description: Identifier of the outcome variable that controls when this feedback
                            is displayed. The feedback is shown or hidden based
                            on the value of this outcome variable after response
                            processing.
                        identifier:
                          type: string
                          description: Unique identifier for this specific feedback element within the
                            assessment item. Used to reference and control this
                            particular piece of feedback.
                        showHide:
                          type: string
                          enum: *a5
                          description: Determines the feedback visibility behavior. 'show' displays the
                            feedback when the outcome variable matches the
                            identifier, 'hide' conceals it when the outcome
                            variable matches.
                        content:
                          type: string
                          description: The HTML or text content to be displayed as feedback to the
                            candidate.
                        title:
                          type: string
                          description: Optional title displayed in the modal feedback dialog header. Only
                            used with modal feedback presentations.
                      required:
                        - outcomeIdentifier
                        - identifier
                        - showHide
                        - content
                        - title
                    description: Modal feedback shown to candidates in popup dialogs immediately
                      following response processing. Cannot contain interaction
                      elements and is displayed based on outcome variable
                      values.
                  feedbackInline:
                    type: array
                    items:
                      type: object
                      properties:
                        outcomeIdentifier:
                          type: string
                          description: Identifier of the outcome variable that controls when this feedback
                            is displayed. The feedback is shown or hidden based
                            on the value of this outcome variable after response
                            processing.
                        identifier:
                          type: string
                          description: Unique identifier for this specific feedback element within the
                            assessment item. Used to reference and control this
                            particular piece of feedback.
                        showHide:
                          type: string
                          enum: *a5
                          description: Determines the feedback visibility behavior. 'show' displays the
                            feedback when the outcome variable matches the
                            identifier, 'hide' conceals it when the outcome
                            variable matches.
                        content:
                          type: string
                          description: The HTML or text content to be displayed as feedback to the
                            candidate.
                        class:
                          type: array
                          items:
                            type: string
                          description: CSS class names applied to the feedback element for styling
                            purposes. Multiple classes can be specified for
                            flexible presentation control.
                      required:
                        - outcomeIdentifier
                        - identifier
                        - showHide
                        - content
                        - class
                    description: Inline feedback embedded within interaction elements, displayed
                      alongside choices or input areas. Provides contextual
                      feedback.
                  feedbackBlock:
                    type: array
                    items:
                      type: object
                      properties:
                        outcomeIdentifier:
                          type: string
                          description: Identifier of the outcome variable that controls when this feedback
                            is displayed. The feedback is shown or hidden based
                            on the value of this outcome variable after response
                            processing.
                        identifier:
                          type: string
                          description: Unique identifier for this specific feedback element within the
                            assessment item. Used to reference and control this
                            particular piece of feedback.
                        showHide:
                          type: string
                          enum: *a5
                          description: Determines the feedback visibility behavior. 'show' displays the
                            feedback when the outcome variable matches the
                            identifier, 'hide' conceals it when the outcome
                            variable matches.
                        content:
                          type: string
                          description: The HTML or text content to be displayed as feedback to the
                            candidate.
                        class:
                          type: array
                          items:
                            type: string
                          description: CSS class names applied to the feedback element for styling
                            purposes. Multiple classes can be specified for
                            flexible presentation control.
                      required:
                        - outcomeIdentifier
                        - identifier
                        - showHide
                        - content
                        - class
                    description: Inline feedback embedded within interaction elements, displayed
                      alongside choices or input areas. Provides contextual
                      feedback.
                  createdAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was created
                  updatedAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was last updated
                  __v:
                    type: number
                    description: MongoDB version key for optimistic concurrency control
                required:
                  - identifier
                  - title
                  - type
                  - qtiVersion
                  - timeDependent
                  - adaptive
                  - rawXml
                  - content
                  - createdAt
                  - updatedAt
        "404":
          description: Item not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
    put:
      operationId: updateAssessmentItem
      summary: Update an assessment item's content and configuration
      description: Update an assessment item including its question content,
        interactions, response processing, and scoring logic. This operation
        regenerates the QTI XML structure and validates all content. Assessment
        tests that reference this item will automatically use the updated
        version.
      tags: *a7
      parameters:
        - name: identifier
          description: Assessment item identifier
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: The updated assessment item content, interactions, and
          configuration. Can be provided in either XML or JSON format.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                identifier:
                  type: string
                  description: Unique identifier for the entity on the service provider.
                title:
                  type: string
                  description: Human-readable title of the entity on the service provider.
                type:
                  type: string
                  enum: *a10
                  description: Assessment item interaction types that are supported by the service
                    provider.
                customInteractionTypeIdentifier:
                  type: string
                  description: For portable-custom interactions, the
                    custom-interaction-type-identifier attribute from the QTI
                    XML element.
                qtiVersion:
                  type: string
                  default: "3.0"
                  description: QTI version of the assessment item
                timeDependent:
                  type: boolean
                  default: false
                  description: Indicates whether the candidate's response time affects the scoring
                    or outcome of this assessment item. When true, timing data
                    is used in response processing calculations.
                adaptive:
                  type: boolean
                  default: false
                  description: Indicates whether this assessment item adapts its presentation or
                    behavior based on the candidate's responses. Adaptive items
                    can modify their content, difficulty, or available options
                    during the assessment session.
                responseDeclarations:
                  type: array
                  items:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Unique identifier for this response variable within the item; must
                          be distinct from other item variables and cannot use
                          reserved names (completionStatus, numAttempts,
                          duration).
                      cardinality:
                        type: string
                        enum: *a3
                        description: Specifies how many values the response variable can hold and
                          whether order matters.
                      baseType:
                        type: string
                        enum: *a4
                        description: Primitive data type for each answer stored in the variable (e.g.,
                          integer, string, boolean). Omit when cardinality is
                          'record', because each field in a record may have its
                          own type.
                      correctResponse:
                        type: object
                        properties:
                          value:
                            type: array
                            items:
                              type: string
                        required:
                          - value
                        description: Optional model answer; must conform to the variable's cardinality
                          (single = one value, multiple/ordered = ordered or
                          unordered list); omit when no optimal answer exists
                          (e.g., essays); delivery engines may display it as the
                          solution in review mode.
                    required:
                      - identifier
                      - cardinality
                      - correctResponse
                outcomeDeclarations:
                  type: array
                  items:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Unique identifier for this response variable within the item; must
                          be distinct from other item variables and cannot use
                          reserved names (completionStatus, numAttempts,
                          duration).
                      cardinality:
                        type: string
                        enum: *a3
                        description: Specifies how many values the response variable can hold and
                          whether order matters.
                      baseType:
                        type: string
                        enum: *a4
                        description: Primitive data type for each answer stored in the variable (e.g.,
                          integer, string, boolean). Omit when cardinality is
                          'record', because each field in a record may have its
                          own type.
                    required:
                      - identifier
                      - cardinality
                responseProcessing:
                  type: object
                  properties:
                    templateType:
                      type: string
                      enum: *a11
                      description: Response processing template type. 'match_correct' compares the
                        candidate's response directly against the correct
                        response and assigns binary feedback. 'map_response'
                        uses mapping rules to assign scores and feedback based
                        on response values.
                    responseDeclarationIdentifier:
                      type: string
                      description: Identifier of the response declaration that this response
                        processing rule applies to. Must match an existing
                        responseDeclaration identifier within the same
                        assessment item.
                    outcomeIdentifier:
                      type: string
                      description: Identifier of the outcome variable that will be set by this
                        response processing rule. Common values include 'SCORE'
                        for numeric scoring or 'FEEDBACK' for feedback
                        identifiers.
                    correctResponseIdentifier:
                      type: string
                      description: Identifier value assigned to the outcome variable when the
                        candidate's response is evaluated as correct. Used
                        primarily with match_correct template type.
                    incorrectResponseIdentifier:
                      type: string
                      description: Identifier value assigned to the outcome variable when the
                        candidate's response is evaluated as incorrect. Used
                        primarily with match_correct template type.
                    inlineFeedback:
                      type: object
                      properties:
                        outcomeIdentifier:
                          type: string
                          description: Identifier of the outcome variable to be set with the inline
                            feedback value.
                        variableIdentifier:
                          type: string
                          description: Identifier of the variable whose value will be assigned to the
                            outcome variable during response processing.
                      required:
                        - outcomeIdentifier
                        - variableIdentifier
                      description: Optional inline feedback configuration that sets an outcome
                        variable based on another variable's value during
                        response processing.
                  required:
                    - templateType
                    - responseDeclarationIdentifier
                    - outcomeIdentifier
                    - correctResponseIdentifier
                    - incorrectResponseIdentifier
                  description: Response processing is the process by which the Delivery Engine
                    assigns outcomes based on the candidate's responses. The
                    outcomes may be used to provide feedback to the candidate.
                    Response processing must only take place in direct response
                    to a user action or in response to some expected event, such
                    as the end of a test.
                metadata:
                  type: object
                  properties:
                    subject:
                      type: string
                      description: Subject area for the assessment item
                      example: Math
                    grade:
                      type: string
                      enum: *a12
                      description: Grade level for the assessment item. Must use a value from K-12
                      example: "10"
                    difficulty:
                      type: string
                      enum: *a13
                      description: Difficulty level of the assessment item
                      example: easy
                    learningObjectiveSet:
                      type: array
                      items:
                        type: object
                        properties:
                          source:
                            type: string
                            description: The source of the learning objective set or learning standards.
                            example: CASE
                          learningObjectiveIds:
                            type: array
                            items:
                              type: string
                            description: Array of learning objective identifiers. If source is 'CASE', these
                              can be the CFItem sourcedIds or CFItem's Human
                              Coding Schema.
                            example: *a14
                        required:
                          - source
                          - learningObjectiveIds
                      description: Learning objectives associated with this assessment item
                      example: *a15
                  additionalProperties: true
                  description: Additional custom metadata for assessment items with validation for
                    specific fields used by external applications
                rawXml:
                  type: string
                  description: Raw XML representation of the entity, automatically generated from
                    the JSON or XML sent when creating entities on the service
                    provider. The rawxml field will contain all content sent
                    when creating the entity on the service provider. This field
                    is stable and should be used when working within this QTI
                    API.
                content:
                  type: object
                  properties:
                    qti-assessment-item:
                      type: object
                      properties:
                        _attributes:
                          type: object
                          properties:
                            xmlns:
                              type: string
                            xmlns:xsi:
                              type: string
                            xsi:schemaLocation:
                              type: string
                            identifier:
                              type: string
                            title:
                              type: string
                            adaptive:
                              type: string
                            time-dependent:
                              type: string
                          required:
                            - xmlns
                            - xmlns:xsi
                            - xsi:schemaLocation
                            - identifier
                            - title
                            - adaptive
                            - time-dependent
                        qti-response-declaration:
                          type: array
                          items:
                            type: object
                            properties:
                              _attributes:
                                type: object
                                properties:
                                  identifier:
                                    type: string
                                  cardinality:
                                    type: string
                                  baseType:
                                    type: string
                                required:
                                  - identifier
                                  - cardinality
                                  - baseType
                              qti-correct-response:
                                type: object
                                properties:
                                  qti-value:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - qti-value
                            required:
                              - _attributes
                              - qti-correct-response
                        qti-outcome-declaration:
                          type: array
                          items:
                            type: object
                            properties:
                              _attributes:
                                type: object
                                properties:
                                  identifier:
                                    type: string
                                  cardinality:
                                    type: string
                                  baseType:
                                    type: string
                                required:
                                  - identifier
                                  - cardinality
                                  - baseType
                            required:
                              - _attributes
                        qti-assessment-stimulus-ref:
                          type: array
                          items:
                            type: object
                            properties:
                              _attributes:
                                type: object
                                properties:
                                  identifier:
                                    type: string
                                  href:
                                    type: string
                                  title:
                                    type: string
                                required:
                                  - identifier
                                  - href
                                  - title
                            required:
                              - _attributes
                        qti-item-body: {}
                        qti-response-processing: {}
                      required:
                        - _attributes
                        - qti-response-declaration
                        - qti-outcome-declaration
                  required:
                    - qti-assessment-item
                  description: Parsed XML content generated by the service provider. For
                    production use, rawXml is recommended over this parsed
                    structure.
                modalFeedback:
                  type: array
                  items:
                    type: object
                    properties:
                      outcomeIdentifier:
                        type: string
                        description: Identifier of the outcome variable that controls when this feedback
                          is displayed. The feedback is shown or hidden based on
                          the value of this outcome variable after response
                          processing.
                      identifier:
                        type: string
                        description: Unique identifier for this specific feedback element within the
                          assessment item. Used to reference and control this
                          particular piece of feedback.
                      showHide:
                        type: string
                        enum: *a5
                        description: Determines the feedback visibility behavior. 'show' displays the
                          feedback when the outcome variable matches the
                          identifier, 'hide' conceals it when the outcome
                          variable matches.
                      content:
                        type: string
                        description: The HTML or text content to be displayed as feedback to the
                          candidate.
                      title:
                        type: string
                        description: Optional title displayed in the modal feedback dialog header. Only
                          used with modal feedback presentations.
                    required:
                      - outcomeIdentifier
                      - identifier
                      - showHide
                      - content
                      - title
                  description: Modal feedback shown to candidates in popup dialogs immediately
                    following response processing. Cannot contain interaction
                    elements and is displayed based on outcome variable values.
                feedbackInline:
                  type: array
                  items:
                    type: object
                    properties:
                      outcomeIdentifier:
                        type: string
                        description: Identifier of the outcome variable that controls when this feedback
                          is displayed. The feedback is shown or hidden based on
                          the value of this outcome variable after response
                          processing.
                      identifier:
                        type: string
                        description: Unique identifier for this specific feedback element within the
                          assessment item. Used to reference and control this
                          particular piece of feedback.
                      showHide:
                        type: string
                        enum: *a5
                        description: Determines the feedback visibility behavior. 'show' displays the
                          feedback when the outcome variable matches the
                          identifier, 'hide' conceals it when the outcome
                          variable matches.
                      content:
                        type: string
                        description: The HTML or text content to be displayed as feedback to the
                          candidate.
                      class:
                        type: array
                        items:
                          type: string
                        description: CSS class names applied to the feedback element for styling
                          purposes. Multiple classes can be specified for
                          flexible presentation control.
                    required:
                      - outcomeIdentifier
                      - identifier
                      - showHide
                      - content
                      - class
                  description: Inline feedback embedded within interaction elements, displayed
                    alongside choices or input areas. Provides contextual
                    feedback.
                feedbackBlock:
                  type: array
                  items:
                    type: object
                    properties:
                      outcomeIdentifier:
                        type: string
                        description: Identifier of the outcome variable that controls when this feedback
                          is displayed. The feedback is shown or hidden based on
                          the value of this outcome variable after response
                          processing.
                      identifier:
                        type: string
                        description: Unique identifier for this specific feedback element within the
                          assessment item. Used to reference and control this
                          particular piece of feedback.
                      showHide:
                        type: string
                        enum: *a5
                        description: Determines the feedback visibility behavior. 'show' displays the
                          feedback when the outcome variable matches the
                          identifier, 'hide' conceals it when the outcome
                          variable matches.
                      content:
                        type: string
                        description: The HTML or text content to be displayed as feedback to the
                          candidate.
                      class:
                        type: array
                        items:
                          type: string
                        description: CSS class names applied to the feedback element for styling
                          purposes. Multiple classes can be specified for
                          flexible presentation control.
                    required:
                      - outcomeIdentifier
                      - identifier
                      - showHide
                      - content
                      - class
                  description: Inline feedback embedded within interaction elements, displayed
                    alongside choices or input areas. Provides contextual
                    feedback.
                createdAt:
                  type: string
                  format: date-time
                  description: ISO 8601 timestamp when the entity was created
                updatedAt:
                  type: string
                  format: date-time
                  description: ISO 8601 timestamp when the entity was last updated
                __v:
                  type: number
                  description: MongoDB version key for optimistic concurrency control
              required:
                - identifier
                - title
                - type
                - rawXml
                - content
                - createdAt
                - updatedAt
            examples: *a16
      responses:
        "200":
          description: Assessment item updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  type:
                    type: string
                    enum: *a10
                    description: Assessment item interaction types that are supported by the service
                      provider.
                  customInteractionTypeIdentifier:
                    type: string
                    description: For portable-custom interactions, the
                      custom-interaction-type-identifier attribute from the QTI
                      XML element.
                  qtiVersion:
                    type: string
                    default: "3.0"
                    description: QTI version of the assessment item
                  timeDependent:
                    type: boolean
                    default: false
                    description: Indicates whether the candidate's response time affects the scoring
                      or outcome of this assessment item. When true, timing data
                      is used in response processing calculations.
                  adaptive:
                    type: boolean
                    default: false
                    description: Indicates whether this assessment item adapts its presentation or
                      behavior based on the candidate's responses. Adaptive
                      items can modify their content, difficulty, or available
                      options during the assessment session.
                  responseDeclarations:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for this response variable within the item; must
                            be distinct from other item variables and cannot use
                            reserved names (completionStatus, numAttempts,
                            duration).
                        cardinality:
                          type: string
                          enum: *a3
                          description: Specifies how many values the response variable can hold and
                            whether order matters.
                        baseType:
                          type: string
                          enum: *a4
                          description: Primitive data type for each answer stored in the variable (e.g.,
                            integer, string, boolean). Omit when cardinality is
                            'record', because each field in a record may have
                            its own type.
                        correctResponse:
                          type: object
                          properties:
                            value:
                              type: array
                              items:
                                type: string
                          required:
                            - value
                          description: Optional model answer; must conform to the variable's cardinality
                            (single = one value, multiple/ordered = ordered or
                            unordered list); omit when no optimal answer exists
                            (e.g., essays); delivery engines may display it as
                            the solution in review mode.
                      required:
                        - identifier
                        - cardinality
                        - correctResponse
                  outcomeDeclarations:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for this response variable within the item; must
                            be distinct from other item variables and cannot use
                            reserved names (completionStatus, numAttempts,
                            duration).
                        cardinality:
                          type: string
                          enum: *a3
                          description: Specifies how many values the response variable can hold and
                            whether order matters.
                        baseType:
                          type: string
                          enum: *a4
                          description: Primitive data type for each answer stored in the variable (e.g.,
                            integer, string, boolean). Omit when cardinality is
                            'record', because each field in a record may have
                            its own type.
                      required:
                        - identifier
                        - cardinality
                  responseProcessing:
                    type: object
                    properties:
                      templateType:
                        type: string
                        enum: *a11
                        description: Response processing template type. 'match_correct' compares the
                          candidate's response directly against the correct
                          response and assigns binary feedback. 'map_response'
                          uses mapping rules to assign scores and feedback based
                          on response values.
                      responseDeclarationIdentifier:
                        type: string
                        description: Identifier of the response declaration that this response
                          processing rule applies to. Must match an existing
                          responseDeclaration identifier within the same
                          assessment item.
                      outcomeIdentifier:
                        type: string
                        description: Identifier of the outcome variable that will be set by this
                          response processing rule. Common values include
                          'SCORE' for numeric scoring or 'FEEDBACK' for feedback
                          identifiers.
                      correctResponseIdentifier:
                        type: string
                        description: Identifier value assigned to the outcome variable when the
                          candidate's response is evaluated as correct. Used
                          primarily with match_correct template type.
                      incorrectResponseIdentifier:
                        type: string
                        description: Identifier value assigned to the outcome variable when the
                          candidate's response is evaluated as incorrect. Used
                          primarily with match_correct template type.
                      inlineFeedback:
                        type: object
                        properties:
                          outcomeIdentifier:
                            type: string
                            description: Identifier of the outcome variable to be set with the inline
                              feedback value.
                          variableIdentifier:
                            type: string
                            description: Identifier of the variable whose value will be assigned to the
                              outcome variable during response processing.
                        required:
                          - outcomeIdentifier
                          - variableIdentifier
                        description: Optional inline feedback configuration that sets an outcome
                          variable based on another variable's value during
                          response processing.
                    required:
                      - templateType
                      - responseDeclarationIdentifier
                      - outcomeIdentifier
                      - correctResponseIdentifier
                      - incorrectResponseIdentifier
                    description: Response processing is the process by which the Delivery Engine
                      assigns outcomes based on the candidate's responses. The
                      outcomes may be used to provide feedback to the candidate.
                      Response processing must only take place in direct
                      response to a user action or in response to some expected
                      event, such as the end of a test.
                  metadata:
                    type: object
                    properties:
                      subject:
                        type: string
                        description: Subject area for the assessment item
                        example: Math
                      grade:
                        type: string
                        enum: *a12
                        description: Grade level for the assessment item. Must use a value from K-12
                        example: "10"
                      difficulty:
                        type: string
                        enum: *a13
                        description: Difficulty level of the assessment item
                        example: easy
                      learningObjectiveSet:
                        type: array
                        items:
                          type: object
                          properties:
                            source:
                              type: string
                              description: The source of the learning objective set or learning standards.
                              example: CASE
                            learningObjectiveIds:
                              type: array
                              items:
                                type: string
                              description: Array of learning objective identifiers. If source is 'CASE', these
                                can be the CFItem sourcedIds or CFItem's Human
                                Coding Schema.
                              example: *a14
                          required:
                            - source
                            - learningObjectiveIds
                        description: Learning objectives associated with this assessment item
                        example: *a15
                    additionalProperties: true
                    description: Additional custom metadata for assessment items with validation for
                      specific fields used by external applications
                  rawXml:
                    type: string
                    description: Raw XML representation of the entity, automatically generated from
                      the JSON or XML sent when creating entities on the service
                      provider. The rawxml field will contain all content sent
                      when creating the entity on the service provider. This
                      field is stable and should be used when working within
                      this QTI API.
                  content:
                    type: object
                    properties:
                      qti-assessment-item:
                        type: object
                        properties:
                          _attributes:
                            type: object
                            properties:
                              xmlns:
                                type: string
                              xmlns:xsi:
                                type: string
                              xsi:schemaLocation:
                                type: string
                              identifier:
                                type: string
                              title:
                                type: string
                              adaptive:
                                type: string
                              time-dependent:
                                type: string
                            required:
                              - xmlns
                              - xmlns:xsi
                              - xsi:schemaLocation
                              - identifier
                              - title
                              - adaptive
                              - time-dependent
                          qti-response-declaration:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    cardinality:
                                      type: string
                                    baseType:
                                      type: string
                                  required:
                                    - identifier
                                    - cardinality
                                    - baseType
                                qti-correct-response:
                                  type: object
                                  properties:
                                    qti-value:
                                      type: array
                                      items:
                                        type: string
                                  required:
                                    - qti-value
                              required:
                                - _attributes
                                - qti-correct-response
                          qti-outcome-declaration:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    cardinality:
                                      type: string
                                    baseType:
                                      type: string
                                  required:
                                    - identifier
                                    - cardinality
                                    - baseType
                              required:
                                - _attributes
                          qti-assessment-stimulus-ref:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    href:
                                      type: string
                                    title:
                                      type: string
                                  required:
                                    - identifier
                                    - href
                                    - title
                              required:
                                - _attributes
                          qti-item-body: {}
                          qti-response-processing: {}
                        required:
                          - _attributes
                          - qti-response-declaration
                          - qti-outcome-declaration
                    required:
                      - qti-assessment-item
                    description: Parsed XML content generated by the service provider. For
                      production use, rawXml is recommended over this parsed
                      structure.
                  modalFeedback:
                    type: array
                    items:
                      type: object
                      properties:
                        outcomeIdentifier:
                          type: string
                          description: Identifier of the outcome variable that controls when this feedback
                            is displayed. The feedback is shown or hidden based
                            on the value of this outcome variable after response
                            processing.
                        identifier:
                          type: string
                          description: Unique identifier for this specific feedback element within the
                            assessment item. Used to reference and control this
                            particular piece of feedback.
                        showHide:
                          type: string
                          enum: *a5
                          description: Determines the feedback visibility behavior. 'show' displays the
                            feedback when the outcome variable matches the
                            identifier, 'hide' conceals it when the outcome
                            variable matches.
                        content:
                          type: string
                          description: The HTML or text content to be displayed as feedback to the
                            candidate.
                        title:
                          type: string
                          description: Optional title displayed in the modal feedback dialog header. Only
                            used with modal feedback presentations.
                      required:
                        - outcomeIdentifier
                        - identifier
                        - showHide
                        - content
                        - title
                    description: Modal feedback shown to candidates in popup dialogs immediately
                      following response processing. Cannot contain interaction
                      elements and is displayed based on outcome variable
                      values.
                  feedbackInline:
                    type: array
                    items:
                      type: object
                      properties:
                        outcomeIdentifier:
                          type: string
                          description: Identifier of the outcome variable that controls when this feedback
                            is displayed. The feedback is shown or hidden based
                            on the value of this outcome variable after response
                            processing.
                        identifier:
                          type: string
                          description: Unique identifier for this specific feedback element within the
                            assessment item. Used to reference and control this
                            particular piece of feedback.
                        showHide:
                          type: string
                          enum: *a5
                          description: Determines the feedback visibility behavior. 'show' displays the
                            feedback when the outcome variable matches the
                            identifier, 'hide' conceals it when the outcome
                            variable matches.
                        content:
                          type: string
                          description: The HTML or text content to be displayed as feedback to the
                            candidate.
                        class:
                          type: array
                          items:
                            type: string
                          description: CSS class names applied to the feedback element for styling
                            purposes. Multiple classes can be specified for
                            flexible presentation control.
                      required:
                        - outcomeIdentifier
                        - identifier
                        - showHide
                        - content
                        - class
                    description: Inline feedback embedded within interaction elements, displayed
                      alongside choices or input areas. Provides contextual
                      feedback.
                  feedbackBlock:
                    type: array
                    items:
                      type: object
                      properties:
                        outcomeIdentifier:
                          type: string
                          description: Identifier of the outcome variable that controls when this feedback
                            is displayed. The feedback is shown or hidden based
                            on the value of this outcome variable after response
                            processing.
                        identifier:
                          type: string
                          description: Unique identifier for this specific feedback element within the
                            assessment item. Used to reference and control this
                            particular piece of feedback.
                        showHide:
                          type: string
                          enum: *a5
                          description: Determines the feedback visibility behavior. 'show' displays the
                            feedback when the outcome variable matches the
                            identifier, 'hide' conceals it when the outcome
                            variable matches.
                        content:
                          type: string
                          description: The HTML or text content to be displayed as feedback to the
                            candidate.
                        class:
                          type: array
                          items:
                            type: string
                          description: CSS class names applied to the feedback element for styling
                            purposes. Multiple classes can be specified for
                            flexible presentation control.
                      required:
                        - outcomeIdentifier
                        - identifier
                        - showHide
                        - content
                        - class
                    description: Inline feedback embedded within interaction elements, displayed
                      alongside choices or input areas. Provides contextual
                      feedback.
                  createdAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was created
                  updatedAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was last updated
                  __v:
                    type: number
                    description: MongoDB version key for optimistic concurrency control
                required:
                  - identifier
                  - title
                  - type
                  - qtiVersion
                  - timeDependent
                  - adaptive
                  - rawXml
                  - content
                  - createdAt
                  - updatedAt
        "400":
          description: Invalid request body or stimulus not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "404":
          description: Item not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
    delete:
      operationId: deleteAssessmentItem
      summary: Delete an assessment item
      description: "Permanently delete an assessment item. This operation cannot be
        undone. Warning: Assessment tests that reference this item may be
        affected. The item references in test sections will need to be updated
        separately."
      tags: *a7
      parameters:
        - name: identifier
          description: Assessment item identifier
          in: path
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
          content: {}
        "404":
          description: Item not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-items/metadata:
    post:
      operationId: updateMetadata
      summary: Update metadata for a list of assessment items
      description: Update metadata for a list of assessment items. This operation is
        used to reset the human approved status for all assessment items.
      tags: *a7
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AssessmentItem"
            examples: *a16
      responses:
        "201":
          description: Metadata updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  type:
                    type: string
                    enum: *a10
                    description: Assessment item interaction types that are supported by the service
                      provider.
                  customInteractionTypeIdentifier:
                    type: string
                    description: For portable-custom interactions, the
                      custom-interaction-type-identifier attribute from the QTI
                      XML element.
                  qtiVersion:
                    type: string
                    default: "3.0"
                    description: QTI version of the assessment item
                  timeDependent:
                    type: boolean
                    default: false
                    description: Indicates whether the candidate's response time affects the scoring
                      or outcome of this assessment item. When true, timing data
                      is used in response processing calculations.
                  adaptive:
                    type: boolean
                    default: false
                    description: Indicates whether this assessment item adapts its presentation or
                      behavior based on the candidate's responses. Adaptive
                      items can modify their content, difficulty, or available
                      options during the assessment session.
                  responseDeclarations:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for this response variable within the item; must
                            be distinct from other item variables and cannot use
                            reserved names (completionStatus, numAttempts,
                            duration).
                        cardinality:
                          type: string
                          enum: *a3
                          description: Specifies how many values the response variable can hold and
                            whether order matters.
                        baseType:
                          type: string
                          enum: *a4
                          description: Primitive data type for each answer stored in the variable (e.g.,
                            integer, string, boolean). Omit when cardinality is
                            'record', because each field in a record may have
                            its own type.
                        correctResponse:
                          type: object
                          properties:
                            value:
                              type: array
                              items:
                                type: string
                          required:
                            - value
                          description: Optional model answer; must conform to the variable's cardinality
                            (single = one value, multiple/ordered = ordered or
                            unordered list); omit when no optimal answer exists
                            (e.g., essays); delivery engines may display it as
                            the solution in review mode.
                      required:
                        - identifier
                        - cardinality
                        - correctResponse
                  outcomeDeclarations:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for this response variable within the item; must
                            be distinct from other item variables and cannot use
                            reserved names (completionStatus, numAttempts,
                            duration).
                        cardinality:
                          type: string
                          enum: *a3
                          description: Specifies how many values the response variable can hold and
                            whether order matters.
                        baseType:
                          type: string
                          enum: *a4
                          description: Primitive data type for each answer stored in the variable (e.g.,
                            integer, string, boolean). Omit when cardinality is
                            'record', because each field in a record may have
                            its own type.
                      required:
                        - identifier
                        - cardinality
                  responseProcessing:
                    type: object
                    properties:
                      templateType:
                        type: string
                        enum: *a11
                        description: Response processing template type. 'match_correct' compares the
                          candidate's response directly against the correct
                          response and assigns binary feedback. 'map_response'
                          uses mapping rules to assign scores and feedback based
                          on response values.
                      responseDeclarationIdentifier:
                        type: string
                        description: Identifier of the response declaration that this response
                          processing rule applies to. Must match an existing
                          responseDeclaration identifier within the same
                          assessment item.
                      outcomeIdentifier:
                        type: string
                        description: Identifier of the outcome variable that will be set by this
                          response processing rule. Common values include
                          'SCORE' for numeric scoring or 'FEEDBACK' for feedback
                          identifiers.
                      correctResponseIdentifier:
                        type: string
                        description: Identifier value assigned to the outcome variable when the
                          candidate's response is evaluated as correct. Used
                          primarily with match_correct template type.
                      incorrectResponseIdentifier:
                        type: string
                        description: Identifier value assigned to the outcome variable when the
                          candidate's response is evaluated as incorrect. Used
                          primarily with match_correct template type.
                      inlineFeedback:
                        type: object
                        properties:
                          outcomeIdentifier:
                            type: string
                            description: Identifier of the outcome variable to be set with the inline
                              feedback value.
                          variableIdentifier:
                            type: string
                            description: Identifier of the variable whose value will be assigned to the
                              outcome variable during response processing.
                        required:
                          - outcomeIdentifier
                          - variableIdentifier
                        description: Optional inline feedback configuration that sets an outcome
                          variable based on another variable's value during
                          response processing.
                    required:
                      - templateType
                      - responseDeclarationIdentifier
                      - outcomeIdentifier
                      - correctResponseIdentifier
                      - incorrectResponseIdentifier
                    description: Response processing is the process by which the Delivery Engine
                      assigns outcomes based on the candidate's responses. The
                      outcomes may be used to provide feedback to the candidate.
                      Response processing must only take place in direct
                      response to a user action or in response to some expected
                      event, such as the end of a test.
                  metadata:
                    type: object
                    properties:
                      subject:
                        type: string
                        description: Subject area for the assessment item
                        example: Math
                      grade:
                        type: string
                        enum: *a12
                        description: Grade level for the assessment item. Must use a value from K-12
                        example: "10"
                      difficulty:
                        type: string
                        enum: *a13
                        description: Difficulty level of the assessment item
                        example: easy
                      learningObjectiveSet:
                        type: array
                        items:
                          type: object
                          properties:
                            source:
                              type: string
                              description: The source of the learning objective set or learning standards.
                              example: CASE
                            learningObjectiveIds:
                              type: array
                              items:
                                type: string
                              description: Array of learning objective identifiers. If source is 'CASE', these
                                can be the CFItem sourcedIds or CFItem's Human
                                Coding Schema.
                              example: *a14
                          required:
                            - source
                            - learningObjectiveIds
                        description: Learning objectives associated with this assessment item
                        example: *a15
                    additionalProperties: true
                    description: Additional custom metadata for assessment items with validation for
                      specific fields used by external applications
                  rawXml:
                    type: string
                    description: Raw XML representation of the entity, automatically generated from
                      the JSON or XML sent when creating entities on the service
                      provider. The rawxml field will contain all content sent
                      when creating the entity on the service provider. This
                      field is stable and should be used when working within
                      this QTI API.
                  content:
                    type: object
                    properties:
                      qti-assessment-item:
                        type: object
                        properties:
                          _attributes:
                            type: object
                            properties:
                              xmlns:
                                type: string
                              xmlns:xsi:
                                type: string
                              xsi:schemaLocation:
                                type: string
                              identifier:
                                type: string
                              title:
                                type: string
                              adaptive:
                                type: string
                              time-dependent:
                                type: string
                            required:
                              - xmlns
                              - xmlns:xsi
                              - xsi:schemaLocation
                              - identifier
                              - title
                              - adaptive
                              - time-dependent
                          qti-response-declaration:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    cardinality:
                                      type: string
                                    baseType:
                                      type: string
                                  required:
                                    - identifier
                                    - cardinality
                                    - baseType
                                qti-correct-response:
                                  type: object
                                  properties:
                                    qti-value:
                                      type: array
                                      items:
                                        type: string
                                  required:
                                    - qti-value
                              required:
                                - _attributes
                                - qti-correct-response
                          qti-outcome-declaration:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    cardinality:
                                      type: string
                                    baseType:
                                      type: string
                                  required:
                                    - identifier
                                    - cardinality
                                    - baseType
                              required:
                                - _attributes
                          qti-assessment-stimulus-ref:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    href:
                                      type: string
                                    title:
                                      type: string
                                  required:
                                    - identifier
                                    - href
                                    - title
                              required:
                                - _attributes
                          qti-item-body: {}
                          qti-response-processing: {}
                        required:
                          - _attributes
                          - qti-response-declaration
                          - qti-outcome-declaration
                    required:
                      - qti-assessment-item
                    description: Parsed XML content generated by the service provider. For
                      production use, rawXml is recommended over this parsed
                      structure.
                  modalFeedback:
                    type: array
                    items:
                      type: object
                      properties:
                        outcomeIdentifier:
                          type: string
                          description: Identifier of the outcome variable that controls when this feedback
                            is displayed. The feedback is shown or hidden based
                            on the value of this outcome variable after response
                            processing.
                        identifier:
                          type: string
                          description: Unique identifier for this specific feedback element within the
                            assessment item. Used to reference and control this
                            particular piece of feedback.
                        showHide:
                          type: string
                          enum: *a5
                          description: Determines the feedback visibility behavior. 'show' displays the
                            feedback when the outcome variable matches the
                            identifier, 'hide' conceals it when the outcome
                            variable matches.
                        content:
                          type: string
                          description: The HTML or text content to be displayed as feedback to the
                            candidate.
                        title:
                          type: string
                          description: Optional title displayed in the modal feedback dialog header. Only
                            used with modal feedback presentations.
                      required:
                        - outcomeIdentifier
                        - identifier
                        - showHide
                        - content
                        - title
                    description: Modal feedback shown to candidates in popup dialogs immediately
                      following response processing. Cannot contain interaction
                      elements and is displayed based on outcome variable
                      values.
                  feedbackInline:
                    type: array
                    items:
                      type: object
                      properties:
                        outcomeIdentifier:
                          type: string
                          description: Identifier of the outcome variable that controls when this feedback
                            is displayed. The feedback is shown or hidden based
                            on the value of this outcome variable after response
                            processing.
                        identifier:
                          type: string
                          description: Unique identifier for this specific feedback element within the
                            assessment item. Used to reference and control this
                            particular piece of feedback.
                        showHide:
                          type: string
                          enum: *a5
                          description: Determines the feedback visibility behavior. 'show' displays the
                            feedback when the outcome variable matches the
                            identifier, 'hide' conceals it when the outcome
                            variable matches.
                        content:
                          type: string
                          description: The HTML or text content to be displayed as feedback to the
                            candidate.
                        class:
                          type: array
                          items:
                            type: string
                          description: CSS class names applied to the feedback element for styling
                            purposes. Multiple classes can be specified for
                            flexible presentation control.
                      required:
                        - outcomeIdentifier
                        - identifier
                        - showHide
                        - content
                        - class
                    description: Inline feedback embedded within interaction elements, displayed
                      alongside choices or input areas. Provides contextual
                      feedback.
                  feedbackBlock:
                    type: array
                    items:
                      type: object
                      properties:
                        outcomeIdentifier:
                          type: string
                          description: Identifier of the outcome variable that controls when this feedback
                            is displayed. The feedback is shown or hidden based
                            on the value of this outcome variable after response
                            processing.
                        identifier:
                          type: string
                          description: Unique identifier for this specific feedback element within the
                            assessment item. Used to reference and control this
                            particular piece of feedback.
                        showHide:
                          type: string
                          enum: *a5
                          description: Determines the feedback visibility behavior. 'show' displays the
                            feedback when the outcome variable matches the
                            identifier, 'hide' conceals it when the outcome
                            variable matches.
                        content:
                          type: string
                          description: The HTML or text content to be displayed as feedback to the
                            candidate.
                        class:
                          type: array
                          items:
                            type: string
                          description: CSS class names applied to the feedback element for styling
                            purposes. Multiple classes can be specified for
                            flexible presentation control.
                      required:
                        - outcomeIdentifier
                        - identifier
                        - showHide
                        - content
                        - class
                    description: Inline feedback embedded within interaction elements, displayed
                      alongside choices or input areas. Provides contextual
                      feedback.
                  createdAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was created
                  updatedAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was last updated
                  __v:
                    type: number
                    description: MongoDB version key for optimistic concurrency control
                required:
                  - identifier
                  - title
                  - type
                  - qtiVersion
                  - timeDependent
                  - adaptive
                  - rawXml
                  - content
                  - createdAt
                  - updatedAt
        "400":
          description: Invalid request body
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-items/{identifier}/process-response:
    post:
      operationId: processResponse
      summary: Process a response for an assessment item
      description: Process a response for an assessment item. This operation validates
        the response and returns the result as well as the feedback identifier
        and the feedback value.
      tags: *a7
      parameters:
        - name: identifier
          description: Assessment item identifier
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identifier:
                  type: string
                  description: Unique identifier for the entity on the service provider.
                response:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                  description: The response to the assessment item for Free Response Question
                    grading using AI
              required:
                - identifier
                - response
      responses:
        "200":
          description: Response processed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  score:
                    type:
                      - number
                      - "null"
                    description: Numerical score for the response. Returns 1.0 for correct answers,
                      0.0 for incorrect answers, or a decimal value (0.0-1.0)
                      for AI-graded extended text responses. Null when the
                      question requires async grading
                      (requiresAsyncGrading=true).
                  isCorrect:
                    type:
                      - boolean
                      - "null"
                    description: Whether the response is correct. Null when the question requires
                      async grading.
                  feedback:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Feedback classification identifier. Typically 'correct' or
                          'incorrect' for standard questions, 'async-pending'
                          for async-graded questions, or custom identifiers for
                          more complex feedback scenarios.
                      value:
                        type: string
                        description: "Human-readable feedback message. For standard questions: 'Correct'
                          or 'Incorrect'. For AI-graded responses: may include
                          detailed rationale or explanation."
                    required:
                      - identifier
                      - value
                    description: Structured feedback information containing both machine-readable
                      identifier and human-readable message.
                  requiresAsyncGrading:
                    type: boolean
                    description: When true, the response has been submitted for asynchronous AI
                      grading. Score and isCorrect will be null until grading
                      completes.
                  graderUrl:
                    type: string
                    description: The URL of the external grader service. Only present when
                      requiresAsyncGrading is true.
                required:
                  - score
                  - feedback
                description: Response processing result containing the calculated score and
                  feedback for a candidate's response to an assessment item.
        "404":
          description: Assessment item not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-tests:
    get:
      operationId: searchAssessmentTests
      summary: Search and filter assessment tests
      description: Search and retrieve assessment tests with advanced filtering
        capabilities. Supports text search across titles and identifiers,
        filtering by navigation/submission modes, and pagination. Assessment
        tests are the top-level containers that define complete testing
        experiences through their test parts and sections.
      tags: &a18
        - Assessment Test Management
      parameters:
        - in: query
          name: query
          description: Search title and identifier fields using a search term. This is a
            fuzzy search.
          schema:
            type: string
            description: Search title and identifier fields using a search term. This is a
              fuzzy search.
        - in: query
          name: page
          description: Page number for pagination
          schema:
            type: string
            default: "1"
            description: Page number for pagination
            example: 1
        - in: query
          name: limit
          description: Number of items per page
          schema:
            type: string
            default: "10"
            description: Number of items per page
            example: 10
        - in: query
          name: sort
          description: Field to sort by
          schema:
            type: string
            enum: *a17
            description: Field to sort by
            example: createdAt
        - in: query
          name: order
          description: Sort order
          schema:
            type: string
            enum: *a2
            default: desc
            description: Sort order
            example: desc
        - in: query
          name: navigationMode
          description: "Filter by navigation mode (linear: sequential navigation,
            nonlinear: free navigation)"
          schema:
            type: string
            enum: &a24
              - linear
              - nonlinear
            description: "Filter by navigation mode (linear: sequential navigation,
              nonlinear: free navigation)"
            example: linear
        - in: query
          name: submissionMode
          description: "Filter by submission mode (individual: submit per item,
            simultaneous: submit all at once)"
          schema:
            type: string
            enum: &a25
              - individual
              - simultaneous
            description: "Filter by submission mode (individual: submit per item,
              simultaneous: submit all at once)"
            example: individual
        - in: query
          name: subject
          description: Filter by subject (e.g. Math, Reading) using the optimized
            consolidated field
          schema:
            type: string
            description: Filter by subject (e.g. Math, Reading) using the optimized
              consolidated field
            example: Math
        - in: query
          name: grade
          description: Filter by grade level using the optimized consolidated field
          schema:
            type: string
            description: Filter by grade level using the optimized consolidated field
            example: "5"
        - in: query
          name: hasQuestions
          description: Filter tests based on whether they have questions (true) or not
            (false)
          schema:
            type: string
            enum: &a26
              - "true"
              - "false"
            description: Filter tests based on whether they have questions (true) or not
              (false)
            example: "true"
        - in: query
          name: filter
          description: "Advanced filter expression using =, !=, >, >=, <, <=, ~ and
            logical AND/OR. Example: type='practice' AND createdAt>'2024-01-01'"
          schema:
            type: string
            description: "Advanced filter expression using =, !=, >, >=, <, <=, ~ and
              logical AND/OR. Example: type='practice' AND
              createdAt>'2024-01-01'"
      responses:
        "200":
          description: Assessment tests retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        title:
                          type: string
                          description: Human-readable title of the entity on the service provider.
                        qtiVersion:
                          type: string
                          default: "3.0"
                          description: Version of the specification used for this assessment test
                        qti-test-part:
                          type: array
                          items:
                            type: object
                            properties:
                              identifier:
                                type: string
                                description: Unique identifier for the entity on the service provider.
                              navigationMode:
                                type: string
                                enum: &a19
                                  - linear
                                  - nonlinear
                                description: Controls how learners navigate through the test part. 'linear'
                                  requires items to be responded to in sequence
                                  without jumping around, while 'nonlinear'
                                  allows candidates to respond to items in any
                                  order they choose.
                              submissionMode:
                                type: string
                                enum: &a20
                                  - individual
                                  - simultaneous
                                description: Determines how learner responses are submitted for response
                                  processing. 'individual' allows responses to
                                  be submitted as each item is completed, while
                                  'simultaneous' means responses for all items
                                  are sent when the whole part is completed.
                              qti-assessment-section:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                      description: Unique identifier for the entity on the service provider.
                                    title:
                                      type: string
                                      description: Human-readable title of the entity on the service provider.
                                    visible:
                                      type: boolean
                                      default: true
                                      description: Determines whether the assessment section is visible to candidates
                                        during test delivery. Sections are
                                        visible by default unless explicitly
                                        hidden for specific assessment
                                        conditions.
                                    required:
                                      type: boolean
                                      default: true
                                      description: If a child element is required it must appear (at least once) in
                                        the selection.
                                    fixed:
                                      type: boolean
                                      default: false
                                      description: If a child element is fixed it must never be shuffled. When used in
                                        combination with a selection rule fixed
                                        elements do not have their position
                                        fixed until after selection has taken
                                        place.
                                    sequence:
                                      type: integer
                                      exclusiveMinimum: 0
                                      description: Defines the sequential order of this item within its parent
                                        section. Must be a positive integer that
                                        determines presentation order to
                                        candidates.
                                    qti-assessment-item-ref:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          identifier:
                                            type: string
                                            description: Unique identifier for the entity on the service provider.
                                          href:
                                            type: string
                                            description: URI reference to the assessment item resource location on the
                                              service provider
                                        required:
                                          - identifier
                                        description: Assessment item reference schema for linking assessment items to
                                          sections
                                      description: Collection of assessment items that are referenced within this
                                        section.
                                    qti-pre-condition:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                      description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                                        logical expression that is evaluated
                                        before the element is presented. If any
                                        pre-condition evaluates to false, the
                                        element is skipped.
                                    qti-branch-rule:
                                      type: array
                                      items:
                                        type: object
                                        additionalProperties: {}
                                      description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                                        expression that, when evaluated to true
                                        after the element is presented, causes
                                        the test to jump to the target
                                        identified by the rule.
                                  required:
                                    - identifier
                                    - title
                                    - visible
                                  description: Complete assessment section data with all referenced items.
                                    Represents a section containing learning
                                    content within a test part.
                              qti-pre-condition:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: {}
                                description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                                  logical expression that is evaluated before
                                  the element is presented. If any pre-condition
                                  evaluates to false, the element is skipped.
                              qti-branch-rule:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: {}
                                description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                                  expression that, when evaluated to true after
                                  the element is presented, causes the test to
                                  jump to the target identified by the rule.
                            required:
                              - identifier
                              - navigationMode
                              - submissionMode
                              - qti-assessment-section
                            description: Complete test part data returned from the service provider.
                              Contains all sections and their configuration.
                        qti-outcome-declaration:
                          type: array
                          items:
                            type: object
                            properties:
                              identifier:
                                type: string
                                description: Unique identifier for the entity on the service provider.
                              cardinality:
                                type: string
                                enum: &a21
                                  - single
                                  - multiple
                                  - ordered
                                  - record
                                default: single
                                description: Defines how scoring information is structured and stored. 'single'
                                  for one overall score, 'multiple' for separate
                                  scores or points, 'ordered' for scores
                                  maintaining a specific sequence, 'record' for
                                  complex scoring with multiple named
                                  components.
                              baseType:
                                type: string
                                enum: &a22
                                  - identifier
                                  - boolean
                                  - integer
                                  - float
                                  - string
                                  - point
                                  - pair
                                  - directedPair
                                  - duration
                                  - file
                                  - uri
                                description: Data type of the outcome variable, determining how values are
                                  stored and processed
                              normalMaximum:
                                type: number
                                description: Expected maximum value for this outcome variable in normal
                                  circumstances
                              normalMinimum:
                                type: number
                                description: Expected minimum value for this outcome variable in normal
                                  circumstances
                              defaultValue:
                                type: object
                                properties:
                                  value:
                                    description: The default value to assign to the outcome variable
                                description: Optional default value configuration for outcome variables
                            required:
                              - identifier
                              - cardinality
                              - baseType
                          description: Array of outcome variable declarations for storing assessment
                            results and computed values
                        timeLimit:
                          type: number
                          description: Time limit for the entire assessment test in seconds. When not
                            specified, there is no time limit
                        maxAttempts:
                          type: number
                          description: Maximum number of attempts allowed for the assessment test. When
                            not specified, unlimited attempts are allowed
                        toolsEnabled:
                          type: object
                          additionalProperties:
                            type: boolean
                          description: Configuration of assessment tools available to candidates. Each
                            tool is represented as a key-value pair where the
                            key is the tool name and the value indicates if it's
                            enabled
                        metadata:
                          type: object
                          additionalProperties: {}
                          description: Additional custom metadata for extending entity properties beyond
                            standard specification for QTI entities.
                        rawXml:
                          type: string
                          description: Raw XML representation of the entity, automatically generated from
                            the JSON or XML sent when creating entities on the
                            service provider. The rawxml field will contain all
                            content sent when creating the entity on the service
                            provider. This field is stable and should be used
                            when working within this QTI API.
                        content:
                          type: object
                          properties:
                            qti-assessment-test:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    xmlns:
                                      type: string
                                    xmlns:xsi:
                                      type: string
                                    xsi:schemaLocation:
                                      type: string
                                    identifier:
                                      type: string
                                    title:
                                      type: string
                                    tool-name:
                                      type: string
                                    tool-version:
                                      type: string
                                  required:
                                    - xmlns
                                    - xmlns:xsi
                                    - xsi:schemaLocation
                                    - identifier
                                    - title
                                    - tool-name
                                    - tool-version
                                qti-outcome-declaration:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          identifier:
                                            type: string
                                          cardinality:
                                            type: string
                                          base-type:
                                            type: string
                                        required:
                                          - identifier
                                          - cardinality
                                          - base-type
                                      qti-default-value:
                                        type: object
                                        properties:
                                          qti-value: {}
                                      normal-maximum:
                                        type: number
                                      normal-minimum:
                                        type: number
                                    required:
                                      - _attributes
                                qti-test-part:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          identifier:
                                            type: string
                                          navigation-mode:
                                            type: string
                                          submission-mode:
                                            type: string
                                        required:
                                          - identifier
                                          - navigation-mode
                                          - submission-mode
                                      qti-assessment-section:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            _attributes:
                                              type: object
                                              properties:
                                                identifier:
                                                  type: string
                                                title:
                                                  type: string
                                                visible:
                                                  type: string
                                              required:
                                                - identifier
                                                - title
                                                - visible
                                            qti-assessment-item-ref:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  _attributes:
                                                    type: object
                                                    properties:
                                                      identifier:
                                                        type: string
                                                      href:
                                                        type: string
                                                    required:
                                                      - identifier
                                                      - href
                                                required:
                                                  - _attributes
                                          required:
                                            - _attributes
                                    required:
                                      - _attributes
                                      - qti-assessment-section
                              required:
                                - _attributes
                                - qti-outcome-declaration
                                - qti-test-part
                          required:
                            - qti-assessment-test
                          description: Parsed XML content structure for the assessment test. For
                            production use, rawXml is recommended over this
                            parsed structure.
                        createdAt:
                          type: string
                          format: date-time
                          description: ISO 8601 timestamp when the entity was created
                        updatedAt:
                          type: string
                          format: date-time
                          description: ISO 8601 timestamp when the entity was last updated
                        __v:
                          type: number
                          description: MongoDB version key for optimistic concurrency control
                      required:
                        - identifier
                        - title
                        - qtiVersion
                        - qti-test-part
                        - qti-outcome-declaration
                        - rawXml
                        - content
                        - createdAt
                        - updatedAt
                      description: Complete assessment test data including all test parts, sections,
                        items, and configuration settings
                    description: Array of assessment tests that match the search criteria on the
                      service provider
                  total:
                    type: number
                    description: The total number of entities that match the search criteria.
                  page:
                    type: number
                    description: The page number of the entities that match the search criteria.
                    default: 1
                  pages:
                    type: number
                    description: The total number of pages of entities that match the search
                      criteria.
                  limit:
                    type: number
                    description: The number of entities per page.
                    default: 10
                  sort:
                    type: string
                    description: The field to sort the entities by.
                  order:
                    type: string
                    enum: *a6
                    description: The order to sort the entities by. Either 'asc' or 'desc'.
                required:
                  - items
                  - total
                  - page
                  - pages
                  - limit
                  - sort
                  - order
                description: Paginated response containing all assessment tests available on the
                  service provider with navigation metadata
        "400":
          description: Invalid request parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
    post:
      operationId: createAssessmentTest
      summary: Create a new assessment test
      description: Create a new assessment test. Supports both JSON and XML formats.
      tags: *a18
      requestBody:
        description: The assessment test to create
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AssessmentTest"
          application/xml:
            schema: &a23
              type: object
              xml:
                name: qti-assessment-test
                namespace: http://www.imsglobal.org/xsd/imsqtiasi_v3p0
              properties:
                identifier:
                  type: string
                  xml:
                    attribute: true
                title:
                  type: string
                  xml:
                    attribute: true
                qti-outcome-declaration:
                  type: array
                  xml:
                    wrapped: false
                  items:
                    type: object
                    xml:
                      name: qti-outcome-declaration
                qti-test-part:
                  type: array
                  xml:
                    wrapped: false
                  items:
                    type: object
                    xml:
                      name: qti-test-part
            example: |-
              <?xml version="1.0" encoding="UTF-8"?>
              <qti-assessment-test xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd" identifier="math-algebra-midterm-exam" title="Algebra Fundamentals - Midterm Assessment">
                <qti-outcome-declaration identifier="SCORE" cardinality="single" base-type="float">
                  <qti-default-value>
                    <qti-value>0.0</qti-value>
                  </qti-default-value>
                </qti-outcome-declaration>
                <qti-test-part identifier="main-test-part" navigation-mode="linear" submission-mode="individual">
                  <qti-assessment-section identifier="algebra-basics-section" title="Algebra Basics" visible="true">
                    <qti-assessment-item-ref identifier="linear-equations-q1" href="http://localhost:3001/api/assessment-items/linear-equations-q1"/>
                    <qti-assessment-item-ref identifier="quadratic-functions-q2" href="http://localhost:3001/api/assessment-items/quadratic-functions-q2"/>
                    <qti-assessment-item-ref identifier="polynomial-operations-q3" href="http://localhost:3001/api/assessment-items/polynomial-operations-q3"/>
                  </qti-assessment-section>
                  <qti-assessment-section identifier="word-problems-section" title="Word Problems" visible="true">
                    <qti-assessment-item-ref identifier="distance-rate-time-q4" href="http://localhost:3001/api/assessment-items/distance-rate-time-q4"/>
                    <qti-assessment-item-ref identifier="mixture-problem-q5" href="http://localhost:3001/api/assessment-items/mixture-problem-q5"/>
                  </qti-assessment-section>
                </qti-test-part>
              </qti-assessment-test>
      responses:
        "201":
          description: Assessment test created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  qtiVersion:
                    type: string
                    default: "3.0"
                    description: Version of the specification used for this assessment test
                  qti-test-part:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        navigationMode:
                          type: string
                          enum: *a19
                          description: Controls how learners navigate through the test part. 'linear'
                            requires items to be responded to in sequence
                            without jumping around, while 'nonlinear' allows
                            candidates to respond to items in any order they
                            choose.
                        submissionMode:
                          type: string
                          enum: *a20
                          description: Determines how learner responses are submitted for response
                            processing. 'individual' allows responses to be
                            submitted as each item is completed, while
                            'simultaneous' means responses for all items are
                            sent when the whole part is completed.
                        qti-assessment-section:
                          type: array
                          items:
                            type: object
                            properties:
                              identifier:
                                type: string
                                description: Unique identifier for the entity on the service provider.
                              title:
                                type: string
                                description: Human-readable title of the entity on the service provider.
                              visible:
                                type: boolean
                                default: true
                                description: Determines whether the assessment section is visible to candidates
                                  during test delivery. Sections are visible by
                                  default unless explicitly hidden for specific
                                  assessment conditions.
                              required:
                                type: boolean
                                default: true
                                description: If a child element is required it must appear (at least once) in
                                  the selection.
                              fixed:
                                type: boolean
                                default: false
                                description: If a child element is fixed it must never be shuffled. When used in
                                  combination with a selection rule fixed
                                  elements do not have their position fixed
                                  until after selection has taken place.
                              sequence:
                                type: integer
                                exclusiveMinimum: 0
                                description: Defines the sequential order of this item within its parent
                                  section. Must be a positive integer that
                                  determines presentation order to candidates.
                              qti-assessment-item-ref:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                      description: Unique identifier for the entity on the service provider.
                                    href:
                                      type: string
                                      description: URI reference to the assessment item resource location on the
                                        service provider
                                  required:
                                    - identifier
                                  description: Assessment item reference schema for linking assessment items to
                                    sections
                                description: Collection of assessment items that are referenced within this
                                  section.
                              qti-pre-condition:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: {}
                                description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                                  logical expression that is evaluated before
                                  the element is presented. If any pre-condition
                                  evaluates to false, the element is skipped.
                              qti-branch-rule:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: {}
                                description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                                  expression that, when evaluated to true after
                                  the element is presented, causes the test to
                                  jump to the target identified by the rule.
                            required:
                              - identifier
                              - title
                              - visible
                            description: Complete assessment section data with all referenced items.
                              Represents a section containing learning content
                              within a test part.
                        qti-pre-condition:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                            logical expression that is evaluated before the
                            element is presented. If any pre-condition evaluates
                            to false, the element is skipped.
                        qti-branch-rule:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                            expression that, when evaluated to true after the
                            element is presented, causes the test to jump to the
                            target identified by the rule.
                      required:
                        - identifier
                        - navigationMode
                        - submissionMode
                        - qti-assessment-section
                      description: Complete test part data returned from the service provider.
                        Contains all sections and their configuration.
                  qti-outcome-declaration:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        cardinality:
                          type: string
                          enum: *a21
                          default: single
                          description: Defines how scoring information is structured and stored. 'single'
                            for one overall score, 'multiple' for separate
                            scores or points, 'ordered' for scores maintaining a
                            specific sequence, 'record' for complex scoring with
                            multiple named components.
                        baseType:
                          type: string
                          enum: *a22
                          description: Data type of the outcome variable, determining how values are
                            stored and processed
                        normalMaximum:
                          type: number
                          description: Expected maximum value for this outcome variable in normal
                            circumstances
                        normalMinimum:
                          type: number
                          description: Expected minimum value for this outcome variable in normal
                            circumstances
                        defaultValue:
                          type: object
                          properties:
                            value:
                              description: The default value to assign to the outcome variable
                          description: Optional default value configuration for outcome variables
                      required:
                        - identifier
                        - cardinality
                        - baseType
                    description: Array of outcome variable declarations for storing assessment
                      results and computed values
                  timeLimit:
                    type: number
                    description: Time limit for the entire assessment test in seconds. When not
                      specified, there is no time limit
                  maxAttempts:
                    type: number
                    description: Maximum number of attempts allowed for the assessment test. When
                      not specified, unlimited attempts are allowed
                  toolsEnabled:
                    type: object
                    additionalProperties:
                      type: boolean
                    description: Configuration of assessment tools available to candidates. Each
                      tool is represented as a key-value pair where the key is
                      the tool name and the value indicates if it's enabled
                  metadata:
                    type: object
                    additionalProperties: {}
                    description: Additional custom metadata for extending entity properties beyond
                      standard specification for QTI entities.
                  rawXml:
                    type: string
                    description: Raw XML representation of the entity, automatically generated from
                      the JSON or XML sent when creating entities on the service
                      provider. The rawxml field will contain all content sent
                      when creating the entity on the service provider. This
                      field is stable and should be used when working within
                      this QTI API.
                  content:
                    type: object
                    properties:
                      qti-assessment-test:
                        type: object
                        properties:
                          _attributes:
                            type: object
                            properties:
                              xmlns:
                                type: string
                              xmlns:xsi:
                                type: string
                              xsi:schemaLocation:
                                type: string
                              identifier:
                                type: string
                              title:
                                type: string
                              tool-name:
                                type: string
                              tool-version:
                                type: string
                            required:
                              - xmlns
                              - xmlns:xsi
                              - xsi:schemaLocation
                              - identifier
                              - title
                              - tool-name
                              - tool-version
                          qti-outcome-declaration:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    cardinality:
                                      type: string
                                    base-type:
                                      type: string
                                  required:
                                    - identifier
                                    - cardinality
                                    - base-type
                                qti-default-value:
                                  type: object
                                  properties:
                                    qti-value: {}
                                normal-maximum:
                                  type: number
                                normal-minimum:
                                  type: number
                              required:
                                - _attributes
                          qti-test-part:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    navigation-mode:
                                      type: string
                                    submission-mode:
                                      type: string
                                  required:
                                    - identifier
                                    - navigation-mode
                                    - submission-mode
                                qti-assessment-section:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          identifier:
                                            type: string
                                          title:
                                            type: string
                                          visible:
                                            type: string
                                        required:
                                          - identifier
                                          - title
                                          - visible
                                      qti-assessment-item-ref:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            _attributes:
                                              type: object
                                              properties:
                                                identifier:
                                                  type: string
                                                href:
                                                  type: string
                                              required:
                                                - identifier
                                                - href
                                          required:
                                            - _attributes
                                    required:
                                      - _attributes
                              required:
                                - _attributes
                                - qti-assessment-section
                        required:
                          - _attributes
                          - qti-outcome-declaration
                          - qti-test-part
                    required:
                      - qti-assessment-test
                    description: Parsed XML content structure for the assessment test. For
                      production use, rawXml is recommended over this parsed
                      structure.
                  createdAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was created
                  updatedAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was last updated
                  __v:
                    type: number
                    description: MongoDB version key for optimistic concurrency control
                  isValidXml:
                    type: boolean
                    description: Indicates whether the generated XML is valid according to schema
                      validation
                required:
                  - identifier
                  - title
                  - qtiVersion
                  - qti-test-part
                  - qti-outcome-declaration
                  - rawXml
                  - content
                  - createdAt
                  - updatedAt
                  - isValidXml
                description: Complete assessment test data including all test parts, sections,
                  items, and configuration settings
        "400":
          description: Invalid assessment test data
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "409":
          description: Assessment test with this identifier already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-tests/{identifier}:
    get:
      operationId: getAssessmentTest
      summary: Get a complete assessment test with full structure
      description: Retrieve a complete assessment test including all its test parts,
        sections, and assessment item references. This provides the full
        hierarchical structure needed to understand the test organization and
        flow. Supports both JSON and XML response formats based on the
        Content-Type header.
      tags: *a18
      parameters:
        - name: identifier
          description: The unique identifier of the assessment test to retrieve
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Assessment test retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  qtiVersion:
                    type: string
                    default: "3.0"
                    description: Version of the specification used for this assessment test
                  qti-test-part:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        navigationMode:
                          type: string
                          enum: *a19
                          description: Controls how learners navigate through the test part. 'linear'
                            requires items to be responded to in sequence
                            without jumping around, while 'nonlinear' allows
                            candidates to respond to items in any order they
                            choose.
                        submissionMode:
                          type: string
                          enum: *a20
                          description: Determines how learner responses are submitted for response
                            processing. 'individual' allows responses to be
                            submitted as each item is completed, while
                            'simultaneous' means responses for all items are
                            sent when the whole part is completed.
                        qti-assessment-section:
                          type: array
                          items:
                            type: object
                            properties:
                              identifier:
                                type: string
                                description: Unique identifier for the entity on the service provider.
                              title:
                                type: string
                                description: Human-readable title of the entity on the service provider.
                              visible:
                                type: boolean
                                default: true
                                description: Determines whether the assessment section is visible to candidates
                                  during test delivery. Sections are visible by
                                  default unless explicitly hidden for specific
                                  assessment conditions.
                              required:
                                type: boolean
                                default: true
                                description: If a child element is required it must appear (at least once) in
                                  the selection.
                              fixed:
                                type: boolean
                                default: false
                                description: If a child element is fixed it must never be shuffled. When used in
                                  combination with a selection rule fixed
                                  elements do not have their position fixed
                                  until after selection has taken place.
                              sequence:
                                type: integer
                                exclusiveMinimum: 0
                                description: Defines the sequential order of this item within its parent
                                  section. Must be a positive integer that
                                  determines presentation order to candidates.
                              qti-assessment-item-ref:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                      description: Unique identifier for the entity on the service provider.
                                    href:
                                      type: string
                                      description: URI reference to the assessment item resource location on the
                                        service provider
                                  required:
                                    - identifier
                                  description: Assessment item reference schema for linking assessment items to
                                    sections
                                description: Collection of assessment items that are referenced within this
                                  section.
                              qti-pre-condition:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: {}
                                description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                                  logical expression that is evaluated before
                                  the element is presented. If any pre-condition
                                  evaluates to false, the element is skipped.
                              qti-branch-rule:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: {}
                                description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                                  expression that, when evaluated to true after
                                  the element is presented, causes the test to
                                  jump to the target identified by the rule.
                            required:
                              - identifier
                              - title
                              - visible
                            description: Complete assessment section data with all referenced items.
                              Represents a section containing learning content
                              within a test part.
                        qti-pre-condition:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                            logical expression that is evaluated before the
                            element is presented. If any pre-condition evaluates
                            to false, the element is skipped.
                        qti-branch-rule:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                            expression that, when evaluated to true after the
                            element is presented, causes the test to jump to the
                            target identified by the rule.
                      required:
                        - identifier
                        - navigationMode
                        - submissionMode
                        - qti-assessment-section
                      description: Complete test part data returned from the service provider.
                        Contains all sections and their configuration.
                  qti-outcome-declaration:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        cardinality:
                          type: string
                          enum: *a21
                          default: single
                          description: Defines how scoring information is structured and stored. 'single'
                            for one overall score, 'multiple' for separate
                            scores or points, 'ordered' for scores maintaining a
                            specific sequence, 'record' for complex scoring with
                            multiple named components.
                        baseType:
                          type: string
                          enum: *a22
                          description: Data type of the outcome variable, determining how values are
                            stored and processed
                        normalMaximum:
                          type: number
                          description: Expected maximum value for this outcome variable in normal
                            circumstances
                        normalMinimum:
                          type: number
                          description: Expected minimum value for this outcome variable in normal
                            circumstances
                        defaultValue:
                          type: object
                          properties:
                            value:
                              description: The default value to assign to the outcome variable
                          description: Optional default value configuration for outcome variables
                      required:
                        - identifier
                        - cardinality
                        - baseType
                    description: Array of outcome variable declarations for storing assessment
                      results and computed values
                  timeLimit:
                    type: number
                    description: Time limit for the entire assessment test in seconds. When not
                      specified, there is no time limit
                  maxAttempts:
                    type: number
                    description: Maximum number of attempts allowed for the assessment test. When
                      not specified, unlimited attempts are allowed
                  toolsEnabled:
                    type: object
                    additionalProperties:
                      type: boolean
                    description: Configuration of assessment tools available to candidates. Each
                      tool is represented as a key-value pair where the key is
                      the tool name and the value indicates if it's enabled
                  metadata:
                    type: object
                    additionalProperties: {}
                    description: Additional custom metadata for extending entity properties beyond
                      standard specification for QTI entities.
                  rawXml:
                    type: string
                    description: Raw XML representation of the entity, automatically generated from
                      the JSON or XML sent when creating entities on the service
                      provider. The rawxml field will contain all content sent
                      when creating the entity on the service provider. This
                      field is stable and should be used when working within
                      this QTI API.
                  content:
                    type: object
                    properties:
                      qti-assessment-test:
                        type: object
                        properties:
                          _attributes:
                            type: object
                            properties:
                              xmlns:
                                type: string
                              xmlns:xsi:
                                type: string
                              xsi:schemaLocation:
                                type: string
                              identifier:
                                type: string
                              title:
                                type: string
                              tool-name:
                                type: string
                              tool-version:
                                type: string
                            required:
                              - xmlns
                              - xmlns:xsi
                              - xsi:schemaLocation
                              - identifier
                              - title
                              - tool-name
                              - tool-version
                          qti-outcome-declaration:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    cardinality:
                                      type: string
                                    base-type:
                                      type: string
                                  required:
                                    - identifier
                                    - cardinality
                                    - base-type
                                qti-default-value:
                                  type: object
                                  properties:
                                    qti-value: {}
                                normal-maximum:
                                  type: number
                                normal-minimum:
                                  type: number
                              required:
                                - _attributes
                          qti-test-part:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    navigation-mode:
                                      type: string
                                    submission-mode:
                                      type: string
                                  required:
                                    - identifier
                                    - navigation-mode
                                    - submission-mode
                                qti-assessment-section:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          identifier:
                                            type: string
                                          title:
                                            type: string
                                          visible:
                                            type: string
                                        required:
                                          - identifier
                                          - title
                                          - visible
                                      qti-assessment-item-ref:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            _attributes:
                                              type: object
                                              properties:
                                                identifier:
                                                  type: string
                                                href:
                                                  type: string
                                              required:
                                                - identifier
                                                - href
                                          required:
                                            - _attributes
                                    required:
                                      - _attributes
                              required:
                                - _attributes
                                - qti-assessment-section
                        required:
                          - _attributes
                          - qti-outcome-declaration
                          - qti-test-part
                    required:
                      - qti-assessment-test
                    description: Parsed XML content structure for the assessment test. For
                      production use, rawXml is recommended over this parsed
                      structure.
                  createdAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was created
                  updatedAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was last updated
                  __v:
                    type: number
                    description: MongoDB version key for optimistic concurrency control
                  isValidXml:
                    type: boolean
                    description: Indicates whether the generated XML is valid according to schema
                      validation
                required:
                  - identifier
                  - title
                  - qtiVersion
                  - qti-test-part
                  - qti-outcome-declaration
                  - rawXml
                  - content
                  - createdAt
                  - updatedAt
                  - isValidXml
                description: Complete assessment test data including all test parts, sections,
                  items, and configuration settings
        "404":
          description: Assessment test not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
    put:
      operationId: updateAssessmentTest
      summary: Update an entire assessment test
      description: Update an assessment test by replacing its complete structure. This
        operation updates the entire assessment test including its test parts,
        sections, and item references. Supports both JSON and XML formats. The
        updated XML structure is automatically regenerated.
      tags: *a18
      parameters:
        - name: identifier
          description: Assessment test identifier to update
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: The assessment test to update
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AssessmentTest"
          application/xml:
            schema: *a23
            example: |-
              <?xml version="1.0" encoding="UTF-8"?>
              <qti-assessment-test xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd" identifier="math-algebra-midterm-exam" title="Algebra Fundamentals - Midterm Assessment">
                <qti-outcome-declaration identifier="SCORE" cardinality="single" base-type="float">
                  <qti-default-value>
                    <qti-value>0.0</qti-value>
                  </qti-default-value>
                </qti-outcome-declaration>
                <qti-test-part identifier="main-test-part" navigation-mode="linear" submission-mode="individual">
                  <qti-assessment-section identifier="algebra-basics-section" title="Algebra Basics" visible="true">
                    <qti-assessment-item-ref identifier="linear-equations-q1" href="http://localhost:3001/api/assessment-items/linear-equations-q1"/>
                    <qti-assessment-item-ref identifier="quadratic-functions-q2" href="http://localhost:3001/api/assessment-items/quadratic-functions-q2"/>
                    <qti-assessment-item-ref identifier="polynomial-operations-q3" href="http://localhost:3001/api/assessment-items/polynomial-operations-q3"/>
                  </qti-assessment-section>
                  <qti-assessment-section identifier="word-problems-section" title="Word Problems" visible="true">
                    <qti-assessment-item-ref identifier="distance-rate-time-q4" href="http://localhost:3001/api/assessment-items/distance-rate-time-q4"/>
                    <qti-assessment-item-ref identifier="mixture-problem-q5" href="http://localhost:3001/api/assessment-items/mixture-problem-q5"/>
                  </qti-assessment-section>
                </qti-test-part>
              </qti-assessment-test>
      responses:
        "200":
          description: Assessment test updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  qtiVersion:
                    type: string
                    default: "3.0"
                    description: Version of the specification used for this assessment test
                  qti-test-part:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        navigationMode:
                          type: string
                          enum: *a19
                          description: Controls how learners navigate through the test part. 'linear'
                            requires items to be responded to in sequence
                            without jumping around, while 'nonlinear' allows
                            candidates to respond to items in any order they
                            choose.
                        submissionMode:
                          type: string
                          enum: *a20
                          description: Determines how learner responses are submitted for response
                            processing. 'individual' allows responses to be
                            submitted as each item is completed, while
                            'simultaneous' means responses for all items are
                            sent when the whole part is completed.
                        qti-assessment-section:
                          type: array
                          items:
                            type: object
                            properties:
                              identifier:
                                type: string
                                description: Unique identifier for the entity on the service provider.
                              title:
                                type: string
                                description: Human-readable title of the entity on the service provider.
                              visible:
                                type: boolean
                                default: true
                                description: Determines whether the assessment section is visible to candidates
                                  during test delivery. Sections are visible by
                                  default unless explicitly hidden for specific
                                  assessment conditions.
                              required:
                                type: boolean
                                default: true
                                description: If a child element is required it must appear (at least once) in
                                  the selection.
                              fixed:
                                type: boolean
                                default: false
                                description: If a child element is fixed it must never be shuffled. When used in
                                  combination with a selection rule fixed
                                  elements do not have their position fixed
                                  until after selection has taken place.
                              sequence:
                                type: integer
                                exclusiveMinimum: 0
                                description: Defines the sequential order of this item within its parent
                                  section. Must be a positive integer that
                                  determines presentation order to candidates.
                              qti-assessment-item-ref:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                      description: Unique identifier for the entity on the service provider.
                                    href:
                                      type: string
                                      description: URI reference to the assessment item resource location on the
                                        service provider
                                  required:
                                    - identifier
                                  description: Assessment item reference schema for linking assessment items to
                                    sections
                                description: Collection of assessment items that are referenced within this
                                  section.
                              qti-pre-condition:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: {}
                                description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                                  logical expression that is evaluated before
                                  the element is presented. If any pre-condition
                                  evaluates to false, the element is skipped.
                              qti-branch-rule:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: {}
                                description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                                  expression that, when evaluated to true after
                                  the element is presented, causes the test to
                                  jump to the target identified by the rule.
                            required:
                              - identifier
                              - title
                              - visible
                            description: Complete assessment section data with all referenced items.
                              Represents a section containing learning content
                              within a test part.
                        qti-pre-condition:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                            logical expression that is evaluated before the
                            element is presented. If any pre-condition evaluates
                            to false, the element is skipped.
                        qti-branch-rule:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                            expression that, when evaluated to true after the
                            element is presented, causes the test to jump to the
                            target identified by the rule.
                      required:
                        - identifier
                        - navigationMode
                        - submissionMode
                        - qti-assessment-section
                      description: Complete test part data returned from the service provider.
                        Contains all sections and their configuration.
                  qti-outcome-declaration:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        cardinality:
                          type: string
                          enum: *a21
                          default: single
                          description: Defines how scoring information is structured and stored. 'single'
                            for one overall score, 'multiple' for separate
                            scores or points, 'ordered' for scores maintaining a
                            specific sequence, 'record' for complex scoring with
                            multiple named components.
                        baseType:
                          type: string
                          enum: *a22
                          description: Data type of the outcome variable, determining how values are
                            stored and processed
                        normalMaximum:
                          type: number
                          description: Expected maximum value for this outcome variable in normal
                            circumstances
                        normalMinimum:
                          type: number
                          description: Expected minimum value for this outcome variable in normal
                            circumstances
                        defaultValue:
                          type: object
                          properties:
                            value:
                              description: The default value to assign to the outcome variable
                          description: Optional default value configuration for outcome variables
                      required:
                        - identifier
                        - cardinality
                        - baseType
                    description: Array of outcome variable declarations for storing assessment
                      results and computed values
                  timeLimit:
                    type: number
                    description: Time limit for the entire assessment test in seconds. When not
                      specified, there is no time limit
                  maxAttempts:
                    type: number
                    description: Maximum number of attempts allowed for the assessment test. When
                      not specified, unlimited attempts are allowed
                  toolsEnabled:
                    type: object
                    additionalProperties:
                      type: boolean
                    description: Configuration of assessment tools available to candidates. Each
                      tool is represented as a key-value pair where the key is
                      the tool name and the value indicates if it's enabled
                  metadata:
                    type: object
                    additionalProperties: {}
                    description: Additional custom metadata for extending entity properties beyond
                      standard specification for QTI entities.
                  rawXml:
                    type: string
                    description: Raw XML representation of the entity, automatically generated from
                      the JSON or XML sent when creating entities on the service
                      provider. The rawxml field will contain all content sent
                      when creating the entity on the service provider. This
                      field is stable and should be used when working within
                      this QTI API.
                  content:
                    type: object
                    properties:
                      qti-assessment-test:
                        type: object
                        properties:
                          _attributes:
                            type: object
                            properties:
                              xmlns:
                                type: string
                              xmlns:xsi:
                                type: string
                              xsi:schemaLocation:
                                type: string
                              identifier:
                                type: string
                              title:
                                type: string
                              tool-name:
                                type: string
                              tool-version:
                                type: string
                            required:
                              - xmlns
                              - xmlns:xsi
                              - xsi:schemaLocation
                              - identifier
                              - title
                              - tool-name
                              - tool-version
                          qti-outcome-declaration:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    cardinality:
                                      type: string
                                    base-type:
                                      type: string
                                  required:
                                    - identifier
                                    - cardinality
                                    - base-type
                                qti-default-value:
                                  type: object
                                  properties:
                                    qti-value: {}
                                normal-maximum:
                                  type: number
                                normal-minimum:
                                  type: number
                              required:
                                - _attributes
                          qti-test-part:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    navigation-mode:
                                      type: string
                                    submission-mode:
                                      type: string
                                  required:
                                    - identifier
                                    - navigation-mode
                                    - submission-mode
                                qti-assessment-section:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          identifier:
                                            type: string
                                          title:
                                            type: string
                                          visible:
                                            type: string
                                        required:
                                          - identifier
                                          - title
                                          - visible
                                      qti-assessment-item-ref:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            _attributes:
                                              type: object
                                              properties:
                                                identifier:
                                                  type: string
                                                href:
                                                  type: string
                                              required:
                                                - identifier
                                                - href
                                          required:
                                            - _attributes
                                    required:
                                      - _attributes
                              required:
                                - _attributes
                                - qti-assessment-section
                        required:
                          - _attributes
                          - qti-outcome-declaration
                          - qti-test-part
                    required:
                      - qti-assessment-test
                    description: Parsed XML content structure for the assessment test. For
                      production use, rawXml is recommended over this parsed
                      structure.
                  createdAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was created
                  updatedAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was last updated
                  __v:
                    type: number
                    description: MongoDB version key for optimistic concurrency control
                  isValidXml:
                    type: boolean
                    description: Indicates whether the generated XML is valid according to schema
                      validation
                required:
                  - identifier
                  - title
                  - qtiVersion
                  - qti-test-part
                  - qti-outcome-declaration
                  - rawXml
                  - content
                  - createdAt
                  - updatedAt
                  - isValidXml
                description: Complete assessment test data including all test parts, sections,
                  items, and configuration settings
        "404":
          description: Assessment test not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
    delete:
      operationId: deleteAssessmentTest
      summary: Delete an assessment test
      description: Permanently delete an assessment test and all its associated data
        including test parts, sections, and item references. This operation
        cannot be undone. The actual assessment items referenced by this test
        are not deleted.
      tags: *a18
      parameters:
        - name: identifier
          description: The identifier of the assessment test to delete
          in: path
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
          content: {}
        "404":
          description: Assessment test not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-tests/{identifier}/questions:
    get:
      operationId: getAllQuestions
      summary: Get all assessment items referenced by an assessment test
      description: Retrieve all assessment items (questions) that are referenced by an
        assessment test, along with their structural context (test part and
        section). This endpoint aggregates items from all sections across all
        test parts, providing both the item references and the actual assessment
        item data from the assessment-items collection.
      tags: *a18
      parameters:
        - name: identifier
          description: The unique identifier of the assessment test
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successfully retrieved all questions
          content:
            application/json:
              schema:
                type: object
                properties:
                  assessmentTest:
                    type: string
                    description: Identifier of the assessment test
                  title:
                    type: string
                    description: Title of the assessment test
                  totalQuestions:
                    type: number
                    description: Total number of questions in the assessment test
                  questions:
                    type: array
                    items:
                      type: object
                      properties:
                        reference:
                          type: object
                          properties:
                            identifier:
                              type: string
                              description: Unique identifier for the entity on the service provider.
                            href:
                              type: string
                              description: URL reference to the assessment item
                            testPart:
                              type: string
                              description: Test part identifier where this item is located
                            section:
                              type: string
                              description: Section identifier where this item is located
                          required:
                            - identifier
                            - href
                            - testPart
                            - section
                          description: Reference information about where this assessment item is located
                            in the test structure
                        question:
                          type: object
                          properties:
                            identifier:
                              type: string
                              description: Unique identifier for the entity on the service provider.
                            title:
                              type: string
                              description: Human-readable title of the entity on the service provider.
                            type:
                              type: string
                              enum: *a10
                              description: Assessment item interaction types that are supported by the service
                                provider.
                            customInteractionTypeIdentifier:
                              type: string
                              description: For portable-custom interactions, the
                                custom-interaction-type-identifier attribute
                                from the QTI XML element.
                            qtiVersion:
                              type: string
                              default: "3.0"
                              description: QTI version of the assessment item
                            timeDependent:
                              type: boolean
                              default: false
                              description: Indicates whether the candidate's response time affects the scoring
                                or outcome of this assessment item. When true,
                                timing data is used in response processing
                                calculations.
                            adaptive:
                              type: boolean
                              default: false
                              description: Indicates whether this assessment item adapts its presentation or
                                behavior based on the candidate's responses.
                                Adaptive items can modify their content,
                                difficulty, or available options during the
                                assessment session.
                            responseDeclarations:
                              type: array
                              items:
                                type: object
                                properties:
                                  identifier:
                                    type: string
                                    description: Unique identifier for this response variable within the item; must
                                      be distinct from other item variables and
                                      cannot use reserved names
                                      (completionStatus, numAttempts, duration).
                                  cardinality:
                                    type: string
                                    enum: *a3
                                    description: Specifies how many values the response variable can hold and
                                      whether order matters.
                                  baseType:
                                    type: string
                                    enum: *a4
                                    description: Primitive data type for each answer stored in the variable (e.g.,
                                      integer, string, boolean). Omit when
                                      cardinality is 'record', because each
                                      field in a record may have its own type.
                                  correctResponse:
                                    type: object
                                    properties:
                                      value:
                                        type: array
                                        items:
                                          type: string
                                    required:
                                      - value
                                    description: Optional model answer; must conform to the variable's cardinality
                                      (single = one value, multiple/ordered =
                                      ordered or unordered list); omit when no
                                      optimal answer exists (e.g., essays);
                                      delivery engines may display it as the
                                      solution in review mode.
                                required:
                                  - identifier
                                  - cardinality
                                  - correctResponse
                            outcomeDeclarations:
                              type: array
                              items:
                                type: object
                                properties:
                                  identifier:
                                    type: string
                                    description: Unique identifier for this response variable within the item; must
                                      be distinct from other item variables and
                                      cannot use reserved names
                                      (completionStatus, numAttempts, duration).
                                  cardinality:
                                    type: string
                                    enum: *a3
                                    description: Specifies how many values the response variable can hold and
                                      whether order matters.
                                  baseType:
                                    type: string
                                    enum: *a4
                                    description: Primitive data type for each answer stored in the variable (e.g.,
                                      integer, string, boolean). Omit when
                                      cardinality is 'record', because each
                                      field in a record may have its own type.
                                required:
                                  - identifier
                                  - cardinality
                            responseProcessing:
                              type: object
                              properties:
                                templateType:
                                  type: string
                                  enum: *a11
                                  description: Response processing template type. 'match_correct' compares the
                                    candidate's response directly against the
                                    correct response and assigns binary
                                    feedback. 'map_response' uses mapping rules
                                    to assign scores and feedback based on
                                    response values.
                                responseDeclarationIdentifier:
                                  type: string
                                  description: Identifier of the response declaration that this response
                                    processing rule applies to. Must match an
                                    existing responseDeclaration identifier
                                    within the same assessment item.
                                outcomeIdentifier:
                                  type: string
                                  description: Identifier of the outcome variable that will be set by this
                                    response processing rule. Common values
                                    include 'SCORE' for numeric scoring or
                                    'FEEDBACK' for feedback identifiers.
                                correctResponseIdentifier:
                                  type: string
                                  description: Identifier value assigned to the outcome variable when the
                                    candidate's response is evaluated as
                                    correct. Used primarily with match_correct
                                    template type.
                                incorrectResponseIdentifier:
                                  type: string
                                  description: Identifier value assigned to the outcome variable when the
                                    candidate's response is evaluated as
                                    incorrect. Used primarily with match_correct
                                    template type.
                                inlineFeedback:
                                  type: object
                                  properties:
                                    outcomeIdentifier:
                                      type: string
                                      description: Identifier of the outcome variable to be set with the inline
                                        feedback value.
                                    variableIdentifier:
                                      type: string
                                      description: Identifier of the variable whose value will be assigned to the
                                        outcome variable during response
                                        processing.
                                  required:
                                    - outcomeIdentifier
                                    - variableIdentifier
                                  description: Optional inline feedback configuration that sets an outcome
                                    variable based on another variable's value
                                    during response processing.
                              required:
                                - templateType
                                - responseDeclarationIdentifier
                                - outcomeIdentifier
                                - correctResponseIdentifier
                                - incorrectResponseIdentifier
                              description: Response processing is the process by which the Delivery Engine
                                assigns outcomes based on the candidate's
                                responses. The outcomes may be used to provide
                                feedback to the candidate. Response processing
                                must only take place in direct response to a
                                user action or in response to some expected
                                event, such as the end of a test.
                            metadata:
                              type: object
                              properties:
                                subject:
                                  type: string
                                  description: Subject area for the assessment item
                                  example: Math
                                grade:
                                  type: string
                                  enum: *a12
                                  description: Grade level for the assessment item. Must use a value from K-12
                                  example: "10"
                                difficulty:
                                  type: string
                                  enum: *a13
                                  description: Difficulty level of the assessment item
                                  example: easy
                                learningObjectiveSet:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      source:
                                        type: string
                                        description: The source of the learning objective set or learning standards.
                                        example: CASE
                                      learningObjectiveIds:
                                        type: array
                                        items:
                                          type: string
                                        description: Array of learning objective identifiers. If source is 'CASE', these
                                          can be the CFItem sourcedIds or
                                          CFItem's Human Coding Schema.
                                        example: *a14
                                    required:
                                      - source
                                      - learningObjectiveIds
                                  description: Learning objectives associated with this assessment item
                                  example: *a15
                              additionalProperties: true
                              description: Additional custom metadata for assessment items with validation for
                                specific fields used by external applications
                            rawXml:
                              type: string
                              description: Raw XML representation of the entity, automatically generated from
                                the JSON or XML sent when creating entities on
                                the service provider. The rawxml field will
                                contain all content sent when creating the
                                entity on the service provider. This field is
                                stable and should be used when working within
                                this QTI API.
                            content:
                              type: object
                              properties:
                                qti-assessment-item:
                                  type: object
                                  properties:
                                    _attributes:
                                      type: object
                                      properties:
                                        xmlns:
                                          type: string
                                        xmlns:xsi:
                                          type: string
                                        xsi:schemaLocation:
                                          type: string
                                        identifier:
                                          type: string
                                        title:
                                          type: string
                                        adaptive:
                                          type: string
                                        time-dependent:
                                          type: string
                                      required:
                                        - xmlns
                                        - xmlns:xsi
                                        - xsi:schemaLocation
                                        - identifier
                                        - title
                                        - adaptive
                                        - time-dependent
                                    qti-response-declaration:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          _attributes:
                                            type: object
                                            properties:
                                              identifier:
                                                type: string
                                              cardinality:
                                                type: string
                                              baseType:
                                                type: string
                                            required:
                                              - identifier
                                              - cardinality
                                              - baseType
                                          qti-correct-response:
                                            type: object
                                            properties:
                                              qti-value:
                                                type: array
                                                items:
                                                  type: string
                                            required:
                                              - qti-value
                                        required:
                                          - _attributes
                                          - qti-correct-response
                                    qti-outcome-declaration:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          _attributes:
                                            type: object
                                            properties:
                                              identifier:
                                                type: string
                                              cardinality:
                                                type: string
                                              baseType:
                                                type: string
                                            required:
                                              - identifier
                                              - cardinality
                                              - baseType
                                        required:
                                          - _attributes
                                    qti-assessment-stimulus-ref:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          _attributes:
                                            type: object
                                            properties:
                                              identifier:
                                                type: string
                                              href:
                                                type: string
                                              title:
                                                type: string
                                            required:
                                              - identifier
                                              - href
                                              - title
                                        required:
                                          - _attributes
                                    qti-item-body: {}
                                    qti-response-processing: {}
                                  required:
                                    - _attributes
                                    - qti-response-declaration
                                    - qti-outcome-declaration
                              required:
                                - qti-assessment-item
                              description: Parsed XML content generated by the service provider. For
                                production use, rawXml is recommended over this
                                parsed structure.
                            modalFeedback:
                              type: array
                              items:
                                type: object
                                properties:
                                  outcomeIdentifier:
                                    type: string
                                    description: Identifier of the outcome variable that controls when this feedback
                                      is displayed. The feedback is shown or
                                      hidden based on the value of this outcome
                                      variable after response processing.
                                  identifier:
                                    type: string
                                    description: Unique identifier for this specific feedback element within the
                                      assessment item. Used to reference and
                                      control this particular piece of feedback.
                                  showHide:
                                    type: string
                                    enum: *a5
                                    description: Determines the feedback visibility behavior. 'show' displays the
                                      feedback when the outcome variable matches
                                      the identifier, 'hide' conceals it when
                                      the outcome variable matches.
                                  content:
                                    type: string
                                    description: The HTML or text content to be displayed as feedback to the
                                      candidate.
                                  title:
                                    type: string
                                    description: Optional title displayed in the modal feedback dialog header. Only
                                      used with modal feedback presentations.
                                required:
                                  - outcomeIdentifier
                                  - identifier
                                  - showHide
                                  - content
                                  - title
                              description: Modal feedback shown to candidates in popup dialogs immediately
                                following response processing. Cannot contain
                                interaction elements and is displayed based on
                                outcome variable values.
                            feedbackInline:
                              type: array
                              items:
                                type: object
                                properties:
                                  outcomeIdentifier:
                                    type: string
                                    description: Identifier of the outcome variable that controls when this feedback
                                      is displayed. The feedback is shown or
                                      hidden based on the value of this outcome
                                      variable after response processing.
                                  identifier:
                                    type: string
                                    description: Unique identifier for this specific feedback element within the
                                      assessment item. Used to reference and
                                      control this particular piece of feedback.
                                  showHide:
                                    type: string
                                    enum: *a5
                                    description: Determines the feedback visibility behavior. 'show' displays the
                                      feedback when the outcome variable matches
                                      the identifier, 'hide' conceals it when
                                      the outcome variable matches.
                                  content:
                                    type: string
                                    description: The HTML or text content to be displayed as feedback to the
                                      candidate.
                                  class:
                                    type: array
                                    items:
                                      type: string
                                    description: CSS class names applied to the feedback element for styling
                                      purposes. Multiple classes can be
                                      specified for flexible presentation
                                      control.
                                required:
                                  - outcomeIdentifier
                                  - identifier
                                  - showHide
                                  - content
                                  - class
                              description: Inline feedback embedded within interaction elements, displayed
                                alongside choices or input areas. Provides
                                contextual feedback.
                            feedbackBlock:
                              type: array
                              items:
                                type: object
                                properties:
                                  outcomeIdentifier:
                                    type: string
                                    description: Identifier of the outcome variable that controls when this feedback
                                      is displayed. The feedback is shown or
                                      hidden based on the value of this outcome
                                      variable after response processing.
                                  identifier:
                                    type: string
                                    description: Unique identifier for this specific feedback element within the
                                      assessment item. Used to reference and
                                      control this particular piece of feedback.
                                  showHide:
                                    type: string
                                    enum: *a5
                                    description: Determines the feedback visibility behavior. 'show' displays the
                                      feedback when the outcome variable matches
                                      the identifier, 'hide' conceals it when
                                      the outcome variable matches.
                                  content:
                                    type: string
                                    description: The HTML or text content to be displayed as feedback to the
                                      candidate.
                                  class:
                                    type: array
                                    items:
                                      type: string
                                    description: CSS class names applied to the feedback element for styling
                                      purposes. Multiple classes can be
                                      specified for flexible presentation
                                      control.
                                required:
                                  - outcomeIdentifier
                                  - identifier
                                  - showHide
                                  - content
                                  - class
                              description: Inline feedback embedded within interaction elements, displayed
                                alongside choices or input areas. Provides
                                contextual feedback.
                            createdAt:
                              type: string
                              format: date-time
                              description: ISO 8601 timestamp when the entity was created
                            updatedAt:
                              type: string
                              format: date-time
                              description: ISO 8601 timestamp when the entity was last updated
                            __v:
                              type: number
                              description: MongoDB version key for optimistic concurrency control
                          required:
                            - identifier
                            - title
                            - type
                            - qtiVersion
                            - timeDependent
                            - adaptive
                            - rawXml
                            - content
                            - createdAt
                            - updatedAt
                      required:
                        - reference
                        - question
                    description: Array of questions with their reference information and complete
                      item data
                required:
                  - assessmentTest
                  - title
                  - totalQuestions
                  - questions
                description: All questions from the assessment test with their complete data and
                  reference context
        "404":
          description: Assessment test not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-tests/{identifier}/metadata:
    put:
      operationId: updateAssessmentTestMetadata
      summary: Update assessment test metadata only
      description: Update only the metadata fields (title, description, etc.) of an
        assessment test without affecting its structure, test parts, sections,
        or assessment items. This is a lightweight operation for administrative
        changes.
      tags: *a18
      parameters:
        - name: identifier
          description: The identifier of the assessment test to update
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: The assessment test metadata to update
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  type: object
                  additionalProperties: {}
                  description: Additional custom metadata for extending entity properties beyond
                    standard specification for QTI entities.
              description: Update only the metadata fields of an assessment test without
                affecting its structure. This is a lightweight operation for
                administrative changes to title, description, and other metadata
                properties
      responses:
        "200":
          description: Assessment test metadata updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  qtiVersion:
                    type: string
                    default: "3.0"
                    description: Version of the specification used for this assessment test
                  qti-test-part:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        navigationMode:
                          type: string
                          enum: *a19
                          description: Controls how learners navigate through the test part. 'linear'
                            requires items to be responded to in sequence
                            without jumping around, while 'nonlinear' allows
                            candidates to respond to items in any order they
                            choose.
                        submissionMode:
                          type: string
                          enum: *a20
                          description: Determines how learner responses are submitted for response
                            processing. 'individual' allows responses to be
                            submitted as each item is completed, while
                            'simultaneous' means responses for all items are
                            sent when the whole part is completed.
                        qti-assessment-section:
                          type: array
                          items:
                            type: object
                            properties:
                              identifier:
                                type: string
                                description: Unique identifier for the entity on the service provider.
                              title:
                                type: string
                                description: Human-readable title of the entity on the service provider.
                              visible:
                                type: boolean
                                default: true
                                description: Determines whether the assessment section is visible to candidates
                                  during test delivery. Sections are visible by
                                  default unless explicitly hidden for specific
                                  assessment conditions.
                              required:
                                type: boolean
                                default: true
                                description: If a child element is required it must appear (at least once) in
                                  the selection.
                              fixed:
                                type: boolean
                                default: false
                                description: If a child element is fixed it must never be shuffled. When used in
                                  combination with a selection rule fixed
                                  elements do not have their position fixed
                                  until after selection has taken place.
                              sequence:
                                type: integer
                                exclusiveMinimum: 0
                                description: Defines the sequential order of this item within its parent
                                  section. Must be a positive integer that
                                  determines presentation order to candidates.
                              qti-assessment-item-ref:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                      description: Unique identifier for the entity on the service provider.
                                    href:
                                      type: string
                                      description: URI reference to the assessment item resource location on the
                                        service provider
                                  required:
                                    - identifier
                                  description: Assessment item reference schema for linking assessment items to
                                    sections
                                description: Collection of assessment items that are referenced within this
                                  section.
                              qti-pre-condition:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: {}
                                description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                                  logical expression that is evaluated before
                                  the element is presented. If any pre-condition
                                  evaluates to false, the element is skipped.
                              qti-branch-rule:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: {}
                                description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                                  expression that, when evaluated to true after
                                  the element is presented, causes the test to
                                  jump to the target identified by the rule.
                            required:
                              - identifier
                              - title
                              - visible
                            description: Complete assessment section data with all referenced items.
                              Represents a section containing learning content
                              within a test part.
                        qti-pre-condition:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                            logical expression that is evaluated before the
                            element is presented. If any pre-condition evaluates
                            to false, the element is skipped.
                        qti-branch-rule:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                            expression that, when evaluated to true after the
                            element is presented, causes the test to jump to the
                            target identified by the rule.
                      required:
                        - identifier
                        - navigationMode
                        - submissionMode
                        - qti-assessment-section
                      description: Complete test part data returned from the service provider.
                        Contains all sections and their configuration.
                  qti-outcome-declaration:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        cardinality:
                          type: string
                          enum: *a21
                          default: single
                          description: Defines how scoring information is structured and stored. 'single'
                            for one overall score, 'multiple' for separate
                            scores or points, 'ordered' for scores maintaining a
                            specific sequence, 'record' for complex scoring with
                            multiple named components.
                        baseType:
                          type: string
                          enum: *a22
                          description: Data type of the outcome variable, determining how values are
                            stored and processed
                        normalMaximum:
                          type: number
                          description: Expected maximum value for this outcome variable in normal
                            circumstances
                        normalMinimum:
                          type: number
                          description: Expected minimum value for this outcome variable in normal
                            circumstances
                        defaultValue:
                          type: object
                          properties:
                            value:
                              description: The default value to assign to the outcome variable
                          description: Optional default value configuration for outcome variables
                      required:
                        - identifier
                        - cardinality
                        - baseType
                    description: Array of outcome variable declarations for storing assessment
                      results and computed values
                  timeLimit:
                    type: number
                    description: Time limit for the entire assessment test in seconds. When not
                      specified, there is no time limit
                  maxAttempts:
                    type: number
                    description: Maximum number of attempts allowed for the assessment test. When
                      not specified, unlimited attempts are allowed
                  toolsEnabled:
                    type: object
                    additionalProperties:
                      type: boolean
                    description: Configuration of assessment tools available to candidates. Each
                      tool is represented as a key-value pair where the key is
                      the tool name and the value indicates if it's enabled
                  metadata:
                    type: object
                    additionalProperties: {}
                    description: Additional custom metadata for extending entity properties beyond
                      standard specification for QTI entities.
                  rawXml:
                    type: string
                    description: Raw XML representation of the entity, automatically generated from
                      the JSON or XML sent when creating entities on the service
                      provider. The rawxml field will contain all content sent
                      when creating the entity on the service provider. This
                      field is stable and should be used when working within
                      this QTI API.
                  content:
                    type: object
                    properties:
                      qti-assessment-test:
                        type: object
                        properties:
                          _attributes:
                            type: object
                            properties:
                              xmlns:
                                type: string
                              xmlns:xsi:
                                type: string
                              xsi:schemaLocation:
                                type: string
                              identifier:
                                type: string
                              title:
                                type: string
                              tool-name:
                                type: string
                              tool-version:
                                type: string
                            required:
                              - xmlns
                              - xmlns:xsi
                              - xsi:schemaLocation
                              - identifier
                              - title
                              - tool-name
                              - tool-version
                          qti-outcome-declaration:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    cardinality:
                                      type: string
                                    base-type:
                                      type: string
                                  required:
                                    - identifier
                                    - cardinality
                                    - base-type
                                qti-default-value:
                                  type: object
                                  properties:
                                    qti-value: {}
                                normal-maximum:
                                  type: number
                                normal-minimum:
                                  type: number
                              required:
                                - _attributes
                          qti-test-part:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    navigation-mode:
                                      type: string
                                    submission-mode:
                                      type: string
                                  required:
                                    - identifier
                                    - navigation-mode
                                    - submission-mode
                                qti-assessment-section:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          identifier:
                                            type: string
                                          title:
                                            type: string
                                          visible:
                                            type: string
                                        required:
                                          - identifier
                                          - title
                                          - visible
                                      qti-assessment-item-ref:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            _attributes:
                                              type: object
                                              properties:
                                                identifier:
                                                  type: string
                                                href:
                                                  type: string
                                              required:
                                                - identifier
                                                - href
                                          required:
                                            - _attributes
                                    required:
                                      - _attributes
                              required:
                                - _attributes
                                - qti-assessment-section
                        required:
                          - _attributes
                          - qti-outcome-declaration
                          - qti-test-part
                    required:
                      - qti-assessment-test
                    description: Parsed XML content structure for the assessment test. For
                      production use, rawXml is recommended over this parsed
                      structure.
                  createdAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was created
                  updatedAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the entity was last updated
                  __v:
                    type: number
                    description: MongoDB version key for optimistic concurrency control
                required:
                  - identifier
                  - title
                  - qtiVersion
                  - qti-test-part
                  - qti-outcome-declaration
                  - rawXml
                  - content
                  - createdAt
                  - updatedAt
                description: Complete assessment test data including all test parts, sections,
                  items, and configuration settings
        "400":
          description: Metadata is required and must be an object
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "404":
          description: Assessment test not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Error updating assessment test metadata
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-tests/{assessmentTestIdentifier}/test-parts:
    get:
      operationId: searchTestParts
      summary: Search and filter test parts within an assessment test
      description: Get all test parts within an assessment test with support for
        filtering by navigation mode, submission mode, and text search. Test
        parts are organizational units that group sections and define testing
        behaviors like linear/nonlinear navigation.
      tags: &a27
        - Test Part Management
      parameters:
        - name: assessmentTestIdentifier
          description: The unique identifier of the parent assessment test containing the
            test parts
          in: path
          required: true
          schema:
            type: string
        - in: query
          name: query
          description: Search title and identifier fields using a search term. This is a
            fuzzy search.
          schema:
            type: string
            description: Search title and identifier fields using a search term. This is a
              fuzzy search.
        - in: query
          name: page
          description: Page number for pagination
          schema:
            type: string
            default: "1"
            description: Page number for pagination
            example: 1
        - in: query
          name: limit
          description: Number of items per page
          schema:
            type: string
            default: "10"
            description: Number of items per page
            example: 10
        - in: query
          name: sort
          description: Field to sort by
          schema:
            type: string
            enum: *a17
            description: Field to sort by
            example: createdAt
        - in: query
          name: order
          description: Sort order
          schema:
            type: string
            enum: *a2
            default: desc
            description: Sort order
            example: desc
        - in: query
          name: navigationMode
          description: "Filter by navigation mode (linear: sequential navigation,
            nonlinear: free navigation)"
          schema:
            type: string
            enum: *a24
            description: "Filter by navigation mode (linear: sequential navigation,
              nonlinear: free navigation)"
            example: linear
        - in: query
          name: submissionMode
          description: "Filter by submission mode (individual: submit per item,
            simultaneous: submit all at once)"
          schema:
            type: string
            enum: *a25
            description: "Filter by submission mode (individual: submit per item,
              simultaneous: submit all at once)"
            example: individual
        - in: query
          name: subject
          description: Filter by subject (e.g. Math, Reading) using the optimized
            consolidated field
          schema:
            type: string
            description: Filter by subject (e.g. Math, Reading) using the optimized
              consolidated field
            example: Math
        - in: query
          name: grade
          description: Filter by grade level using the optimized consolidated field
          schema:
            type: string
            description: Filter by grade level using the optimized consolidated field
            example: "5"
        - in: query
          name: hasQuestions
          description: Filter tests based on whether they have questions (true) or not
            (false)
          schema:
            type: string
            enum: *a26
            description: Filter tests based on whether they have questions (true) or not
              (false)
            example: "true"
        - in: query
          name: filter
          description: "Advanced filter expression using =, !=, >, >=, <, <=, ~ and
            logical AND/OR. Example: type='practice' AND createdAt>'2024-01-01'"
          schema:
            type: string
            description: "Advanced filter expression using =, !=, >, >=, <, <=, ~ and
              logical AND/OR. Example: type='practice' AND
              createdAt>'2024-01-01'"
      responses:
        "200":
          description: Successfully retrieved test parts
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        navigationMode:
                          type: string
                          enum: *a19
                          description: Controls how learners navigate through the test part. 'linear'
                            requires items to be responded to in sequence
                            without jumping around, while 'nonlinear' allows
                            candidates to respond to items in any order they
                            choose.
                        submissionMode:
                          type: string
                          enum: *a20
                          description: Determines how learner responses are submitted for response
                            processing. 'individual' allows responses to be
                            submitted as each item is completed, while
                            'simultaneous' means responses for all items are
                            sent when the whole part is completed.
                        qti-assessment-section:
                          type: array
                          items:
                            type: object
                            properties:
                              identifier:
                                type: string
                                description: Unique identifier for the entity on the service provider.
                              title:
                                type: string
                                description: Human-readable title of the entity on the service provider.
                              visible:
                                type: boolean
                                default: true
                                description: Determines whether the assessment section is visible to candidates
                                  during test delivery. Sections are visible by
                                  default unless explicitly hidden for specific
                                  assessment conditions.
                              required:
                                type: boolean
                                default: true
                                description: If a child element is required it must appear (at least once) in
                                  the selection.
                              fixed:
                                type: boolean
                                default: false
                                description: If a child element is fixed it must never be shuffled. When used in
                                  combination with a selection rule fixed
                                  elements do not have their position fixed
                                  until after selection has taken place.
                              sequence:
                                type: integer
                                exclusiveMinimum: 0
                                description: Defines the sequential order of this item within its parent
                                  section. Must be a positive integer that
                                  determines presentation order to candidates.
                              qti-assessment-item-ref:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                      description: Unique identifier for the entity on the service provider.
                                    href:
                                      type: string
                                      description: URI reference to the assessment item resource location on the
                                        service provider
                                  required:
                                    - identifier
                                  description: Assessment item reference schema for linking assessment items to
                                    sections
                                description: Collection of assessment items that are referenced within this
                                  section.
                              qti-pre-condition:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: {}
                                description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                                  logical expression that is evaluated before
                                  the element is presented. If any pre-condition
                                  evaluates to false, the element is skipped.
                              qti-branch-rule:
                                type: array
                                items:
                                  type: object
                                  additionalProperties: {}
                                description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                                  expression that, when evaluated to true after
                                  the element is presented, causes the test to
                                  jump to the target identified by the rule.
                            required:
                              - identifier
                              - title
                              - visible
                            description: Complete assessment section data with all referenced items.
                              Represents a section containing learning content
                              within a test part.
                        qti-pre-condition:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                            logical expression that is evaluated before the
                            element is presented. If any pre-condition evaluates
                            to false, the element is skipped.
                        qti-branch-rule:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                            expression that, when evaluated to true after the
                            element is presented, causes the test to jump to the
                            target identified by the rule.
                      required:
                        - identifier
                        - navigationMode
                        - submissionMode
                        - qti-assessment-section
                      description: Complete test part data returned from the service provider.
                        Contains all sections and their configuration.
                    description: Array of all test parts belonging to the specified assessment test
                  total:
                    type: number
                    description: The total number of entities that match the search criteria.
                  page:
                    type: number
                    description: The page number of the entities that match the search criteria.
                    default: 1
                  pages:
                    type: number
                    description: The total number of pages of entities that match the search
                      criteria.
                  limit:
                    type: number
                    description: The number of entities per page.
                    default: 10
                  sort:
                    type: string
                    description: The field to sort the entities by.
                  order:
                    type: string
                    enum: *a6
                    description: The order to sort the entities by. Either 'asc' or 'desc'.
                required:
                  - items
                  - total
                  - page
                  - pages
                  - limit
                  - sort
                  - order
                description: Paginated collection of test parts with navigation metadata
        "400":
          description: Missing required parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "404":
          description: Assessment test not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
    post:
      operationId: createTestPart
      summary: Create a new test part in an assessment test
      description: Create a new test part within an assessment test. Test parts
        organize sections and define navigation behaviors (linear/nonlinear) and
        submission modes. The assessment test's XML structure is automatically
        updated to include the new test part.
      tags: *a27
      parameters:
        - name: assessmentTestIdentifier
          description: The unique identifier of the parent assessment test where the test
            part will be created
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: The test part to create
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TestPart"
              description: Create a new test part on the service provider. A test part must
                contain at least one assessment section, and the navigation and
                submission modes must be specified.
      responses:
        "201":
          description: Test part created successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/TestPart"
                properties:
                  rawXml:
                    type: string
                    description: Raw XML representation of the entity, automatically generated from
                      the JSON or XML sent when creating entities on the service
                      provider. The rawxml field will contain all content sent
                      when creating the entity on the service provider. This
                      field is stable and should be used when working within
                      this QTI API.
                  content:
                    type: object
                    properties:
                      qti-test-part:
                        type: object
                        properties:
                          _attributes:
                            type: object
                            properties:
                              identifier:
                                type: string
                              navigation-mode:
                                type: string
                              submission-mode:
                                type: string
                            required:
                              - identifier
                              - navigation-mode
                              - submission-mode
                          qti-assessment-section:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    title:
                                      type: string
                                    visible:
                                      type: string
                                    required:
                                      type: string
                                    fixed:
                                      type: string
                                  required:
                                    - identifier
                                    - title
                                    - visible
                                    - required
                                    - fixed
                                qti-assessment-item-ref:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          identifier:
                                            type: string
                                          href:
                                            type: string
                                        required:
                                          - identifier
                                          - href
                                    required:
                                      - _attributes
                              required:
                                - _attributes
                        required:
                          - _attributes
                          - qti-assessment-section
                    required:
                      - qti-test-part
                required:
                  - rawXml
                  - content
                description: Response data returned after successfully creating a new test part.
                  Includes the generated XML and parsed content structure.
        "400":
          description: Missig required paramater or Invalid test part data
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "404":
          description: Assessment test not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "409":
          description: Test part with this identifier already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier}:
    get:
      operationId: getTestPart
      summary: Get a specific test part with all its sections
      description: Retrieve a test part by identifier including all its sections and
        their assessment item references. Test parts define navigation and
        submission behaviors for groups of sections. Supports both JSON and XML
        response formats.
      tags: *a27
      parameters:
        - name: assessmentTestIdentifier
          description: The unique identifier of the parent assessment test
          in: path
          required: true
          schema:
            type: string
        - name: identifier
          description: The unique identifier of the test part to retrieve
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successfully retrieved test part
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  navigationMode:
                    type: string
                    enum: *a19
                    description: Controls how learners navigate through the test part. 'linear'
                      requires items to be responded to in sequence without
                      jumping around, while 'nonlinear' allows candidates to
                      respond to items in any order they choose.
                  submissionMode:
                    type: string
                    enum: *a20
                    description: Determines how learner responses are submitted for response
                      processing. 'individual' allows responses to be submitted
                      as each item is completed, while 'simultaneous' means
                      responses for all items are sent when the whole part is
                      completed.
                  qti-assessment-section:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        title:
                          type: string
                          description: Human-readable title of the entity on the service provider.
                        visible:
                          type: boolean
                          default: true
                          description: Determines whether the assessment section is visible to candidates
                            during test delivery. Sections are visible by
                            default unless explicitly hidden for specific
                            assessment conditions.
                        required:
                          type: boolean
                          default: true
                          description: If a child element is required it must appear (at least once) in
                            the selection.
                        fixed:
                          type: boolean
                          default: false
                          description: If a child element is fixed it must never be shuffled. When used in
                            combination with a selection rule fixed elements do
                            not have their position fixed until after selection
                            has taken place.
                        sequence:
                          type: integer
                          exclusiveMinimum: 0
                          description: Defines the sequential order of this item within its parent
                            section. Must be a positive integer that determines
                            presentation order to candidates.
                        qti-assessment-item-ref:
                          type: array
                          items:
                            type: object
                            properties:
                              identifier:
                                type: string
                                description: Unique identifier for the entity on the service provider.
                              href:
                                type: string
                                description: URI reference to the assessment item resource location on the
                                  service provider
                            required:
                              - identifier
                            description: Assessment item reference schema for linking assessment items to
                              sections
                          description: Collection of assessment items that are referenced within this
                            section.
                        qti-pre-condition:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                            logical expression that is evaluated before the
                            element is presented. If any pre-condition evaluates
                            to false, the element is skipped.
                        qti-branch-rule:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                            expression that, when evaluated to true after the
                            element is presented, causes the test to jump to the
                            target identified by the rule.
                      required:
                        - identifier
                        - title
                        - visible
                      description: Complete assessment section data with all referenced items.
                        Represents a section containing learning content within
                        a test part.
                  qti-pre-condition:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                    description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                      logical expression that is evaluated before the element is
                      presented. If any pre-condition evaluates to false, the
                      element is skipped.
                  qti-branch-rule:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                    description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                      expression that, when evaluated to true after the element
                      is presented, causes the test to jump to the target
                      identified by the rule.
                required:
                  - identifier
                  - navigationMode
                  - submissionMode
                  - qti-assessment-section
                description: Complete test part data returned from the service provider.
                  Contains all sections and their configuration.
        "404":
          description: Assessment test or test part not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
    put:
      operationId: updateTestPart
      summary: Update a test part's configuration and sections
      description: Update a test part including its navigation mode, submission mode,
        time limits, and sections. This operation updates the entire test part
        structure and regenerates the parent assessment test's XML.
      tags: *a27
      parameters:
        - name: assessmentTestIdentifier
          description: The unique identifier of the parent assessment test
          in: path
          required: true
          schema:
            type: string
        - name: identifier
          description: The unique identifier of the test part to update
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: The test part to update
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TestPart"
              description: Update an existing test part on the service provider. All required
                test part fields must be provided, including at least one
                assessment section.
      responses:
        "200":
          description: Test part updated successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/TestPart"
                properties:
                  rawXml:
                    type: string
                    description: Raw XML representation of the entity, automatically generated from
                      the JSON or XML sent when creating entities on the service
                      provider. The rawxml field will contain all content sent
                      when creating the entity on the service provider. This
                      field is stable and should be used when working within
                      this QTI API.
                  content:
                    type: object
                    properties:
                      qti-test-part:
                        type: object
                        properties:
                          _attributes:
                            type: object
                            properties:
                              identifier:
                                type: string
                              navigation-mode:
                                type: string
                              submission-mode:
                                type: string
                            required:
                              - identifier
                              - navigation-mode
                              - submission-mode
                          qti-assessment-section:
                            type: array
                            items:
                              type: object
                              properties:
                                _attributes:
                                  type: object
                                  properties:
                                    identifier:
                                      type: string
                                    title:
                                      type: string
                                    visible:
                                      type: string
                                    required:
                                      type: string
                                    fixed:
                                      type: string
                                  required:
                                    - identifier
                                    - title
                                    - visible
                                    - required
                                    - fixed
                                qti-assessment-item-ref:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      _attributes:
                                        type: object
                                        properties:
                                          identifier:
                                            type: string
                                          href:
                                            type: string
                                        required:
                                          - identifier
                                          - href
                                    required:
                                      - _attributes
                              required:
                                - _attributes
                        required:
                          - _attributes
                          - qti-assessment-section
                    required:
                      - qti-test-part
                required:
                  - rawXml
                  - content
                description: Response data returned after successfully updating a test part.
                  Contains the updated XML and parsed content structure.
        "400":
          description: Missing required parameters or invalid test part data
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "404":
          description: Assessment test or test part not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
        "501":
          description: XML update not supported yet
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
    delete:
      operationId: deleteTestPart
      summary: Delete a test part and all its sections
      description: Permanently delete a test part from an assessment test. This
        removes the test part and all its sections (but not the underlying
        assessment items). The assessment test's XML structure is automatically
        updated.
      tags: *a27
      parameters:
        - name: assessmentTestIdentifier
          description: The unique identifier of the parent assessment test
          in: path
          required: true
          schema:
            type: string
        - name: identifier
          description: The unique identifier of the test part to delete
          in: path
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
          content: {}
        "404":
          description: Assessment test or test part not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-tests/{assessmentTestIdentifier}/test-parts/{testPartIdentifier}/sections:
    get:
      operationId: searchSections
      summary: Search sections within a test part
      description: Get all sections within a specific test part with support for text
        search, sorting, and pagination. Sections are containers that group
        related assessment items and define their presentation order.
      tags: &a28
        - Section Management
      parameters:
        - name: assessmentTestIdentifier
          description: Root assessment test identifier
          in: path
          required: true
          schema:
            type: string
        - name: testPartIdentifier
          description: Parent test part identifier
          in: path
          required: true
          schema:
            type: string
        - in: query
          name: query
          description: Search title and identifier fields using a search term. This is a
            fuzzy search.
          schema:
            type: string
            description: Search title and identifier fields using a search term. This is a
              fuzzy search.
        - in: query
          name: page
          description: Page number for pagination
          schema:
            type: string
            default: "1"
            description: Page number for pagination
            example: 1
        - in: query
          name: limit
          description: Number of items per page
          schema:
            type: string
            default: "10"
            description: Number of items per page
            example: 10
        - in: query
          name: sort
          description: Field to sort by
          schema:
            type: string
            enum: *a17
            description: Field to sort by
            example: createdAt
        - in: query
          name: order
          description: Sort order
          schema:
            type: string
            enum: *a2
            default: desc
            description: Sort order
            example: desc
      responses:
        "200":
          description: Successfully retrieved sections
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        title:
                          type: string
                          description: Human-readable title of the entity on the service provider.
                        visible:
                          type: boolean
                          default: true
                          description: Determines whether the assessment section is visible to candidates
                            during test delivery. Sections are visible by
                            default unless explicitly hidden for specific
                            assessment conditions.
                        required:
                          type: boolean
                          default: true
                          description: If a child element is required it must appear (at least once) in
                            the selection.
                        fixed:
                          type: boolean
                          default: false
                          description: If a child element is fixed it must never be shuffled. When used in
                            combination with a selection rule fixed elements do
                            not have their position fixed until after selection
                            has taken place.
                        sequence:
                          type: integer
                          exclusiveMinimum: 0
                          description: Defines the sequential order of this item within its parent
                            section. Must be a positive integer that determines
                            presentation order to candidates.
                        qti-assessment-item-ref:
                          type: array
                          items:
                            type: object
                            properties:
                              identifier:
                                type: string
                                description: Unique identifier for the entity on the service provider.
                              href:
                                type: string
                                description: URI reference to the assessment item resource location on the
                                  service provider
                            required:
                              - identifier
                            description: Assessment item reference schema for linking assessment items to
                              sections
                          description: Collection of assessment items that are referenced within this
                            section.
                        qti-pre-condition:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                            logical expression that is evaluated before the
                            element is presented. If any pre-condition evaluates
                            to false, the element is skipped.
                        qti-branch-rule:
                          type: array
                          items:
                            type: object
                            additionalProperties: {}
                          description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                            expression that, when evaluated to true after the
                            element is presented, causes the test to jump to the
                            target identified by the rule.
                      required:
                        - identifier
                        - title
                        - visible
                      description: Complete assessment section data with all referenced items.
                        Represents a section containing learning content within
                        a test part.
                    description: Array of assessment sections belonging to the specified test part,
                      each containing complete section data and item references.
                  total:
                    type: number
                    description: The total number of entities that match the search criteria.
                  page:
                    type: number
                    description: The page number of the entities that match the search criteria.
                    default: 1
                  pages:
                    type: number
                    description: The total number of pages of entities that match the search
                      criteria.
                  limit:
                    type: number
                    description: The number of entities per page.
                    default: 10
                  sort:
                    type: string
                    description: The field to sort the entities by.
                  order:
                    type: string
                    enum: *a6
                    description: The order to sort the entities by. Either 'asc' or 'desc'.
                required:
                  - items
                  - total
                  - page
                  - pages
                  - limit
                  - sort
                  - order
                description: Paginated response containing all assessment sections that exist in
                  the specified test part on the service provider, including
                  complete section data and navigation metadata.
        "400":
          description: Missing required parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "404":
          description: Assessment test or test part not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
    post:
      operationId: createSection
      summary: Create a new section in a test part
      description: Create a new section within a test part. Sections organize
        assessment items and define their presentation behavior. The parent
        assessment test's XML structure is automatically updated to include the
        new section.
      tags: *a28
      parameters:
        - name: assessmentTestIdentifier
          description: Root assessment test identifier
          in: path
          required: true
          schema:
            type: string
        - name: testPartIdentifier
          description: Parent test part identifier
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: The section to create
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Section"
      responses:
        "201":
          description: Section created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Section"
        "400":
          description: Invalid request body or validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "404":
          description: Assessment test or test part not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
        "501":
          description: XML format not supported
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
  /assessment-tests/{assessmentTestIdentifier}/test-parts/{testPartIdentifier}/sections/{identifier}:
    get:
      operationId: getSection
      summary: Get a section with all its assessment item references
      description: Retrieve a specific section including all its assessment item
        references, presentation settings, and configuration. Sections define
        how groups of assessment items are presented to test takers.
      tags: *a28
      parameters:
        - name: assessmentTestIdentifier
          description: Root assessment test identifier
          in: path
          required: true
          schema:
            type: string
        - name: testPartIdentifier
          description: Parent test part identifier
          in: path
          required: true
          schema:
            type: string
        - name: identifier
          description: Section identifier
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successfully retrieved section
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  visible:
                    type: boolean
                    default: true
                    description: Determines whether the assessment section is visible to candidates
                      during test delivery. Sections are visible by default
                      unless explicitly hidden for specific assessment
                      conditions.
                  required:
                    type: boolean
                    default: true
                    description: If a child element is required it must appear (at least once) in
                      the selection.
                  fixed:
                    type: boolean
                    default: false
                    description: If a child element is fixed it must never be shuffled. When used in
                      combination with a selection rule fixed elements do not
                      have their position fixed until after selection has taken
                      place.
                  sequence:
                    type: integer
                    exclusiveMinimum: 0
                    description: Defines the sequential order of this item within its parent
                      section. Must be a positive integer that determines
                      presentation order to candidates.
                  qti-assessment-item-ref:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        href:
                          type: string
                          description: URI reference to the assessment item resource location on the
                            service provider
                      required:
                        - identifier
                      description: Assessment item reference schema for linking assessment items to
                        sections
                    description: Collection of assessment items that are referenced within this
                      section.
                  qti-pre-condition:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                    description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                      logical expression that is evaluated before the element is
                      presented. If any pre-condition evaluates to false, the
                      element is skipped.
                  qti-branch-rule:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                    description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                      expression that, when evaluated to true after the element
                      is presented, causes the test to jump to the target
                      identified by the rule.
                required:
                  - identifier
                  - title
                  - visible
                description: Complete assessment section data with all referenced items.
                  Represents a section containing learning content within a test
                  part.
        "400":
          description: Missing required parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "404":
          description: Assessment test, test part, or section not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
    put:
      operationId: updateSection
      summary: Update a section's configuration and item references
      description: Update a section including its title, presentation settings, and
        assessment item references. This operation updates the section structure
        and regenerates the parent assessment test's XML.
      tags: *a28
      parameters:
        - name: assessmentTestIdentifier
          description: Root assessment test identifier
          in: path
          required: true
          schema:
            type: string
        - name: testPartIdentifier
          description: Parent test part identifier
          in: path
          required: true
          schema:
            type: string
        - name: identifier
          description: Section identifier
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: The section to update
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Section"
      responses:
        "200":
          description: Section updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  visible:
                    type: boolean
                    default: true
                    description: Determines whether the assessment section is visible to candidates
                      during test delivery. Sections are visible by default
                      unless explicitly hidden for specific assessment
                      conditions.
                  required:
                    type: boolean
                    default: true
                    description: If a child element is required it must appear (at least once) in
                      the selection.
                  fixed:
                    type: boolean
                    default: false
                    description: If a child element is fixed it must never be shuffled. When used in
                      combination with a selection rule fixed elements do not
                      have their position fixed until after selection has taken
                      place.
                  sequence:
                    type: integer
                    exclusiveMinimum: 0
                    description: Defines the sequential order of this item within its parent
                      section. Must be a positive integer that determines
                      presentation order to candidates.
                  qti-assessment-item-ref:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        href:
                          type: string
                          description: URI reference to the assessment item resource location on the
                            service provider
                      required:
                        - identifier
                      description: Assessment item reference schema for linking assessment items to
                        sections
                    description: Collection of assessment items that are referenced within this
                      section.
                  qti-pre-condition:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                    description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                      logical expression that is evaluated before the element is
                      presented. If any pre-condition evaluates to false, the
                      element is skipped.
                  qti-branch-rule:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                    description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                      expression that, when evaluated to true after the element
                      is presented, causes the test to jump to the target
                      identified by the rule.
                required:
                  - identifier
                  - title
                  - visible
                description: Complete assessment section data with all referenced items.
                  Represents a section containing learning content within a test
                  part.
        "400":
          description: Missing required parameters or invalid section data
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "404":
          description: Assessment test, test part, or section not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
        "501":
          description: XML format not supported
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
    delete:
      operationId: deleteSection
      summary: Delete a section and its item references
      description: Permanently delete a section from a test part. This removes the
        section and all its assessment item references (but not the underlying
        assessment items). The assessment test's XML structure is automatically
        updated.
      tags: *a28
      parameters:
        - name: assessmentTestIdentifier
          description: Root assessment test identifier
          in: path
          required: true
          schema:
            type: string
        - name: testPartIdentifier
          description: Parent test part identifier
          in: path
          required: true
          schema:
            type: string
        - name: identifier
          description: Section identifier
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Section deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Section deleted successfully
                required:
                  - message
        "400":
          description: Missing required parameters
        "404":
          description: Assessment test, test part, or section not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-tests/{assessmentTestIdentifier}/test-parts/{testPartIdentifier}/sections/{identifier}/items:
    post:
      operationId: addAssessmentItem
      summary: Add an assessment item reference to a section
      description: Add a reference to an existing assessment item in a section. This
        creates a link between the assessment item and the section without
        copying the item content. The item must exist in the assessment-items
        collection.
      tags: *a28
      parameters:
        - name: assessmentTestIdentifier
          description: Root assessment test identifier
          in: path
          required: true
          schema:
            type: string
        - name: testPartIdentifier
          description: Parent test part identifier
          in: path
          required: true
          schema:
            type: string
        - name: identifier
          description: Section identifier
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: The assessment item identifier to add to the section
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                identifier:
                  type: string
                  description: Unique identifier for the entity on the service provider.
                href:
                  type: string
                  description: URI reference to the assessment item resource location on the
                    service provider
                sequence:
                  type: integer
                  exclusiveMinimum: 0
                  description: Defines the sequential order of this item within its parent
                    section. Must be a positive integer that determines
                    presentation order to candidates.
              required:
                - identifier
              description: Add a reference to an existing assessment item in a section. The
                assessment item must exist in the assessment-items collection on
                the service provider.
      responses:
        "201":
          description: Assessment item reference added successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  visible:
                    type: boolean
                    default: true
                    description: Determines whether the assessment section is visible to candidates
                      during test delivery. Sections are visible by default
                      unless explicitly hidden for specific assessment
                      conditions.
                  required:
                    type: boolean
                    default: true
                    description: If a child element is required it must appear (at least once) in
                      the selection.
                  fixed:
                    type: boolean
                    default: false
                    description: If a child element is fixed it must never be shuffled. When used in
                      combination with a selection rule fixed elements do not
                      have their position fixed until after selection has taken
                      place.
                  sequence:
                    type: integer
                    exclusiveMinimum: 0
                    description: Defines the sequential order of this item within its parent
                      section. Must be a positive integer that determines
                      presentation order to candidates.
                  qti-assessment-item-ref:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        href:
                          type: string
                          description: URI reference to the assessment item resource location on the
                            service provider
                      required:
                        - identifier
                      description: Assessment item reference schema for linking assessment items to
                        sections
                    description: Collection of assessment items that are referenced within this
                      section.
                  qti-pre-condition:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                    description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                      logical expression that is evaluated before the element is
                      presented. If any pre-condition evaluates to false, the
                      element is skipped.
                  qti-branch-rule:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                    description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                      expression that, when evaluated to true after the element
                      is presented, causes the test to jump to the target
                      identified by the rule.
                required:
                  - identifier
                  - title
                  - visible
                description: Complete assessment section data with all referenced items.
                  Represents a section containing learning content within a test
                  part.
        "400":
          description: Missing assessment item identifier or item already exists in section
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "404":
          description: Assessment test, test part, section, or assessment item not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-tests/{assessmentTestIdentifier}/test-parts/{testPartIdentifier}/sections/{identifier}/items/{itemIdentifier}:
    delete:
      operationId: removeAssessmentItem
      summary: Remove an assessment item reference from a section
      description: Remove an assessment item reference from a section. This only
        removes the reference link; the actual assessment item remains in the
        assessment-items collection. The assessment test's XML structure is
        automatically updated.
      tags: *a28
      parameters:
        - name: assessmentTestIdentifier
          description: The unique identifier of the root assessment test
          in: path
          required: true
          schema:
            type: string
        - name: testPartIdentifier
          description: The unique identifier of the parent test part
          in: path
          required: true
          schema:
            type: string
        - name: identifier
          description: The unique identifier of the target section
          in: path
          required: true
          schema:
            type: string
        - name: itemIdentifier
          description: The unique identifier of the assessment item reference to remove
            from the section
          in: path
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
          content: {}
        "404":
          description: Assessment test, test part, section, or item reference not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /assessment-tests/{assessmentTestIdentifier}/test-parts/{testPartIdentifier}/sections/{identifier}/items/order:
    put:
      operationId: updateAssessmentItemOrder
      summary: Reorder assessment items within a section
      description: Update the presentation order of assessment item references within
        a section. This affects the sequence in which items are presented to
        test takers. All specified items must exist in the section.
      tags: *a28
      parameters:
        - name: assessmentTestIdentifier
          description: The unique identifier of the root assessment test
          in: path
          required: true
          schema:
            type: string
        - name: testPartIdentifier
          description: The unique identifier of the parent test part
          in: path
          required: true
          schema:
            type: string
        - name: identifier
          description: The unique identifier of the target section containing the items to
            reorder
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: Array of assessment item references in the desired order
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Unique identifier for the entity on the service provider.
                      href:
                        type: string
                        description: URI reference to the assessment item resource location on the
                          service provider
                      sequence:
                        type: integer
                        exclusiveMinimum: 0
                        description: Defines the sequential order of this item within its parent
                          section. Must be a positive integer that determines
                          presentation order to candidates.
                    required:
                      - identifier
                  minItems: 1
                  description: Array of assessment item identifiers with their updated sequence
                    positions.
              required:
                - items
              description: Update the presentation order of assessment item references within
                a section. All specified items must exist in the section on the
                service provider.
      responses:
        "200":
          description: Assessment item order updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  identifier:
                    type: string
                    description: Unique identifier for the entity on the service provider.
                  title:
                    type: string
                    description: Human-readable title of the entity on the service provider.
                  visible:
                    type: boolean
                    default: true
                    description: Determines whether the assessment section is visible to candidates
                      during test delivery. Sections are visible by default
                      unless explicitly hidden for specific assessment
                      conditions.
                  required:
                    type: boolean
                    default: true
                    description: If a child element is required it must appear (at least once) in
                      the selection.
                  fixed:
                    type: boolean
                    default: false
                    description: If a child element is fixed it must never be shuffled. When used in
                      combination with a selection rule fixed elements do not
                      have their position fixed until after selection has taken
                      place.
                  sequence:
                    type: integer
                    exclusiveMinimum: 0
                    description: Defines the sequential order of this item within its parent
                      section. Must be a positive integer that determines
                      presentation order to candidates.
                  qti-assessment-item-ref:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                          description: Unique identifier for the entity on the service provider.
                        href:
                          type: string
                          description: URI reference to the assessment item resource location on the
                            service provider
                      required:
                        - identifier
                      description: Assessment item reference schema for linking assessment items to
                        sections
                    description: Collection of assessment items that are referenced within this
                      section.
                  qti-pre-condition:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                    description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
                      logical expression that is evaluated before the element is
                      presented. If any pre-condition evaluates to false, the
                      element is skipped.
                  qti-branch-rule:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                    description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
                      expression that, when evaluated to true after the element
                      is presented, causes the test to jump to the target
                      identified by the rule.
                required:
                  - identifier
                  - title
                  - visible
                description: Complete assessment section data with all referenced items.
                  Represents a section containing learning content within a test
                  part.
        "400":
          description: Invalid items array or validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                required:
                  - error
        "404":
          description: Assessment test, test part, section, or item references not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /question:
    post:
      operationId: createQuestionFeedback
      summary: Create question feedback
      description: Creates a new feedback for a question
      tags: &a29
        - Feedback
      requestBody:
        description: The question feedback content to create
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                questionId:
                  type: string
                  description: Identifier of the specific question this feedback refers to
                    (optional, for question-level feedback)
                userId:
                  type: string
                  description: Identifier of the user who submitted the feedback
                feedback:
                  type: string
                  description: The feedback content provided by the user
                lessonId:
                  type: string
                  description: Identifier of the lesson this feedback refers to (required)
                humanApproved:
                  type: boolean
                  description: Whether the feedback has been reviewed and approved by a human
              required:
                - userId
                - feedback
                - lessonId
              description: Schema for creating new feedback (identifier is auto-generated)
      responses:
        "201":
          description: Successfully created question feedback
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateFeedback"
        "400":
          description: Bad Request - Invalid parameters or validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: High-level error message
                  code:
                    type: string
                    description: Machine code identifying error type
                  details:
                    type: string
                    description: Additional human details
                  meta:
                    type: object
                    properties:
                      issues:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              description: Parameter name
                            message:
                              type: string
                              description: Validation message
                            code:
                              type: string
                              description: Zod issue code
                          required:
                            - field
                            - message
                            - code
                        description: Array of individual validation errors
                      eventId:
                        type: string
                        description: Sentry event id
                    required:
                      - issues
                    description: Structured metadata from validation layer
                required:
                  - error
                  - code
                  - meta
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /lesson:
    post:
      operationId: createLessonFeedback
      summary: Create lesson feedback
      description: Creates a new feedback for a lesson
      tags: *a29
      requestBody:
        description: The lesson feedback content to create
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                questionId:
                  type: string
                  description: Identifier of the specific question this feedback refers to
                    (optional, for question-level feedback)
                userId:
                  type: string
                  description: Identifier of the user who submitted the feedback
                feedback:
                  type: string
                  description: The feedback content provided by the user
                lessonId:
                  type: string
                  description: Identifier of the lesson this feedback refers to (required)
                humanApproved:
                  type: boolean
                  description: Whether the feedback has been reviewed and approved by a human
              required:
                - userId
                - feedback
                - lessonId
              description: Schema for creating new feedback (identifier is auto-generated)
      responses:
        "201":
          description: Successfully created lesson feedback
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateFeedback"
        "400":
          description: Bad Request - Invalid parameters or validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: High-level error message
                  code:
                    type: string
                    description: Machine code identifying error type
                  details:
                    type: string
                    description: Additional human details
                  meta:
                    type: object
                    properties:
                      issues:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              description: Parameter name
                            message:
                              type: string
                              description: Validation message
                            code:
                              type: string
                              description: Zod issue code
                          required:
                            - field
                            - message
                            - code
                        description: Array of individual validation errors
                      eventId:
                        type: string
                        description: Sentry event id
                    required:
                      - issues
                    description: Structured metadata from validation layer
                required:
                  - error
                  - code
                  - meta
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /lesson/{lessonId}:
    get:
      operationId: getFeedbackByLessonId
      summary: Get feedback by lesson ID
      description: Retrieves all feedback for a specific lesson
      tags: *a29
      parameters:
        - name: lessonId
          description: The lesson ID to fetch feedback for
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successfully retrieved lesson feedback
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CreateFeedback"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /{id}:
    delete:
      operationId: deleteFeedback
      summary: Delete feedback
      description: Deletes a specific feedback by ID
      tags: *a29
      parameters:
        - name: id
          description: The feedback identifier to delete
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successfully deleted feedback
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        "404":
          description: Feedback not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                  message:
                    type: string
                required:
                  - error
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /validate:
    post:
      operationId: validateXml
      summary: Validate a QTI XML string
      description: Validate a QTI XML file against the QTI 3.0 xsd specification.
      tags: &a30
        - Validation
      requestBody:
        description: The XML string to validate along with its schema type
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                xml:
                  type: string
                  description: The XML string to validate against the QTI 3.0 XSD specification.
                    If entityId is provided, this will be ignored.
                schema:
                  type: string
                  enum:
                    - test
                    - item
                    - stimulus
                  description: The schema represents Assessment Test, Assessment Item or Stimulus
                    and must be one of 'test', 'item', or 'stimulus' types.
                entityId:
                  type: string
                  description: The entity ID to validate the XML against. Must exist in the
                    database. If entityId is provided, the xml strings attached
                    will be ignored.
              required:
                - schema
              description: Validate a QTI XML string against the QTI 3.0 XSD specification.
                You can send Assessment Test, Assessment Item or Stimulus XML
                strings to be validated. If entityId is provided, the xml
                strings attached will be ignored.
            examples:
              default:
                value:
                  schema: item
                  xml: >-
                    <?xml version="1.0" encoding="UTF-8"?>

                    <qti-assessment-item
                      xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                      identifier="xml-choice-item-1"
                      title="Sample Choice Question"
                      adaptive="false"
                      time-dependent="false">

                      <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="identifier">
                        <qti-correct-response>
                          <qti-value>B</qti-value>
                        </qti-correct-response>
                      </qti-response-declaration>

                      <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>
                      <qti-outcome-declaration identifier="FEEDBACK-INLINE" cardinality="single" base-type="identifier"/>

                      <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Math Context"/>
                      <qti-assessment-stimulus-ref identifier="Stimulus2" href="stimuli/Stimulus2" title="Additional Context"/>

                      <qti-item-body>
                        <qti-choice-interaction response-identifier="RESPONSE" shuffle="false" max-choices="1">
                          <qti-prompt>What is 2 + 2?</qti-prompt>
                          <qti-simple-choice identifier="A">
                            3
                            <qti-feedback-inline outcome-identifier="FEEDBACK-INLINE" identifier="A" show-hide="show">
                              <span style="color: #D9534F;">Incorrect: Try counting again.</span>
                            </qti-feedback-inline>
                          </qti-simple-choice>
                          <qti-simple-choice identifier="B">
                            4
                            <qti-feedback-inline outcome-identifier="FEEDBACK-INLINE" identifier="B" show-hide="show">
                              <span style="color: #2E8B57;">Correct: Well done!</span>
                            </qti-feedback-inline>
                          </qti-simple-choice>
                        </qti-choice-interaction>
                      </qti-item-body>

                      <qti-response-processing template="match_correct">
                        <qti-response-condition>
                          <qti-response-if>
                            <qti-match>
                              <qti-variable identifier="RESPONSE"/>
                              <qti-correct identifier="RESPONSE"/>
                            </qti-match>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-if>
                          <qti-response-else>
                            <qti-set-outcome-value identifier="FEEDBACK">
                              <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                            </qti-set-outcome-value>
                          </qti-response-else>
                        </qti-response-condition>
                      </qti-response-processing>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Correct!</strong> Well done.</p>
                        </qti-content-body>
                      </qti-modal-feedback>

                      <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                        <qti-content-body>
                          <p><strong>Incorrect.</strong> Please review and try again.</p>
                        </qti-content-body>
                      </qti-modal-feedback>
                    </qti-assessment-item>
              entityId:
                value:
                  schema: item
                  entityId: fake-item-id-1
      responses:
        "200":
          description: Successfully validated XML
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                    enum: &a31
                      - "true"
                      - "false"
                    description: Whether the XML string was validated successfully.
                  entityId:
                    type: string
                    description: The entity ID of the XML string that was validated. If no entityId
                      is provided, a random identifier will be generated.
                  xmlContent:
                    type: string
                    description: The XML string that was validated. If no xml is provided, the xml
                      string will be the rawXml string that exists in the
                      database.
                  validationErrors:
                    type: array
                    items:
                      type: string
                    description: An array of validation errors that occurred during the validation
                      process. If no validation errors occurred, this will be an
                      empty array.
                  message:
                    type: string
                    description: A message describing the validation process. If the validation was
                      successful this will read 'Valid XML' else it will contain
                      details on the error message.
                required:
                  - success
                  - entityId
                  - xmlContent
                  - validationErrors
                  - message
        "404":
          description: Entity not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: false
                    description: Indicates that the validation failed due to entity not found.
                  entityId:
                    type: string
                    description: The entity ID that was not found in the database.
                  error:
                    type: string
                    const: Entity not found
                    description: Error type indicating the entity was not found.
                  message:
                    type: string
                    description: Detailed error message describing which entity was not found.
                required:
                  - success
                  - entityId
                  - error
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
  /validate/batch:
    post:
      operationId: validateBatch
      summary: Validate a batch of QTI XML strings
      description: Validate a batch of QTI XML strings against the QTI 3.0 xsd
        specification.
      tags: *a30
      requestBody:
        description: The stimulus content to create.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                xml:
                  type: array
                  items:
                    type: string
                  description: An array of XML strings to validate against the QTI 3.0 XSD
                    specification. If entityIds are provided, this will be
                    ignored.
                schema:
                  type: string
                  enum:
                    - test
                    - item
                    - stimulus
                  description: The schema to validate the XML against. Must be one of 'test',
                    'item', or 'stimulus'.
                entityIds:
                  type: array
                  items:
                    type: string
                  description: An array of entity IDs to validate the XML against. Must be one of
                    'test', 'item', or 'stimulus'.
              required:
                - xml
                - schema
                - entityIds
              description: Validate a batch of QTI XML strings against the QTI 3.0 XSD
                specification. You can send Assessment Test, Assessment Item or
                Stimulus XML strings to be validated along with its schema type
                of either 'test', 'item', or 'stimulus'. If entityIds are
                provided, the xml strings attached will be ignored and the
                rawXml string will be returned as xmlContent from the database.
            examples:
              default:
                value:
                  schema: item
                  xml:
                    - >-
                      <?xml version="1.0" encoding="UTF-8"?>

                      <qti-assessment-item
                        xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                        identifier="xml-choice-item-1"
                        title="Sample Choice Question"
                        adaptive="false"
                        time-dependent="false">

                        <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="identifier">
                          <qti-correct-response>
                            <qti-value>B</qti-value>
                          </qti-correct-response>
                        </qti-response-declaration>

                        <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>
                        <qti-outcome-declaration identifier="FEEDBACK-INLINE" cardinality="single" base-type="identifier"/>

                        <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Math Context"/>
                        <qti-assessment-stimulus-ref identifier="Stimulus2" href="stimuli/Stimulus2" title="Additional Context"/>

                        <qti-item-body>
                          <qti-choice-interaction response-identifier="RESPONSE" shuffle="false" max-choices="1">
                            <qti-prompt>What is 2 + 2?</qti-prompt>
                            <qti-simple-choice identifier="A">
                              3
                              <qti-feedback-inline outcome-identifier="FEEDBACK-INLINE" identifier="A" show-hide="show">
                                <span style="color: #D9534F;">Incorrect: Try counting again.</span>
                              </qti-feedback-inline>
                            </qti-simple-choice>
                            <qti-simple-choice identifier="B">
                              4
                              <qti-feedback-inline outcome-identifier="FEEDBACK-INLINE" identifier="B" show-hide="show">
                                <span style="color: #2E8B57;">Correct: Well done!</span>
                              </qti-feedback-inline>
                            </qti-simple-choice>
                          </qti-choice-interaction>
                        </qti-item-body>

                        <qti-response-processing template="match_correct">
                          <qti-response-condition>
                            <qti-response-if>
                              <qti-match>
                                <qti-variable identifier="RESPONSE"/>
                                <qti-correct identifier="RESPONSE"/>
                              </qti-match>
                              <qti-set-outcome-value identifier="FEEDBACK">
                                <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                              </qti-set-outcome-value>
                            </qti-response-if>
                            <qti-response-else>
                              <qti-set-outcome-value identifier="FEEDBACK">
                                <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                              </qti-set-outcome-value>
                            </qti-response-else>
                          </qti-response-condition>
                        </qti-response-processing>

                        <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                          <qti-content-body>
                            <p><strong>Correct!</strong> Well done.</p>
                          </qti-content-body>
                        </qti-modal-feedback>

                        <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                          <qti-content-body>
                            <p><strong>Incorrect.</strong> Please review and try again.</p>
                          </qti-content-body>
                        </qti-modal-feedback>
                      </qti-assessment-item>
                    - >-
                      <?xml version="1.0" encoding="UTF-8"?>

                      <qti-assessment-item
                        xmlns="http://www.imsglobal.org/xsd/imsqtiasi_v3p0"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd"
                        identifier="xml-choice-item-1"
                        title="Sample Choice Question"
                        adaptive="false"
                        time-dependent="false">

                        <qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="identifier">
                          <qti-correct-response>
                            <qti-value>B</qti-value>
                          </qti-correct-response>
                        </qti-response-declaration>

                        <qti-outcome-declaration identifier="FEEDBACK" cardinality="single" base-type="identifier"/>
                        <qti-outcome-declaration identifier="FEEDBACK-INLINE" cardinality="single" base-type="identifier"/>

                        <qti-assessment-stimulus-ref identifier="Stimulus1" href="stimuli/Stimulus1" title="Math Context"/>
                        <qti-assessment-stimulus-ref identifier="Stimulus2" href="stimuli/Stimulus2" title="Additional Context"/>

                        <qti-item-body>
                          <qti-choice-interaction response-identifier="RESPONSE" shuffle="false" max-choices="1">
                            <qti-prompt>What is 2 + 2?</qti-prompt>
                            <qti-simple-choice identifier="A">
                              3
                              <qti-feedback-inline outcome-identifier="FEEDBACK-INLINE" identifier="A" show-hide="show">
                                <span style="color: #D9534F;">Incorrect: Try counting again.</span>
                              </qti-feedback-inline>
                            </qti-simple-choice>
                            <qti-simple-choice identifier="B">
                              4
                              <qti-feedback-inline outcome-identifier="FEEDBACK-INLINE" identifier="B" show-hide="show">
                                <span style="color: #2E8B57;">Correct: Well done!</span>
                              </qti-feedback-inline>
                            </qti-simple-choice>
                          </qti-choice-interaction>
                        </qti-item-body>

                        <qti-response-processing template="match_correct">
                          <qti-response-condition>
                            <qti-response-if>
                              <qti-match>
                                <qti-variable identifier="RESPONSE"/>
                                <qti-correct identifier="RESPONSE"/>
                              </qti-match>
                              <qti-set-outcome-value identifier="FEEDBACK">
                                <qti-base-value base-type="identifier">CORRECT</qti-base-value>
                              </qti-set-outcome-value>
                            </qti-response-if>
                            <qti-response-else>
                              <qti-set-outcome-value identifier="FEEDBACK">
                                <qti-base-value base-type="identifier">INCORRECT</qti-base-value>
                              </qti-set-outcome-value>
                            </qti-response-else>
                          </qti-response-condition>
                        </qti-response-processing>

                        <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="CORRECT" show-hide="show">
                          <qti-content-body>
                            <p><strong>Correct!</strong> Well done.</p>
                          </qti-content-body>
                        </qti-modal-feedback>

                        <qti-modal-feedback outcome-identifier="FEEDBACK" identifier="INCORRECT" show-hide="show">
                          <qti-content-body>
                            <p><strong>Incorrect.</strong> Please review and try again.</p>
                          </qti-content-body>
                        </qti-modal-feedback>
                      </qti-assessment-item>
              entityIds:
                value:
                  schema: test
                  entityIds:
                    - fake-test-id-1
                    - fake-test-id-2
      responses:
        "200":
          description: Successfully validated XML
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        success:
                          type: string
                          enum: *a31
                          description: Whether the XML string was validated successfully.
                        entityId:
                          type: string
                          description: The entity ID of the XML string that was validated. If no entityId
                            is provided, a random identifier will be generated.
                        xmlContent:
                          type: string
                          description: The XML string that was validated. If no xml is provided, the xml
                            string will be the rawXml string that exists in the
                            database.
                        validationErrors:
                          type: array
                          items:
                            type: string
                          description: An array of validation errors that occurred during the validation
                            process. If no validation errors occurred, this will
                            be an empty array.
                        message:
                          type: string
                          description: A message describing the validation process. If the validation was
                            successful this will read 'Valid XML' else it will
                            contain details on the error message.
                      required:
                        - success
                        - entityId
                        - xmlContent
                        - validationErrors
                        - message
                required:
                  - results
        "404":
          description: Entity not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: false
                    description: Indicates that the validation failed due to entity not found.
                  entityId:
                    type: string
                    description: The entity ID that was not found in the database.
                  error:
                    type: string
                    const: Entity not found
                    description: Error type indicating the entity was not found.
                  message:
                    type: string
                    description: Detailed error message describing which entity was not found.
                required:
                  - success
                  - entityId
                  - error
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error type identifier
                  message:
                    type: string
                    description: Human-readable error message
                  eventId:
                    type: string
                    description: Sentry event ID for error tracking
                  details:
                    type: string
                    description: Stack trace or additional error details
                required:
                  - error
                  - message
                  - details
                description: Internal server error response
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          scopes:
            https://purl.imsglobal.org/spec/qti/v3/scope/readonly: Read access to QTI
            https://purl.imsglobal.org/spec/qti/v3/scope/createput: Create and update access to QTI
            https://purl.imsglobal.org/spec/qti/v3/scope/delete: Delete access to QTI
          tokenUrl: https://prod-beyond-timeback-api-2-idp.auth.us-east-1.amazoncognito.com/oauth2/token
    MCP:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://prod-beyond-timeback-api-2-idp.auth.us-east-1.amazoncognito.com/oauth2/authorize
          tokenUrl: https://prod-beyond-timeback-api-2-idp.auth.us-east-1.amazoncognito.com/oauth2/token
          scopes:
            https://purl.imsglobal.org/spec/qti/v3/scope/readonly: Read access to QTI
  schemas:
    Stimulus:
      type: object
      properties:
        identifier:
          type: string
          description: Unique identifier for the entity on the service provider.
        title:
          type: string
          description: Human-readable title of the entity on the service provider.
        label:
          type: string
          description: A human readable label that can be used to describe the Stimulus.
        language:
          type: string
          description: The default language for the Stimulus.
          default: en
        stylesheet:
          type: object
          properties:
            href:
              type: string
              description: The identifier or location of the external stylesheet.
            type:
              type: string
              description: The type of the external stylesheet.
          required:
            - href
            - type
          description: The set of external style sheets that are associated with the
            Stimulus. The order of definition is significant.
        content:
          type: string
          description: HTML content of the stimulus provided as a string when creating or
            updating a stimulus. When the rawXml is generated, this content is
            used to create teh qti-stimulus-body that lives on the xml.
        catalogInfo:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Catalog entry identifier (must be valid XML NCName). The unique
                  identifier used to locate the catalog from a
                  data-catalog-idref.
              support:
                type: string
                description: This attribute names either pre-defined supports or a custom-named
                  support. The named support will indicate for whom the dormant
                  content is intended. Use only one card for any particular
                  named support in a catalog
              content:
                type: string
                description: A data structure within a catalog which contains dormant HTML
                  content or a resource reference for a specific
                  support/feature. A card may also contain multiple CardEntry
                  containers. For example, you might have multiple CardEntry
                  nodes for different language versions of a particular support.
            required:
              - id
              - support
              - content
          description: Array of catalog cards.
        toolName:
          type: string
          description: The tool name characteristic allows the tool creating the stimulus
            to identify itself. Other processing systems may use this
            information to interpret the content of application specific data,
            such as labels on the elements of the stimulus's stimulus body.
        toolVersion:
          type: string
          description: The tool version characteristic allows the tool creating the item
            to identify its version. This value must only be interpreted in the
            context of the tool-name.
        metadata:
          type: object
          additionalProperties: {}
          description: Additional custom metadata for extending entity properties beyond
            standard specification for QTI entities.
      required:
        - identifier
        - title
        - content
      description: Create or update a stimulus on the service provider with HTML
        content and optional configuration
    AssessmentItem:
      type: object
      properties:
        identifier:
          type: string
          description: Unique identifier for the entity on the service provider.
        title:
          type: string
          description: Human-readable title of the entity on the service provider.
        type:
          type: string
          enum: *a10
          description: Assessment item interaction types that are supported by the service
            provider.
        qtiVersion:
          type: string
          default: "3.0"
          description: QTI version of the assessment item
        timeDependent:
          type: boolean
          default: false
          description: Indicates whether the candidate's response time affects the scoring
            or outcome of this assessment item. When true, timing data is used
            in response processing calculations.
        adaptive:
          type: boolean
          default: false
          description: Indicates whether this assessment item adapts its presentation or
            behavior based on the candidate's responses. Adaptive items can
            modify their content, difficulty, or available options during the
            assessment session.
        responseDeclarations:
          type: array
          items:
            type: object
            properties:
              identifier:
                type: string
                description: Unique identifier for this response variable within the item; must
                  be distinct from other item variables and cannot use reserved
                  names (completionStatus, numAttempts, duration).
              cardinality:
                type: string
                enum: *a3
                description: Specifies how many values the response variable can hold and
                  whether order matters.
              baseType:
                type: string
                enum: *a4
                description: Primitive data type for each answer stored in the variable (e.g.,
                  integer, string, boolean). Omit when cardinality is 'record',
                  because each field in a record may have its own type.
              correctResponse:
                type: object
                properties:
                  value:
                    type: array
                    items:
                      type: string
                required:
                  - value
                description: Optional model answer; must conform to the variable's cardinality
                  (single = one value, multiple/ordered = ordered or unordered
                  list); omit when no optimal answer exists (e.g., essays);
                  delivery engines may display it as the solution in review
                  mode.
            required:
              - identifier
              - cardinality
              - correctResponse
        outcomeDeclarations:
          type: array
          items:
            type: object
            properties:
              identifier:
                type: string
                description: Unique identifier for this response variable within the item; must
                  be distinct from other item variables and cannot use reserved
                  names (completionStatus, numAttempts, duration).
              cardinality:
                type: string
                enum: *a3
                description: Specifies how many values the response variable can hold and
                  whether order matters.
              baseType:
                type: string
                enum: *a4
                description: Primitive data type for each answer stored in the variable (e.g.,
                  integer, string, boolean). Omit when cardinality is 'record',
                  because each field in a record may have its own type.
            required:
              - identifier
              - cardinality
        responseProcessing:
          type: object
          properties:
            templateType:
              type: string
              enum: *a11
              description: Response processing template type. 'match_correct' compares the
                candidate's response directly against the correct response and
                assigns binary feedback. 'map_response' uses mapping rules to
                assign scores and feedback based on response values.
            responseDeclarationIdentifier:
              type: string
              description: Identifier of the response declaration that this response
                processing rule applies to. Must match an existing
                responseDeclaration identifier within the same assessment item.
            outcomeIdentifier:
              type: string
              description: Identifier of the outcome variable that will be set by this
                response processing rule. Common values include 'SCORE' for
                numeric scoring or 'FEEDBACK' for feedback identifiers.
            correctResponseIdentifier:
              type: string
              description: Identifier value assigned to the outcome variable when the
                candidate's response is evaluated as correct. Used primarily
                with match_correct template type.
            incorrectResponseIdentifier:
              type: string
              description: Identifier value assigned to the outcome variable when the
                candidate's response is evaluated as incorrect. Used primarily
                with match_correct template type.
            inlineFeedback:
              type: object
              properties:
                outcomeIdentifier:
                  type: string
                  description: Identifier of the outcome variable to be set with the inline
                    feedback value.
                variableIdentifier:
                  type: string
                  description: Identifier of the variable whose value will be assigned to the
                    outcome variable during response processing.
              required:
                - outcomeIdentifier
                - variableIdentifier
              description: Optional inline feedback configuration that sets an outcome
                variable based on another variable's value during response
                processing.
          required:
            - templateType
            - responseDeclarationIdentifier
            - outcomeIdentifier
            - correctResponseIdentifier
            - incorrectResponseIdentifier
          description: Response processing is the process by which the Delivery Engine
            assigns outcomes based on the candidate's responses. The outcomes
            may be used to provide feedback to the candidate. Response
            processing must only take place in direct response to a user action
            or in response to some expected event, such as the end of a test.
        metadata:
          type: object
          properties:
            subject:
              type: string
              description: Subject area for the assessment item
              example: Math
            grade:
              type: string
              enum: *a12
              description: Grade level for the assessment item. Must use a value from K-12
              example: "10"
            difficulty:
              type: string
              enum: *a13
              description: Difficulty level of the assessment item
              example: easy
            learningObjectiveSet:
              type: array
              items:
                type: object
                properties:
                  source:
                    type: string
                    description: The source of the learning objective set or learning standards.
                    example: CASE
                  learningObjectiveIds:
                    type: array
                    items:
                      type: string
                    description: Array of learning objective identifiers. If source is 'CASE', these
                      can be the CFItem sourcedIds or CFItem's Human Coding
                      Schema.
                    example: *a14
                required:
                  - source
                  - learningObjectiveIds
              description: Learning objectives associated with this assessment item
              example: *a15
          additionalProperties: true
          description: Additional custom metadata for assessment items with validation for
            specific fields used by external applications
        modalFeedback:
          type: array
          items:
            type: object
            properties:
              outcomeIdentifier:
                type: string
                description: Identifier of the outcome variable that controls when this feedback
                  is displayed. The feedback is shown or hidden based on the
                  value of this outcome variable after response processing.
              identifier:
                type: string
                description: Unique identifier for this specific feedback element within the
                  assessment item. Used to reference and control this particular
                  piece of feedback.
              showHide:
                type: string
                enum: *a5
                description: Determines the feedback visibility behavior. 'show' displays the
                  feedback when the outcome variable matches the identifier,
                  'hide' conceals it when the outcome variable matches.
              content:
                type: string
                description: The HTML or text content to be displayed as feedback to the
                  candidate.
              title:
                type: string
                description: Optional title displayed in the modal feedback dialog header. Only
                  used with modal feedback presentations.
            required:
              - outcomeIdentifier
              - identifier
              - showHide
              - content
              - title
          description: Modal feedback shown to candidates in popup dialogs immediately
            following response processing. Cannot contain interaction elements
            and is displayed based on outcome variable values.
        feedbackInline:
          type: array
          items:
            type: object
            properties:
              outcomeIdentifier:
                type: string
                description: Identifier of the outcome variable that controls when this feedback
                  is displayed. The feedback is shown or hidden based on the
                  value of this outcome variable after response processing.
              identifier:
                type: string
                description: Unique identifier for this specific feedback element within the
                  assessment item. Used to reference and control this particular
                  piece of feedback.
              showHide:
                type: string
                enum: *a5
                description: Determines the feedback visibility behavior. 'show' displays the
                  feedback when the outcome variable matches the identifier,
                  'hide' conceals it when the outcome variable matches.
              content:
                type: string
                description: The HTML or text content to be displayed as feedback to the
                  candidate.
              class:
                type: array
                items:
                  type: string
                description: CSS class names applied to the feedback element for styling
                  purposes. Multiple classes can be specified for flexible
                  presentation control.
            required:
              - outcomeIdentifier
              - identifier
              - showHide
              - content
              - class
          description: Inline feedback embedded within interaction elements, displayed
            alongside choices or input areas. Provides contextual feedback.
        feedbackBlock:
          type: array
          items:
            type: object
            properties:
              outcomeIdentifier:
                type: string
                description: Identifier of the outcome variable that controls when this feedback
                  is displayed. The feedback is shown or hidden based on the
                  value of this outcome variable after response processing.
              identifier:
                type: string
                description: Unique identifier for this specific feedback element within the
                  assessment item. Used to reference and control this particular
                  piece of feedback.
              showHide:
                type: string
                enum: *a5
                description: Determines the feedback visibility behavior. 'show' displays the
                  feedback when the outcome variable matches the identifier,
                  'hide' conceals it when the outcome variable matches.
              content:
                type: string
                description: The HTML or text content to be displayed as feedback to the
                  candidate.
              class:
                type: array
                items:
                  type: string
                description: CSS class names applied to the feedback element for styling
                  purposes. Multiple classes can be specified for flexible
                  presentation control.
            required:
              - outcomeIdentifier
              - identifier
              - showHide
              - content
              - class
          description: Inline feedback embedded within interaction elements, displayed
            alongside choices or input areas. Provides contextual feedback.
      required:
        - identifier
        - title
        - type
    AssessmentTest:
      type: object
      properties:
        identifier:
          type: string
          description: Unique identifier for the entity on the service provider.
        title:
          type: string
          description: Human-readable title of the entity on the service provider.
        qtiVersion:
          type: string
          default: "3.0"
          description: Version of the specification used for this assessment test
        toolName:
          type: string
          description: Name of the authoring tool that created this entity. The tool name
            characteristic allows the tool creating the test to identify itself.
            Other processing systems may use this information to interpret the
            content of application specific data, such as labels on the elements
            of the test rubric.
        toolVersion:
          type: string
          description: Version of the authoring tool that created this entity. The tool
            version characteristic allows the tool creating the test to identify
            its version. This value must only be interpreted in the context of
            the tool name.
        timeLimit:
          type: number
          description: Time limit for the entire assessment test in seconds. When not
            specified, there is no time limit
        maxAttempts:
          type: number
          description: Maximum number of attempts allowed for the assessment test. When
            not specified, unlimited attempts are allowed
        toolsEnabled:
          type: object
          additionalProperties:
            type: boolean
          description: Configuration of assessment tools available to candidates. Each
            tool is represented as a key-value pair where the key is the tool
            name and the value indicates if it's enabled
        metadata:
          type: object
          additionalProperties: {}
          description: Additional custom metadata for extending entity properties beyond
            standard specification for QTI entities.
        qti-test-part:
          type: array
          items:
            $ref: "#/components/schemas/TestPart"
          description: Array of test parts to include in this assessment test. At least
            one test part is required
        qti-outcome-declaration:
          type: array
          items:
            type: object
            properties:
              identifier:
                type: string
                description: Unique identifier for the entity on the service provider.
              cardinality:
                type: string
                enum: *a21
                default: single
                description: Defines how scoring information is structured and stored. 'single'
                  for one overall score, 'multiple' for separate scores or
                  points, 'ordered' for scores maintaining a specific sequence,
                  'record' for complex scoring with multiple named components.
              baseType:
                type: string
                enum: *a22
                description: Data type of the outcome variable, determining how values are
                  stored and processed
              normalMaximum:
                type: number
                description: Expected maximum value for this outcome variable in normal
                  circumstances
              normalMinimum:
                type: number
                description: Expected minimum value for this outcome variable in normal
                  circumstances
              defaultValue:
                type: object
                properties:
                  value:
                    description: The default value to assign to the outcome variable
                description: Optional default value configuration for outcome variables
            required:
              - identifier
              - baseType
          description: Array of outcome variable declarations for storing assessment
            results and computed values
      required:
        - identifier
        - title
        - qti-test-part
      description: Create a new assessment test on the service provider. The test must
        include at least one test part and can optionally include outcome
        declarations for result tracking
    TestPart:
      type: object
      properties:
        identifier:
          type: string
          description: Unique identifier for the entity on the service provider.
        navigationMode:
          type: string
          enum: *a19
          description: Controls how learners navigate through the test part. 'linear'
            requires items to be responded to in sequence without jumping
            around, while 'nonlinear' allows candidates to respond to items in
            any order they choose.
        submissionMode:
          type: string
          enum: *a20
          description: Determines how learner responses are submitted for response
            processing. 'individual' allows responses to be submitted as each
            item is completed, while 'simultaneous' means responses for all
            items are sent when the whole part is completed.
        qti-assessment-section:
          type: array
          items:
            $ref: "#/components/schemas/Section"
        qti-pre-condition:
          type: array
          items:
            type: object
            additionalProperties: {}
          description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
            logical expression that is evaluated before the element is
            presented. If any pre-condition evaluates to false, the element is
            skipped.
        qti-branch-rule:
          type: array
          items:
            type: object
            additionalProperties: {}
          description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
            expression that, when evaluated to true after the element is
            presented, causes the test to jump to the target identified by the
            rule.
      required:
        - identifier
        - navigationMode
        - submissionMode
        - qti-assessment-section
      description: Complete test part structure as parsed from XML.
    Section:
      type: object
      properties:
        identifier:
          type: string
          description: Unique identifier for the entity on the service provider.
        title:
          type: string
          description: Human-readable title of the entity on the service provider.
        visible:
          type: boolean
          default: true
          description: Determines whether the assessment section is visible to candidates
            during test delivery. Sections are visible by default unless
            explicitly hidden for specific assessment conditions.
        required:
          type: boolean
          default: true
          description: If a child element is required it must appear (at least once) in
            the selection.
        fixed:
          type: boolean
          default: false
          description: If a child element is fixed it must never be shuffled. When used in
            combination with a selection rule fixed elements do not have their
            position fixed until after selection has taken place.
        sequence:
          type: integer
          exclusiveMinimum: 0
          description: Defines the sequential order of this item within its parent
            section. Must be a positive integer that determines presentation
            order to candidates.
        qti-assessment-item-ref:
          type: array
          items:
            type: object
            properties:
              identifier:
                type: string
                description: Unique identifier for the entity on the service provider.
              href:
                type: string
                description: URI reference to the assessment item resource location on the
                  service provider
            required:
              - identifier
            description: Assessment item reference schema for linking assessment items to
              sections
          description: Collection of assessment items that are referenced within this
            section.
        qti-pre-condition:
          type: array
          items:
            type: object
            additionalProperties: {}
          description: Array of QTI 3.0 pre-conditions. Each pre-condition contains a
            logical expression that is evaluated before the element is
            presented. If any pre-condition evaluates to false, the element is
            skipped.
        qti-branch-rule:
          type: array
          items:
            type: object
            additionalProperties: {}
          description: Array of QTI 3.0 branch rules. Each branch rule contains a logical
            expression that, when evaluated to true after the element is
            presented, causes the test to jump to the target identified by the
            rule.
      required:
        - identifier
        - title
        - visible
      description: Core assessment section schema containing all essential section
        attributes
    CreateFeedback:
      type: object
      properties:
        questionId:
          type: string
          description: Identifier of the specific question this feedback refers to
            (optional, for question-level feedback)
        userId:
          type: string
          description: Identifier of the user who submitted the feedback
        feedback:
          type: string
          description: The feedback content provided by the user
        type:
          type: string
          enum:
            - QUESTION
            - LESSON
          description: Type of feedback - either for a specific question or for the entire
            lesson
        lessonId:
          type: string
          description: Identifier of the lesson this feedback refers to (required)
        humanApproved:
          type: boolean
          description: Whether the feedback has been reviewed and approved by a human
      required:
        - userId
        - feedback
        - type
        - lessonId
      description: Schema for creating new feedback (identifier is auto-generated)
