> ## Documentation Index
> Fetch the complete documentation index at: https://docs.timeback.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update an entire assessment test

> 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.



## OpenAPI

````yaml /openapi/beyond-ai/qti-api.yaml put /assessment-tests/{identifier}
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:
  /assessment-tests/{identifier}:
    put:
      tags:
        - Assessment Test Management
      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.
      operationId: updateAssessmentTest
      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:
              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:
        '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:
                            - 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:
                            - 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:
                            - 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:
                            - 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
                  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
components:
  schemas:
    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:
                  - 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:
                  - 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
              - 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:
            - 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:
            - 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:
            $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
  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

````