[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:

  1. Enable Bulk question creation.

  2. Enable Bulk question creation and link them to sections(Units).

  3. 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)

string

Media types can be:-

  • Application/json

  • Multipart/form-data

X-Channel-ID (*required)

string

It the Unique Id to identify the root organization to which the user belongs

REQUEST BODY: multipart/form-data

Here is an example of a POST request that includes multipart/form-data: