GETMARKED Quiz Export API

Overview
GETMARKED Quiz Export API allows you to create a QTI zip file, Moodle XML or CSV file using GETMARKED JSON Quiz format. GETMARKED JSON Quiz format is our own open standard to simplify the way quiz questions and its data are represented.

Edutech companies and startups use our QTI API to generate QTI zip files so that they do not need to learn the highly complex standard. This is currently a private endpoint, please contact sales@getmarked.ai if you would like to use it.
Creating API Keys
All requests to GETMARKED Digitaliser’s REST API need to be authenticated. We support authentication via API Keys. You can create and revoke them in the Developer Dashboard.

  1. Create your API Keys at the API Keys page. Please keep the keys secret. For security reasons, we cannot show it to you again if you lose it.

  2. You may issue separate API Keys to different developers or to different subsystems within your application. For security reasons, you should delete the keys that are not in use to prevent unauthorized access!
Setting the API Key in the request header
To authorise your HTTP request, set the API Key in the AUTHORIZATION header of the HTTP request.

  1. Using Postman
  2. Under Headers, you should fill in the following information:
    KEY VALUE
    AUTHORIZATION
    Api-Key YOUR-SECRET-API-KEY
  3. Using Python
  4. 
    import requests
    
    API_URL = "Some API-ENDPOINT"
    headers = {"AUTHORIZATION": "Api-Key YOUR-SECRET-API-KEY"}
    response = requests.get(API_URL, headers=headers)
    print(response.json())
    
    
Exporting to a QTI zip file
Make a HTTP POST to https://digitaliser.getmarked.ai/api/v1.0/json_conversion/ to create the question bank file. The JSON data should be set in the request body of the HTTP POST with the Content-Type header being application/json.

Here's the structure of the JSON:

{
    "target": "qti2p1",
    "document": {
        "filename": "sample_document_name",
        "questions": [...]
    }
}

The target attribute take any of the following string values canvas, blackboard, brightspace, schoology, moodle, itslearning, sakai, neo, qti2p1, qti1p2.
The filename attribute will be the filename of the returned question bank file.
The questions attribute would be a list of question in the GETMARKED JSON Quiz format.

Below is a sample of the full JSON to create a QTI 2.1 zip file.


{
    "target": "qti2p1",
    "document": {
        "filename": "sample_document_name",
        "questions": [
          {
           "category": "MCQ",
           "title": "Q001 What is the value of x in x=3y+ab",
           "prompt": "<div> <div> What is the value of x in <math><mi>x</mi><mo>=</mo><mn>3</mn><mi>y</mi><mo>+</mo><mfrac><mrow><mi>a</mi></mrow><mrow><mi>b</mi></mrow></mfrac></math></div> </div>",
           "answers": [
            []
           ],
           "choices": {
            "a": "<div> 0 </div>",
            "c": "<div> 2 </div>",
            "b": "<div> 1 </div>",
            "d": "<div> 4 </div>"
           }
          },
          {
           "category": "MCQ",
           "prompt": "<div><div>How to break an egg?</div><div>Imagine you have an ostrich egg, and you want to make omlette with it. How will you go about? ok</div></div>",
           "title": "Q002 How to break an egg?",
           "interactions": {},
           "answers": [],
           "choices": {
            "a": "<div> Smash it </div>",
            "c": "<div> Slash it </div>",
            "b": "<div> Thrash it </div>",
            "d": "<div> Break it </div>"
           }
          },
          {
           "category": "CLOZE",
           "title": "Q003 Once upon a %%%U0rtbnB8%%% there used to live a man named %%",
           "prompt": "<div><div>Once upon a %%%0_INTERACTION_TEXT_ENTRY%%% there used to live a man named %%%1_INTERACTION_TEXT_ENTRY%%% in Agraba.\u00a0 %%%2_INTERACTION_INLINE_CHOICE%%% \u00a0</div></div>",
           "answers": [
            [
             "time"
            ],
            [
             "Abu",
             "Aladin",
             "Jaffar"
            ],
            []
           ],
           "interactions": {
            "%%%0_INTERACTION_TEXT_ENTRY%%%": {
             "category": "text-entry"
            },
            "%%%2_INTERACTION_INLINE_CHOICE%%%": {
             "category": "inline-choice",
             "choices": {"a": "he", "b": "she"}
            },
            "%%%1_INTERACTION_TEXT_ENTRY%%%": {
             "category": "text-entry"
            }
           }
          }
         ]
    }
}

Structure of the HTTP Responses
The response body from the HTTP POST request would look like the following.

{
    "status": "success",
    "message": "JSON successfully converted to target",
    "data": {
        "url": "https://URL-TO-DOWNLOAD-THE-QUESTION-BANK-FILE.zip",
        }
}

Need some help?
Whether you have problems with the web application or with code interfacing with our endpoints, please do not hesitate to reach out and contact us.