Questions
This endpoint manages quiz questions within the assessment system.
Overview
The Questions API allows you to create, update, and manage individual questions that make up quizzes. Questions are the building blocks of assessments and can be configured with various formats, difficulty levels, and scoring mechanisms.
Question Types
The system supports multiple question formats to accommodate different assessment needs:
- Multiple Choice: Questions with predefined answer options
- Free Text: Questions requiring written responses
- True/False: Binary choice questions
- Matching: Questions requiring matching items from two lists
- Ranking: Questions requiring ordering of items
Key Features
- Create and manage questions with rich formatting
- Associate questions with specific quizzes
- Configure scoring and difficulty parameters
- Include multimedia instructions (images, markdown text)
- Set time limits for individual questions
File Attachments
Questions can include instruction files in markdown format to provide additional context, examples, or detailed instructions for talents.
Endpoints
get /api/v3/quiz/questions post /api/v3/quiz/questions delete /api/v3/quiz/questions/:resource_id get /api/v3/quiz/questions/:resource_id patch /api/v3/quiz/questions/:resource_id
get/api/v3/quiz/questions
Return a paginated list of quiz/questions
Input Schema
object
object
object
The key is the resource type and the value is an array of fields.
dictionary
Typescript
type InputSchema = {
page?: {
// The page number, default to 1
number?: number;
// The number of items per page, default to 1000
size?: number;
};
// The sort order, comma separated list of fields. See sorting section for more details
sort?: string;
// Set to true to return the total number of items in the collection
count?: boolean;
filter?: {
id?: any;
instruction_md?: any;
question_type?: any;
question_args?: any;
quiz_id?: any;
question_safe_args?: any;
question_score?: any;
order?: any;
};
// The fields to include in the response.
// The key is the resource type and the value is an array of fields.
fields?: { [key: string]: Array<any> };
};
Output Schema
object
array
object
object
array
Typescript
type OutputSchema = {
data: Array<{
type: string;
id?: string;
attributes?: {
id?: number;
instruction_md?: string;
question_type?: string;
question_args?: Record<string, any>;
question_safe_args?: Record<string, any>;
question_score?: Record<string, any>;
order?: number;
};
relationships?: Record<string, any>;
}>;
included?: Array<Record<string, any>>;
};
post/api/v3/quiz/questions
Create a new quiz/questions
Input Schema
object
object
object
object
object
object
Typescript
type InputSchema = {
data: {
type: string;
attributes: {
id?: number;
instruction_md?: string;
question_type?: string;
question_args?: Record<string, any>;
question_safe_args?: Record<string, any>;
question_score?: Record<string, any>;
order?: number;
};
relationships?: { quiz: { data: { type: string; id?: string } } };
};
};
delete/api/v3/quiz/questions/:resource_id
Delete the quiz/questions
Input Schema
object
Typescript
type InputSchema = { resource_id: number };
get/api/v3/quiz/questions/:resource_id
Show a specific quiz/questions
Input Schema
object
array
dictionary
Typescript
type InputSchema = {
resource_id: number;
included?: Array<string>;
fields?: { [key: string]: Array<any> };
};
Output Schema
object
object
object
array
Typescript
type OutputSchema = {
data: {
type: string;
id?: string;
attributes?: {
id?: number;
instruction_md?: string;
question_type?: string;
question_args?: Record<string, any>;
question_safe_args?: Record<string, any>;
question_score?: Record<string, any>;
order?: number;
};
relationships?: Record<string, any>;
};
included?: Array<Record<string, any>>;
};
patch/api/v3/quiz/questions/:resource_id
Update a quiz/questions
Input Schema
object
object
object
Typescript
type InputSchema = {
resource_id: number;
data: {
type: string;
attributes: {
id?: number;
instruction_md?: string;
question_type?: string;
question_args?: Record<string, any>;
question_safe_args?: Record<string, any>;
question_score?: Record<string, any>;
order?: number;
};
};
};