[Design] Bulk Upload Questions
Introduction
This wiki explains the design and implementation of bulk upload of questions.
Jira issue: SB-23374: Bulk upload questions (MCQ) in prescribed format - Part 1Ready for Release
Problem Statement:
Enable Bulk question creation.
Enable Bulk question creation and link them to sections(Units).
Enable Bulk question creation with common metadata ex: questionType, channel, createdBy, status, licence and BGMS.
Solution 1:
Create a generate QuML API for various interaction types such that it takes required parameters as input and generates a QuML output. The API takes input as a CSV file and JSON body. This API is responsible for validating and creating questions on the platform.
The endpoint for bulk upload of Question is
/question/v1/bulkupload
Mandatory fields cannot be null or empty.
If the server doesn't support the media type, it should return HTTP status code 415 (Unsupported Media Type).
HEADER PARAMETERS:
Content-Type (*required) |
Media types can be:-
|
X-Channel-ID (*required) |
It the Unique Id to identify the root organization to which the user belongs |
REQUEST BODY: multipart/form-data
file (*required) |
This is a .csv file. Each line of the file is a data record, separated by commas |
Here is an example of a POST request that includes multipart/form-data: