Step 1 – Provision a question bank and assign contributors
To provision a question bank a POST request must be made to:
POST /api/v2/question_banks
The attributes for provisioning question banks are listed in the schema section of the question bank documentation
The creator of the question bank is automatically set as a publisher for the created question bank. Additional information about roles within a question bank can be found here.
External_id
The external_id can be used to add a reference to a unique id of a question bank in your own organization. You can use the external_id alongside the Search API to find a question bank in Ans based on the provided external_id.
Step 2 – Import exercises
To import QTI exercises in a question bank a GET request must be made to:
GET /api/v2/question_banks/{question_bank_id}/question_bank_exercises/import
The response from this request will contain an attribute “put_url” and an attribute “background_job_id”.
The put_url attribute contains a URL to our object store where the QTI file needs to be uploaded. This URL is valid for one hour.
The attribute “background_job_id” is the identifier for the created background job that will be required to update the background job status once the QTI zip file has been uploaded successfully.
Uploading the QTI file
A PUT request must be made to the URL value of the “put_url” attribute and the body of the request must contain the QTI zip file.
Updating the background job
Once the QTI zip file has been uploaded successfully, a PATCH request must be made to:
PATCH /api/v2/background_jobs/{background_job_id}
The attribute “status” must then be updated from “initialized” to “pending”, which will start the process of importing the exercises. The status for this process can be found in the user settings under background jobs.
Step 3 – Add domains and objectives
To provision a domain within a question bank a POST request must be made to:
POST /api/v2/question_banks/{question_bank_id}/domains
Creating a domain is the prerequisite for creating objectives within question banks.
To provision an objective within a question bank domain a POST request must be made to:
POST /api/v2/domains/{domain_id}/objectives
Additional information about domains and objectives can be found here.
Comments
0 comments
Please sign in to leave a comment.