Update a test part's configuration and sections
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.
curl --request PUT \
--url https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"identifier": "<string>",
"qti-assessment-section": [
{
"identifier": "<string>",
"title": "<string>",
"visible": true,
"required": true,
"fixed": false,
"sequence": 123,
"qti-assessment-item-ref": [
{
"identifier": "<string>",
"href": "<string>",
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
],
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
],
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
'import requests
url = "https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier}"
payload = {
"identifier": "<string>",
"qti-assessment-section": [
{
"identifier": "<string>",
"title": "<string>",
"visible": True,
"required": True,
"fixed": False,
"sequence": 123,
"qti-assessment-item-ref": [
{
"identifier": "<string>",
"href": "<string>",
"qti-pre-condition": [{}],
"qti-branch-rule": [{}]
}
],
"qti-pre-condition": [{}],
"qti-branch-rule": [{}]
}
],
"qti-pre-condition": [{}],
"qti-branch-rule": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
identifier: '<string>',
'qti-assessment-section': [
{
identifier: '<string>',
title: '<string>',
visible: true,
required: true,
fixed: false,
sequence: 123,
'qti-assessment-item-ref': [
{
identifier: '<string>',
href: '<string>',
'qti-pre-condition': [{}],
'qti-branch-rule': [{}]
}
],
'qti-pre-condition': [{}],
'qti-branch-rule': [{}]
}
],
'qti-pre-condition': [{}],
'qti-branch-rule': [{}]
})
};
fetch('https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'identifier' => '<string>',
'qti-assessment-section' => [
[
'identifier' => '<string>',
'title' => '<string>',
'visible' => true,
'required' => true,
'fixed' => false,
'sequence' => 123,
'qti-assessment-item-ref' => [
[
'identifier' => '<string>',
'href' => '<string>',
'qti-pre-condition' => [
[
]
],
'qti-branch-rule' => [
[
]
]
]
],
'qti-pre-condition' => [
[
]
],
'qti-branch-rule' => [
[
]
]
]
],
'qti-pre-condition' => [
[
]
],
'qti-branch-rule' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier}"
payload := strings.NewReader("{\n \"identifier\": \"<string>\",\n \"qti-assessment-section\": [\n {\n \"identifier\": \"<string>\",\n \"title\": \"<string>\",\n \"visible\": true,\n \"required\": true,\n \"fixed\": false,\n \"sequence\": 123,\n \"qti-assessment-item-ref\": [\n {\n \"identifier\": \"<string>\",\n \"href\": \"<string>\",\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n }\n ],\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n }\n ],\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"identifier\": \"<string>\",\n \"qti-assessment-section\": [\n {\n \"identifier\": \"<string>\",\n \"title\": \"<string>\",\n \"visible\": true,\n \"required\": true,\n \"fixed\": false,\n \"sequence\": 123,\n \"qti-assessment-item-ref\": [\n {\n \"identifier\": \"<string>\",\n \"href\": \"<string>\",\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n }\n ],\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n }\n ],\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"identifier\": \"<string>\",\n \"qti-assessment-section\": [\n {\n \"identifier\": \"<string>\",\n \"title\": \"<string>\",\n \"visible\": true,\n \"required\": true,\n \"fixed\": false,\n \"sequence\": 123,\n \"qti-assessment-item-ref\": [\n {\n \"identifier\": \"<string>\",\n \"href\": \"<string>\",\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n }\n ],\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n }\n ],\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"identifier": "<string>",
"navigationMode": "linear",
"submissionMode": "individual",
"qti-assessment-section": [
{
"identifier": "<string>",
"title": "<string>",
"visible": true,
"required": true,
"fixed": false,
"sequence": 123,
"qti-assessment-item-ref": [
{
"identifier": "<string>",
"href": "<string>",
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
],
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
],
"rawXml": "<string>",
"content": {
"qti-test-part": {
"_attributes": {
"identifier": "<string>",
"navigation-mode": "<string>",
"submission-mode": "<string>"
},
"qti-assessment-section": [
{
"_attributes": {
"identifier": "<string>",
"title": "<string>",
"visible": "<string>",
"required": "<string>",
"fixed": "<string>"
},
"qti-assessment-item-ref": [
{
"_attributes": {
"identifier": "<string>",
"href": "<string>"
},
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
]
}
]
}
},
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}Authorizations
Path Parameters
Body
The test part to update
Update an existing test part on the service provider. All required test part fields must be provided.
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.
individual, simultaneous Response
Test part updated successfully
Response data returned after successfully updating a test part. Contains the updated XML and parsed content structure.
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.
individual, simultaneous 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.
curl --request PUT \
--url https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"identifier": "<string>",
"qti-assessment-section": [
{
"identifier": "<string>",
"title": "<string>",
"visible": true,
"required": true,
"fixed": false,
"sequence": 123,
"qti-assessment-item-ref": [
{
"identifier": "<string>",
"href": "<string>",
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
],
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
],
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
'import requests
url = "https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier}"
payload = {
"identifier": "<string>",
"qti-assessment-section": [
{
"identifier": "<string>",
"title": "<string>",
"visible": True,
"required": True,
"fixed": False,
"sequence": 123,
"qti-assessment-item-ref": [
{
"identifier": "<string>",
"href": "<string>",
"qti-pre-condition": [{}],
"qti-branch-rule": [{}]
}
],
"qti-pre-condition": [{}],
"qti-branch-rule": [{}]
}
],
"qti-pre-condition": [{}],
"qti-branch-rule": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
identifier: '<string>',
'qti-assessment-section': [
{
identifier: '<string>',
title: '<string>',
visible: true,
required: true,
fixed: false,
sequence: 123,
'qti-assessment-item-ref': [
{
identifier: '<string>',
href: '<string>',
'qti-pre-condition': [{}],
'qti-branch-rule': [{}]
}
],
'qti-pre-condition': [{}],
'qti-branch-rule': [{}]
}
],
'qti-pre-condition': [{}],
'qti-branch-rule': [{}]
})
};
fetch('https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'identifier' => '<string>',
'qti-assessment-section' => [
[
'identifier' => '<string>',
'title' => '<string>',
'visible' => true,
'required' => true,
'fixed' => false,
'sequence' => 123,
'qti-assessment-item-ref' => [
[
'identifier' => '<string>',
'href' => '<string>',
'qti-pre-condition' => [
[
]
],
'qti-branch-rule' => [
[
]
]
]
],
'qti-pre-condition' => [
[
]
],
'qti-branch-rule' => [
[
]
]
]
],
'qti-pre-condition' => [
[
]
],
'qti-branch-rule' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier}"
payload := strings.NewReader("{\n \"identifier\": \"<string>\",\n \"qti-assessment-section\": [\n {\n \"identifier\": \"<string>\",\n \"title\": \"<string>\",\n \"visible\": true,\n \"required\": true,\n \"fixed\": false,\n \"sequence\": 123,\n \"qti-assessment-item-ref\": [\n {\n \"identifier\": \"<string>\",\n \"href\": \"<string>\",\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n }\n ],\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n }\n ],\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"identifier\": \"<string>\",\n \"qti-assessment-section\": [\n {\n \"identifier\": \"<string>\",\n \"title\": \"<string>\",\n \"visible\": true,\n \"required\": true,\n \"fixed\": false,\n \"sequence\": 123,\n \"qti-assessment-item-ref\": [\n {\n \"identifier\": \"<string>\",\n \"href\": \"<string>\",\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n }\n ],\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n }\n ],\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qti.alpha-1edtech.ai/api/assessment-tests/{assessmentTestIdentifier}/test-parts/{identifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"identifier\": \"<string>\",\n \"qti-assessment-section\": [\n {\n \"identifier\": \"<string>\",\n \"title\": \"<string>\",\n \"visible\": true,\n \"required\": true,\n \"fixed\": false,\n \"sequence\": 123,\n \"qti-assessment-item-ref\": [\n {\n \"identifier\": \"<string>\",\n \"href\": \"<string>\",\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n }\n ],\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n }\n ],\n \"qti-pre-condition\": [\n {}\n ],\n \"qti-branch-rule\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"identifier": "<string>",
"navigationMode": "linear",
"submissionMode": "individual",
"qti-assessment-section": [
{
"identifier": "<string>",
"title": "<string>",
"visible": true,
"required": true,
"fixed": false,
"sequence": 123,
"qti-assessment-item-ref": [
{
"identifier": "<string>",
"href": "<string>",
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
],
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
],
"rawXml": "<string>",
"content": {
"qti-test-part": {
"_attributes": {
"identifier": "<string>",
"navigation-mode": "<string>",
"submission-mode": "<string>"
},
"qti-assessment-section": [
{
"_attributes": {
"identifier": "<string>",
"title": "<string>",
"visible": "<string>",
"required": "<string>",
"fixed": "<string>"
},
"qti-assessment-item-ref": [
{
"_attributes": {
"identifier": "<string>",
"href": "<string>"
},
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
]
}
]
}
},
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"details": "<string>",
"errors": [
{
"detail": "<string>",
"pointer": "<string>"
}
],
"traceId": "<string>"
}