curl --request POST \
--url https://qti.alpha-1edtech.ai/api/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schema": "item",
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<qti-assessment-item\n xmlns=\"http://www.imsglobal.org/xsd/imsqtiasi_v3p0\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:schemaLocation=\"http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd\"\n identifier=\"xml-choice-item-1\"\n title=\"Sample Choice Question\"\n adaptive=\"false\"\n time-dependent=\"false\">\n\n <qti-response-declaration identifier=\"RESPONSE\" cardinality=\"single\" base-type=\"identifier\">\n <qti-correct-response>\n <qti-value>B</qti-value>\n </qti-correct-response>\n </qti-response-declaration>\n\n <qti-outcome-declaration identifier=\"FEEDBACK\" cardinality=\"single\" base-type=\"identifier\"/>\n <qti-outcome-declaration identifier=\"FEEDBACK-INLINE\" cardinality=\"single\" base-type=\"identifier\"/>\n\n <qti-assessment-stimulus-ref identifier=\"Stimulus1\" href=\"stimuli/Stimulus1\" title=\"Math Context\"/>\n <qti-assessment-stimulus-ref identifier=\"Stimulus2\" href=\"stimuli/Stimulus2\" title=\"Additional Context\"/>\n\n <qti-item-body>\n <qti-choice-interaction response-identifier=\"RESPONSE\" shuffle=\"false\" max-choices=\"1\">\n <qti-prompt>What is 2 + 2?</qti-prompt>\n <qti-simple-choice identifier=\"A\">\n 3\n <qti-feedback-inline outcome-identifier=\"FEEDBACK-INLINE\" identifier=\"A\" show-hide=\"show\">\n <span style=\"color: #D9534F;\">Incorrect: Try counting again.</span>\n </qti-feedback-inline>\n </qti-simple-choice>\n <qti-simple-choice identifier=\"B\">\n 4\n <qti-feedback-inline outcome-identifier=\"FEEDBACK-INLINE\" identifier=\"B\" show-hide=\"show\">\n <span style=\"color: #2E8B57;\">Correct: Well done!</span>\n </qti-feedback-inline>\n </qti-simple-choice>\n </qti-choice-interaction>\n </qti-item-body>\n\n <qti-response-processing template=\"match_correct\">\n <qti-response-condition>\n <qti-response-if>\n <qti-match>\n <qti-variable identifier=\"RESPONSE\"/>\n <qti-correct identifier=\"RESPONSE\"/>\n </qti-match>\n <qti-set-outcome-value identifier=\"FEEDBACK\">\n <qti-base-value base-type=\"identifier\">CORRECT</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"FEEDBACK\">\n <qti-base-value base-type=\"identifier\">INCORRECT</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-else>\n </qti-response-condition>\n </qti-response-processing>\n\n <qti-modal-feedback outcome-identifier=\"FEEDBACK\" identifier=\"CORRECT\" show-hide=\"show\">\n <qti-content-body>\n <p><strong>Correct!</strong> Well done.</p>\n </qti-content-body>\n </qti-modal-feedback>\n\n <qti-modal-feedback outcome-identifier=\"FEEDBACK\" identifier=\"INCORRECT\" show-hide=\"show\">\n <qti-content-body>\n <p><strong>Incorrect.</strong> Please review and try again.</p>\n </qti-content-body>\n </qti-modal-feedback>\n</qti-assessment-item>"
}
'{
"success": true,
"entityId": "<string>",
"message": "<string>",
"xmlContent": "<string>",
"validationErrors": [
"<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>"
}Validate a XML string
Validate a QTI XML file against the QTI 3.0 xsd specification.
curl --request POST \
--url https://qti.alpha-1edtech.ai/api/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schema": "item",
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<qti-assessment-item\n xmlns=\"http://www.imsglobal.org/xsd/imsqtiasi_v3p0\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:schemaLocation=\"http://www.imsglobal.org/xsd/imsqtiasi_v3p0 https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd\"\n identifier=\"xml-choice-item-1\"\n title=\"Sample Choice Question\"\n adaptive=\"false\"\n time-dependent=\"false\">\n\n <qti-response-declaration identifier=\"RESPONSE\" cardinality=\"single\" base-type=\"identifier\">\n <qti-correct-response>\n <qti-value>B</qti-value>\n </qti-correct-response>\n </qti-response-declaration>\n\n <qti-outcome-declaration identifier=\"FEEDBACK\" cardinality=\"single\" base-type=\"identifier\"/>\n <qti-outcome-declaration identifier=\"FEEDBACK-INLINE\" cardinality=\"single\" base-type=\"identifier\"/>\n\n <qti-assessment-stimulus-ref identifier=\"Stimulus1\" href=\"stimuli/Stimulus1\" title=\"Math Context\"/>\n <qti-assessment-stimulus-ref identifier=\"Stimulus2\" href=\"stimuli/Stimulus2\" title=\"Additional Context\"/>\n\n <qti-item-body>\n <qti-choice-interaction response-identifier=\"RESPONSE\" shuffle=\"false\" max-choices=\"1\">\n <qti-prompt>What is 2 + 2?</qti-prompt>\n <qti-simple-choice identifier=\"A\">\n 3\n <qti-feedback-inline outcome-identifier=\"FEEDBACK-INLINE\" identifier=\"A\" show-hide=\"show\">\n <span style=\"color: #D9534F;\">Incorrect: Try counting again.</span>\n </qti-feedback-inline>\n </qti-simple-choice>\n <qti-simple-choice identifier=\"B\">\n 4\n <qti-feedback-inline outcome-identifier=\"FEEDBACK-INLINE\" identifier=\"B\" show-hide=\"show\">\n <span style=\"color: #2E8B57;\">Correct: Well done!</span>\n </qti-feedback-inline>\n </qti-simple-choice>\n </qti-choice-interaction>\n </qti-item-body>\n\n <qti-response-processing template=\"match_correct\">\n <qti-response-condition>\n <qti-response-if>\n <qti-match>\n <qti-variable identifier=\"RESPONSE\"/>\n <qti-correct identifier=\"RESPONSE\"/>\n </qti-match>\n <qti-set-outcome-value identifier=\"FEEDBACK\">\n <qti-base-value base-type=\"identifier\">CORRECT</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"FEEDBACK\">\n <qti-base-value base-type=\"identifier\">INCORRECT</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-else>\n </qti-response-condition>\n </qti-response-processing>\n\n <qti-modal-feedback outcome-identifier=\"FEEDBACK\" identifier=\"CORRECT\" show-hide=\"show\">\n <qti-content-body>\n <p><strong>Correct!</strong> Well done.</p>\n </qti-content-body>\n </qti-modal-feedback>\n\n <qti-modal-feedback outcome-identifier=\"FEEDBACK\" identifier=\"INCORRECT\" show-hide=\"show\">\n <qti-content-body>\n <p><strong>Incorrect.</strong> Please review and try again.</p>\n </qti-content-body>\n </qti-modal-feedback>\n</qti-assessment-item>"
}
'{
"success": true,
"entityId": "<string>",
"message": "<string>",
"xmlContent": "<string>",
"validationErrors": [
"<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
The access token received from the authorization server in the OAuth 2.0 flow.
Body
The XML string to validate along with its schema type
Validate one QTI XML document, sent inline as xml or named by entityId (which wins when both are sent), against the QTI 3.0.1 schema for schema.
Response
Successfully validated XML
Whether the document is valid.
The entity ID of the XML string that was validated. If no entityId is provided, a random identifier will be generated.
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.
The XML string that was validated. If no xml is provided, the xml string will be the rawXml string that exists in the database.
An array of validation errors that occurred during the validation process. If no validation errors occurred, this will be an empty array.