I use R and Python to make many versions of similar questions, especially for STEM-oriented courses. Essentially, in a quiz, each question is a question group that pulls from a specific testbank carefully crafted with hundreds of versions of a question ("formula quiz" functionality is limited in a number of ways, so I do the versioning myself outside of Canvas--plus, as far as I can tell, Canvas doesn't support the "cloze" format, only QTI).
I have no problem importing the many testbanks (again, one per question) in QTI format, but I have to do that work manually (which adds up for midterms and finals...sigh). I'm comfortable with the API and I mostly use UCF's (thank you!) Python package. However, I don't see any REST API (or more recently, GraphQL) functionality on the Canvas API documentation page for the "import" process in Canvas.
1) Can I just upload a testbank as a regular file (uploading files can indeed be automated via the API), make sure it's private, and then, somehow, tag it as a testbank to be used for quizzes only?
2) Am I missing an API call for the import functionality in Canvas?
I have been told there is not one. Additionally, this thread, though a little old, says the same thing.
HOWEVER, Respondus is somehow able to create test banks through their desktop tool, so there must be some work around. Hopefully someone else is able to provide more information.
I'm posting in hopes of being helpful to anyone who stumbles on this thread. There seems to be some confusion regarding quiz QTI import via the API. It is not only possible, but works pretty well. I don't use the question banks (posting a new quiz via the API is MUCH faster in my workflow) so I don't know how they are structured. However, if it is in a QTI format, there is no reason it cannot be done. I can import multiple QTI-structured quizzes packaged into a single zipped file via the API within a few seconds.
The process is not obvious, but the API is documented:
To employ the API, you must first understand how to upload a file to canvas. After that, importing a QTI is trivial.
Unfortunately, giving someone step by step instructions on how to accomplish this isn't practical at this point. However, if someone is interested, I'm happy to facilitate.
Thank you so much!
Canvas does not have any published API method for creating question banks. The workaround I'm looking at is importing QTI files. That way it is possible to create the question banks.
Your answer provides the path I need.
Hello @wayne_smith thanks for your post and sorry its taken some time to respond to this with an accepted solution, although @jhveem is completely right. There is not an API currently for importing of QTI files and the respective formatting of those QTI files.
I answered a similar question in this thread: Dates not honored when QTI package imported via Canvas API
Right now this does seem like a limitation as we do not have documentation regarding this. I would suggest to create a feature idea request in order to get better documentation regarding QTI file formatting as well as further documentation to be able to import quiz questions in QTI files via API. https://community.canvaslms.com/t5/Idea-Conversations/idb-p/ideas/status-key/complete