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.
curl --request PUT \
--url https://qti.alpha-1edtech.ai/api/assessment-tests/{identifier} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"identifier": "<string>",
"title": "<string>",
"qti-test-part": [
{
"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": [
{}
]
}
],
"qtiVersion": "3.0",
"toolName": "<string>",
"toolVersion": "<string>",
"timeLimit": 123,
"maxAttempts": 123,
"toolsEnabled": {},
"metadata": {},
"qti-outcome-declaration": [
{
"identifier": "<string>",
"cardinality": "single",
"normalMaximum": 123,
"normalMinimum": 123,
"defaultValue": {
"value": "<unknown>"
}
}
]
}
'import requests
url = "https://qti.alpha-1edtech.ai/api/assessment-tests/{identifier}"
payload = {
"identifier": "<string>",
"title": "<string>",
"qti-test-part": [
{
"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": [{}]
}
],
"qtiVersion": "3.0",
"toolName": "<string>",
"toolVersion": "<string>",
"timeLimit": 123,
"maxAttempts": 123,
"toolsEnabled": {},
"metadata": {},
"qti-outcome-declaration": [
{
"identifier": "<string>",
"cardinality": "single",
"normalMaximum": 123,
"normalMinimum": 123,
"defaultValue": { "value": "<unknown>" }
}
]
}
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>',
title: '<string>',
'qti-test-part': [
{
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': [{}]
}
],
qtiVersion: '3.0',
toolName: '<string>',
toolVersion: '<string>',
timeLimit: 123,
maxAttempts: 123,
toolsEnabled: {},
metadata: {},
'qti-outcome-declaration': [
{
identifier: '<string>',
cardinality: 'single',
normalMaximum: 123,
normalMinimum: 123,
defaultValue: {value: '<unknown>'}
}
]
})
};
fetch('https://qti.alpha-1edtech.ai/api/assessment-tests/{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/{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>',
'title' => '<string>',
'qti-test-part' => [
[
'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' => [
[
]
]
]
],
'qtiVersion' => '3.0',
'toolName' => '<string>',
'toolVersion' => '<string>',
'timeLimit' => 123,
'maxAttempts' => 123,
'toolsEnabled' => [
],
'metadata' => [
],
'qti-outcome-declaration' => [
[
'identifier' => '<string>',
'cardinality' => 'single',
'normalMaximum' => 123,
'normalMinimum' => 123,
'defaultValue' => [
'value' => '<unknown>'
]
]
]
]),
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/{identifier}"
payload := strings.NewReader("{\n \"identifier\": \"<string>\",\n \"title\": \"<string>\",\n \"qti-test-part\": [\n {\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 }\n ],\n \"qtiVersion\": \"3.0\",\n \"toolName\": \"<string>\",\n \"toolVersion\": \"<string>\",\n \"timeLimit\": 123,\n \"maxAttempts\": 123,\n \"toolsEnabled\": {},\n \"metadata\": {},\n \"qti-outcome-declaration\": [\n {\n \"identifier\": \"<string>\",\n \"cardinality\": \"single\",\n \"normalMaximum\": 123,\n \"normalMinimum\": 123,\n \"defaultValue\": {\n \"value\": \"<unknown>\"\n }\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/{identifier}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"identifier\": \"<string>\",\n \"title\": \"<string>\",\n \"qti-test-part\": [\n {\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 }\n ],\n \"qtiVersion\": \"3.0\",\n \"toolName\": \"<string>\",\n \"toolVersion\": \"<string>\",\n \"timeLimit\": 123,\n \"maxAttempts\": 123,\n \"toolsEnabled\": {},\n \"metadata\": {},\n \"qti-outcome-declaration\": [\n {\n \"identifier\": \"<string>\",\n \"cardinality\": \"single\",\n \"normalMaximum\": 123,\n \"normalMinimum\": 123,\n \"defaultValue\": {\n \"value\": \"<unknown>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qti.alpha-1edtech.ai/api/assessment-tests/{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 \"title\": \"<string>\",\n \"qti-test-part\": [\n {\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 }\n ],\n \"qtiVersion\": \"3.0\",\n \"toolName\": \"<string>\",\n \"toolVersion\": \"<string>\",\n \"timeLimit\": 123,\n \"maxAttempts\": 123,\n \"toolsEnabled\": {},\n \"metadata\": {},\n \"qti-outcome-declaration\": [\n {\n \"identifier\": \"<string>\",\n \"cardinality\": \"single\",\n \"normalMaximum\": 123,\n \"normalMinimum\": 123,\n \"defaultValue\": {\n \"value\": \"<unknown>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"identifier": "<string>",
"title": "<string>",
"qtiVersion": "3.0",
"qti-test-part": [
{
"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": [
{}
]
}
],
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
],
"qti-outcome-declaration": [
{
"identifier": "<string>",
"cardinality": "single",
"baseType": "identifier",
"normalMaximum": 123,
"normalMinimum": 123,
"defaultValue": {
"value": "<unknown>"
}
}
],
"rawXml": "<string>",
"content": {
"qti-assessment-test": {
"_attributes": {
"xmlns": "<string>",
"xmlns:xsi": "<string>",
"xsi:schemaLocation": "<string>",
"identifier": "<string>",
"title": "<string>",
"tool-name": "<string>",
"tool-version": "<string>"
},
"qti-outcome-declaration": [
{
"_attributes": {
"identifier": "<string>",
"cardinality": "<string>",
"base-type": "<string>"
},
"qti-default-value": {
"qti-value": "<unknown>"
},
"normal-maximum": 123,
"normal-minimum": 123
}
],
"qti-test-part": [
{
"_attributes": {
"identifier": "<string>",
"navigation-mode": "<string>",
"submission-mode": "<string>"
},
"qti-assessment-section": [
{
"_attributes": {
"identifier": "<string>",
"title": "<string>",
"visible": "<string>"
},
"qti-assessment-item-ref": [
{
"_attributes": {
"identifier": "<string>",
"href": "<string>"
},
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
]
}
]
}
]
}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isValidXml": true,
"timeLimit": 123,
"maxAttempts": 123,
"toolsEnabled": {},
"metadata": {},
"__v": 123,
"isValidQTI": true,
"warnings": [
"<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
Body
The assessment test to update
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
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.
Response
Assessment test updated successfully
Complete assessment test data including all test parts, sections, items, and configuration settings
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/{identifier} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"identifier": "<string>",
"title": "<string>",
"qti-test-part": [
{
"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": [
{}
]
}
],
"qtiVersion": "3.0",
"toolName": "<string>",
"toolVersion": "<string>",
"timeLimit": 123,
"maxAttempts": 123,
"toolsEnabled": {},
"metadata": {},
"qti-outcome-declaration": [
{
"identifier": "<string>",
"cardinality": "single",
"normalMaximum": 123,
"normalMinimum": 123,
"defaultValue": {
"value": "<unknown>"
}
}
]
}
'import requests
url = "https://qti.alpha-1edtech.ai/api/assessment-tests/{identifier}"
payload = {
"identifier": "<string>",
"title": "<string>",
"qti-test-part": [
{
"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": [{}]
}
],
"qtiVersion": "3.0",
"toolName": "<string>",
"toolVersion": "<string>",
"timeLimit": 123,
"maxAttempts": 123,
"toolsEnabled": {},
"metadata": {},
"qti-outcome-declaration": [
{
"identifier": "<string>",
"cardinality": "single",
"normalMaximum": 123,
"normalMinimum": 123,
"defaultValue": { "value": "<unknown>" }
}
]
}
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>',
title: '<string>',
'qti-test-part': [
{
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': [{}]
}
],
qtiVersion: '3.0',
toolName: '<string>',
toolVersion: '<string>',
timeLimit: 123,
maxAttempts: 123,
toolsEnabled: {},
metadata: {},
'qti-outcome-declaration': [
{
identifier: '<string>',
cardinality: 'single',
normalMaximum: 123,
normalMinimum: 123,
defaultValue: {value: '<unknown>'}
}
]
})
};
fetch('https://qti.alpha-1edtech.ai/api/assessment-tests/{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/{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>',
'title' => '<string>',
'qti-test-part' => [
[
'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' => [
[
]
]
]
],
'qtiVersion' => '3.0',
'toolName' => '<string>',
'toolVersion' => '<string>',
'timeLimit' => 123,
'maxAttempts' => 123,
'toolsEnabled' => [
],
'metadata' => [
],
'qti-outcome-declaration' => [
[
'identifier' => '<string>',
'cardinality' => 'single',
'normalMaximum' => 123,
'normalMinimum' => 123,
'defaultValue' => [
'value' => '<unknown>'
]
]
]
]),
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/{identifier}"
payload := strings.NewReader("{\n \"identifier\": \"<string>\",\n \"title\": \"<string>\",\n \"qti-test-part\": [\n {\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 }\n ],\n \"qtiVersion\": \"3.0\",\n \"toolName\": \"<string>\",\n \"toolVersion\": \"<string>\",\n \"timeLimit\": 123,\n \"maxAttempts\": 123,\n \"toolsEnabled\": {},\n \"metadata\": {},\n \"qti-outcome-declaration\": [\n {\n \"identifier\": \"<string>\",\n \"cardinality\": \"single\",\n \"normalMaximum\": 123,\n \"normalMinimum\": 123,\n \"defaultValue\": {\n \"value\": \"<unknown>\"\n }\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/{identifier}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"identifier\": \"<string>\",\n \"title\": \"<string>\",\n \"qti-test-part\": [\n {\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 }\n ],\n \"qtiVersion\": \"3.0\",\n \"toolName\": \"<string>\",\n \"toolVersion\": \"<string>\",\n \"timeLimit\": 123,\n \"maxAttempts\": 123,\n \"toolsEnabled\": {},\n \"metadata\": {},\n \"qti-outcome-declaration\": [\n {\n \"identifier\": \"<string>\",\n \"cardinality\": \"single\",\n \"normalMaximum\": 123,\n \"normalMinimum\": 123,\n \"defaultValue\": {\n \"value\": \"<unknown>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qti.alpha-1edtech.ai/api/assessment-tests/{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 \"title\": \"<string>\",\n \"qti-test-part\": [\n {\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 }\n ],\n \"qtiVersion\": \"3.0\",\n \"toolName\": \"<string>\",\n \"toolVersion\": \"<string>\",\n \"timeLimit\": 123,\n \"maxAttempts\": 123,\n \"toolsEnabled\": {},\n \"metadata\": {},\n \"qti-outcome-declaration\": [\n {\n \"identifier\": \"<string>\",\n \"cardinality\": \"single\",\n \"normalMaximum\": 123,\n \"normalMinimum\": 123,\n \"defaultValue\": {\n \"value\": \"<unknown>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"identifier": "<string>",
"title": "<string>",
"qtiVersion": "3.0",
"qti-test-part": [
{
"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": [
{}
]
}
],
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
],
"qti-outcome-declaration": [
{
"identifier": "<string>",
"cardinality": "single",
"baseType": "identifier",
"normalMaximum": 123,
"normalMinimum": 123,
"defaultValue": {
"value": "<unknown>"
}
}
],
"rawXml": "<string>",
"content": {
"qti-assessment-test": {
"_attributes": {
"xmlns": "<string>",
"xmlns:xsi": "<string>",
"xsi:schemaLocation": "<string>",
"identifier": "<string>",
"title": "<string>",
"tool-name": "<string>",
"tool-version": "<string>"
},
"qti-outcome-declaration": [
{
"_attributes": {
"identifier": "<string>",
"cardinality": "<string>",
"base-type": "<string>"
},
"qti-default-value": {
"qti-value": "<unknown>"
},
"normal-maximum": 123,
"normal-minimum": 123
}
],
"qti-test-part": [
{
"_attributes": {
"identifier": "<string>",
"navigation-mode": "<string>",
"submission-mode": "<string>"
},
"qti-assessment-section": [
{
"_attributes": {
"identifier": "<string>",
"title": "<string>",
"visible": "<string>"
},
"qti-assessment-item-ref": [
{
"_attributes": {
"identifier": "<string>",
"href": "<string>"
},
"qti-pre-condition": [
{}
],
"qti-branch-rule": [
{}
]
}
]
}
]
}
]
}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isValidXml": true,
"timeLimit": 123,
"maxAttempts": 123,
"toolsEnabled": {},
"metadata": {},
"__v": 123,
"isValidQTI": true,
"warnings": [
"<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>"
}