2025-04-30 14:57:01 +00:00
|
|
|
|
openapi: 3.0.3
|
|
|
|
|
info:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
title: Quiz Service API
|
|
|
|
|
description: API for managing quizzes, questions, answers and statistics
|
2025-04-30 14:57:01 +00:00
|
|
|
|
version: 2.0.0
|
|
|
|
|
paths:
|
|
|
|
|
/account/get:
|
|
|
|
|
get:
|
|
|
|
|
tags: [Account]
|
|
|
|
|
summary: Get the current account details
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Successfully retrieved account details
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/Account'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'404':
|
|
|
|
|
$ref: '#/components/responses/NotFoundError'
|
|
|
|
|
'500':
|
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
|
|
|
|
|
|
|
|
|
/account/create:
|
|
|
|
|
post:
|
|
|
|
|
tags: [Account]
|
|
|
|
|
summary: Create a new account
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Account created successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/Account'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'409':
|
|
|
|
|
$ref: '#/components/responses/ConflictError'
|
|
|
|
|
'500':
|
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
|
|
|
|
|
|
|
|
|
/account/delete:
|
|
|
|
|
delete:
|
|
|
|
|
tags: [Account]
|
|
|
|
|
summary: Delete the current account
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Account deleted successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
accountId:
|
|
|
|
|
type: string
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'500':
|
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
|
|
|
|
|
|
|
|
|
/accounts:
|
|
|
|
|
get:
|
|
|
|
|
tags: [Account]
|
|
|
|
|
summary: Retrieve a list of accounts
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
2025-05-12 16:20:40 +00:00
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
limit:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
page:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Successfully retrieved list of accounts
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
count:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
items:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
$ref: '#/components/schemas/Account'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'500':
|
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
|
|
|
|
|
|
|
|
|
/privilege/{userId}:
|
|
|
|
|
get:
|
|
|
|
|
tags: [Account]
|
|
|
|
|
summary: Get privileges by user ID
|
2025-05-12 16:20:40 +00:00
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
2025-04-30 14:57:01 +00:00
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Successfully retrieved privileges for the user
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
$ref: '#/components/schemas/ShortPrivilege'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'500':
|
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
|
|
|
|
|
|
|
|
|
/account/{userId}:
|
|
|
|
|
delete:
|
|
|
|
|
tags: [Account]
|
|
|
|
|
summary: Delete account by user ID
|
2025-05-12 16:20:40 +00:00
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
2025-04-30 14:57:01 +00:00
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Successfully deleted the account
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
userId:
|
|
|
|
|
type: string
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'500':
|
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
|
|
|
|
|
|
|
|
|
/account/manualdone:
|
|
|
|
|
post:
|
|
|
|
|
tags: [Account]
|
|
|
|
|
summary: Manually mark an account as done
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- id
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: string
|
|
|
|
|
description: User ID to mark as done
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Account marked as done
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'404':
|
|
|
|
|
$ref: '#/components/responses/NotFoundError'
|
|
|
|
|
'500':
|
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
|
|
|
|
|
|
|
|
|
/account/leadtarget:
|
|
|
|
|
post:
|
|
|
|
|
tags: [Account]
|
|
|
|
|
summary: Add a lead target for sending client requests
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- type
|
|
|
|
|
- quizID
|
|
|
|
|
- target
|
|
|
|
|
properties:
|
|
|
|
|
type:
|
|
|
|
|
type: string
|
|
|
|
|
description: Type of target (mail, telegram, whatsapp)
|
|
|
|
|
enum:
|
|
|
|
|
- mail
|
|
|
|
|
- telegram
|
|
|
|
|
- whatsapp
|
|
|
|
|
quizID:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int32
|
|
|
|
|
description: The associated quiz ID (0 for general rules)
|
|
|
|
|
target:
|
|
|
|
|
type: string
|
|
|
|
|
description: The target address (email, channel ID, phone number)
|
|
|
|
|
name:
|
|
|
|
|
type: string
|
|
|
|
|
description: Name (e.g., for Telegram channel)
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Lead target added successfully
|
|
|
|
|
'208':
|
|
|
|
|
$ref: '#/components/responses/AlreadyReportedError'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'404':
|
|
|
|
|
$ref: '#/components/responses/NotFoundError'
|
|
|
|
|
'500':
|
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
|
|
|
|
|
|
|
|
|
put:
|
|
|
|
|
tags: [Account]
|
|
|
|
|
summary: Update a lead target
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- id
|
|
|
|
|
- target
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int64
|
|
|
|
|
description: Lead target ID (primary key)
|
|
|
|
|
target:
|
|
|
|
|
type: string
|
|
|
|
|
description: The target address (email, channel ID, phone number)
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Lead target updated successfully
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'404':
|
|
|
|
|
$ref: '#/components/responses/NotFoundError'
|
|
|
|
|
'500':
|
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
|
|
|
|
|
|
|
|
|
/account/leadtarget/{id}:
|
|
|
|
|
delete:
|
|
|
|
|
tags: [Account]
|
|
|
|
|
summary: Delete a lead target by its ID
|
|
|
|
|
parameters:
|
|
|
|
|
- name: id
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
description: The ID of the lead target to delete
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Lead target deleted successfully
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'500':
|
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
|
|
|
|
|
|
|
|
|
/account/leadtarget/{quizID}:
|
|
|
|
|
get:
|
|
|
|
|
tags: [Account]
|
|
|
|
|
summary: Get lead target by quiz ID
|
|
|
|
|
parameters:
|
|
|
|
|
- name: quizID
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
description: The quiz ID associated with the lead target
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Successfully retrieved lead target by quiz ID
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/LeadTarget'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'404':
|
|
|
|
|
$ref: '#/components/responses/NotFoundError'
|
|
|
|
|
'500':
|
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
|
|
|
|
|
|
|
|
|
/question/create:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Question]
|
|
|
|
|
summary: Create a new question
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/QuestionCreateRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Question created successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/Question'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'406':
|
|
|
|
|
$ref: '#/components/responses/StatusNotAcceptableError'
|
2025-05-11 20:06:16 +00:00
|
|
|
|
'422':
|
|
|
|
|
description: Validation error
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'424':
|
|
|
|
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
2025-05-12 17:46:23 +00:00
|
|
|
|
/question/getList:
|
2025-04-30 14:57:01 +00:00
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Question]
|
|
|
|
|
summary: Get a paginated list of questions
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/GetQuestionListRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Successfully retrieved question list
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/GetQuestionListResponse'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'406':
|
|
|
|
|
$ref: '#/components/responses/StatusNotAcceptableError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
2025-05-12 16:20:40 +00:00
|
|
|
|
/question/edit:
|
|
|
|
|
patch:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Question]
|
|
|
|
|
summary: Update an existing question
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/UpdateQuestionRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Question updated successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/UpdateQuestionResponse'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'406':
|
|
|
|
|
$ref: '#/components/responses/StatusNotAcceptableError'
|
2025-05-11 20:06:16 +00:00
|
|
|
|
'422':
|
|
|
|
|
description: Validation error
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'424':
|
|
|
|
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/question/copy:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Question]
|
|
|
|
|
summary: Create a copy of an existing question
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/CopyQuestionRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Question copied successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/Question'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'424':
|
|
|
|
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/question/history:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Question]
|
2025-04-30 14:57:01 +00:00
|
|
|
|
summary: Get question history
|
2025-05-11 20:06:16 +00:00
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/GetQuestionHistoryRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Successfully retrieved question history
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
items:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
$ref: '#/components/schemas/Question'
|
2025-05-11 20:06:16 +00:00
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'424':
|
|
|
|
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/question/delete:
|
2025-05-13 14:24:01 +00:00
|
|
|
|
delete:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Question]
|
2025-04-30 14:57:01 +00:00
|
|
|
|
summary: Delete a question
|
2025-05-11 20:06:16 +00:00
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
$ref: '#/components/schemas/DeactivateQuestionRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-13 14:24:01 +00:00
|
|
|
|
description: Question deleted successfully
|
2025-05-11 20:06:16 +00:00
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
$ref: '#/components/schemas/DeactivateQuestionResponse'
|
2025-05-11 20:06:16 +00:00
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'424':
|
|
|
|
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/quiz/create:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Quiz]
|
|
|
|
|
summary: Create a new quiz
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/CreateQuizRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
'201':
|
|
|
|
|
description: Quiz created successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/Quiz'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'406':
|
|
|
|
|
$ref: '#/components/responses/StatusNotAcceptableError'
|
|
|
|
|
'409':
|
|
|
|
|
$ref: '#/components/responses/StatusConflictError'
|
2025-05-11 20:06:16 +00:00
|
|
|
|
'422':
|
|
|
|
|
description: Validation error
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
2025-05-12 16:20:40 +00:00
|
|
|
|
/quiz/getList:
|
2025-04-30 14:57:01 +00:00
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Quiz]
|
|
|
|
|
summary: Get a paginated list of quizzes
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/GetQuizListRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Successfully retrieved quiz list
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/GetQuizListResponse'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'406':
|
|
|
|
|
$ref: '#/components/responses/StatusNotAcceptableError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
2025-05-12 16:20:40 +00:00
|
|
|
|
/quiz/edit:
|
|
|
|
|
patch:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Quiz]
|
|
|
|
|
summary: Update an existing quiz
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/UpdateQuizRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Quiz updated successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/UpdateQuizResponse'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'406':
|
|
|
|
|
$ref: '#/components/responses/StatusNotAcceptableError'
|
|
|
|
|
'409':
|
|
|
|
|
$ref: '#/components/responses/StatusConflictError'
|
2025-05-11 20:06:16 +00:00
|
|
|
|
'422':
|
|
|
|
|
description: Validation error
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
message:
|
|
|
|
|
type: string
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'424':
|
|
|
|
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/quiz/copy:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Quiz]
|
|
|
|
|
summary: Create a copy of an existing quiz
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/CopyQuizRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Quiz copied successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/Quiz'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'424':
|
|
|
|
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/quiz/history:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Quiz]
|
2025-04-30 14:57:01 +00:00
|
|
|
|
summary: Get quiz history
|
2025-05-11 20:06:16 +00:00
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/GetQuizHistoryRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Successfully retrieved quiz history
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
items:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
$ref: '#/components/schemas/Quiz'
|
2025-05-11 20:06:16 +00:00
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'424':
|
|
|
|
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/quiz/delete:
|
2025-05-12 16:20:40 +00:00
|
|
|
|
delete:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Quiz]
|
2025-04-30 14:57:01 +00:00
|
|
|
|
summary: Delete a quiz
|
2025-05-11 20:06:16 +00:00
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/DeleteQuizRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Quiz deleted successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/DeleteQuizResponse'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'424':
|
|
|
|
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/quiz/archive:
|
2025-05-12 16:20:40 +00:00
|
|
|
|
patch:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Quiz]
|
2025-04-30 14:57:01 +00:00
|
|
|
|
summary: Archive a quiz
|
2025-05-11 20:06:16 +00:00
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
$ref: '#/components/schemas/DeleteQuizRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Quiz archived successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
$ref: '#/components/schemas/DeleteQuizResponse'
|
2025-05-11 20:06:16 +00:00
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-05-12 16:20:40 +00:00
|
|
|
|
'424':
|
|
|
|
|
$ref: '#/components/responses/StatusFailedDependencyError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/quiz/move:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Quiz]
|
|
|
|
|
summary: Move a quiz to another account
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/QuizMoveRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Quiz moved successfully
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
2025-05-12 16:20:40 +00:00
|
|
|
|
/quiz/template:
|
2025-04-30 14:57:01 +00:00
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Quiz]
|
|
|
|
|
summary: Create a copy of a quiz template
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Template copied successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
2025-05-12 16:20:40 +00:00
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int64
|
2025-05-11 20:06:16 +00:00
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/results/getResults/{quizId}:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Result]
|
|
|
|
|
summary: Get results for a specific quiz
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
2025-04-30 14:57:01 +00:00
|
|
|
|
parameters:
|
|
|
|
|
- name: quizId
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/GetResultsRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Successfully retrieved quiz results
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/GetResultsResponse'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'500':
|
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
2025-05-11 20:06:16 +00:00
|
|
|
|
/results/{resultId}:
|
2025-04-30 14:57:01 +00:00
|
|
|
|
delete:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Result]
|
|
|
|
|
summary: Delete a specific result
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
2025-04-30 14:57:01 +00:00
|
|
|
|
parameters:
|
|
|
|
|
- name: resultId
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Result deleted successfully
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
2025-05-12 16:20:40 +00:00
|
|
|
|
/result/seen:
|
|
|
|
|
patch:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Result]
|
|
|
|
|
summary: Update status of multiple results
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/UpdateResultsStatusRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Results status updated successfully
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'406':
|
|
|
|
|
description: Could not update some answers due to insufficient rights
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
2025-05-12 16:20:40 +00:00
|
|
|
|
/results/{quizID}/export:
|
2025-04-30 14:57:01 +00:00
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Result]
|
|
|
|
|
summary: Export quiz results to Excel
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
2025-04-30 14:57:01 +00:00
|
|
|
|
parameters:
|
|
|
|
|
- name: quizID
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/GetResultsRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Successfully exported results
|
|
|
|
|
content:
|
|
|
|
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
format: binary
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'402':
|
|
|
|
|
description: Payment required
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
2025-05-12 16:20:40 +00:00
|
|
|
|
/result/{resultID}:
|
2025-04-30 14:57:01 +00:00
|
|
|
|
get:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Result]
|
|
|
|
|
summary: Get answers for a specific result
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
2025-04-30 14:57:01 +00:00
|
|
|
|
parameters:
|
|
|
|
|
- name: resultID
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Successfully retrieved result answers
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
$ref: '#/components/schemas/Answer'
|
2025-05-11 20:06:16 +00:00
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'401':
|
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
|
'402':
|
|
|
|
|
description: Payment required
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/statistic/{quizID}/devices:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Statistic]
|
2025-04-30 14:57:01 +00:00
|
|
|
|
summary: Get device statistics for quiz
|
2025-05-11 20:06:16 +00:00
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
2025-04-30 14:57:01 +00:00
|
|
|
|
parameters:
|
|
|
|
|
- name: quizID
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/DeviceStatRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Successfully retrieved device statistics
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
devices:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
$ref: '#/components/schemas/DeviceStat'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/statistic/{quizID}/general:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Statistic]
|
2025-04-30 14:57:01 +00:00
|
|
|
|
summary: Get general statistics for quiz
|
2025-05-11 20:06:16 +00:00
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
2025-04-30 14:57:01 +00:00
|
|
|
|
parameters:
|
|
|
|
|
- name: quizID
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/DeviceStatRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Successfully retrieved general statistics
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/GeneralStatsResponse'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/statistic/{quizID}/questions:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Statistic]
|
2025-04-30 14:57:01 +00:00
|
|
|
|
summary: Get question statistics for quiz
|
2025-05-11 20:06:16 +00:00
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
2025-04-30 14:57:01 +00:00
|
|
|
|
parameters:
|
|
|
|
|
- name: quizID
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/DeviceStatRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Successfully retrieved question statistics
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
$ref: '#/components/schemas/QuestionStat'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/statistic:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Statistic]
|
2025-04-30 14:57:01 +00:00
|
|
|
|
summary: Get global service statistics
|
2025-05-11 20:06:16 +00:00
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
$ref: '#/components/schemas/DeviceStatRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Successfully retrieved service statistics
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/ServiceStatistics'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/statistics/{quizID}/pipelines:
|
|
|
|
|
get:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Statistic]
|
2025-04-30 14:57:01 +00:00
|
|
|
|
summary: Get pipeline statistics for quiz
|
2025-05-11 20:06:16 +00:00
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
2025-04-30 14:57:01 +00:00
|
|
|
|
parameters:
|
|
|
|
|
- name: quizID
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
2025-05-12 16:20:40 +00:00
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/DeviceStatRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Successfully retrieved pipeline statistics
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
$ref: '#/components/schemas/PipelineStat'
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/telegram/pool:
|
|
|
|
|
get:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Telegram]
|
|
|
|
|
summary: Get all non-deleted Telegram accounts (active, inactive, and banned)
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Successfully retrieved Telegram accounts
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
$ref: '#/components/schemas/TelegramAccount'
|
|
|
|
|
'404':
|
|
|
|
|
$ref: '#/components/responses/NotFoundError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/telegram/create:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Telegram]
|
|
|
|
|
summary: Authorize server in Telegram account
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/TelegramAuthRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Authorization started successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
signature:
|
|
|
|
|
type: string
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'409':
|
|
|
|
|
description: Account already exists and is active
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/telegram/{id}:
|
|
|
|
|
delete:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Telegram]
|
|
|
|
|
summary: Soft delete Telegram account by ID
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
2025-04-30 14:57:01 +00:00
|
|
|
|
parameters:
|
|
|
|
|
- name: id
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Account deleted successfully
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
/telegram/setCode:
|
|
|
|
|
post:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
tags: [Telegram]
|
|
|
|
|
summary: Send authorization code received from Telegram
|
|
|
|
|
security:
|
|
|
|
|
- bearerAuth: []
|
|
|
|
|
requestBody:
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/TelegramCodeRequest'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
responses:
|
|
|
|
|
'200':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Code sent successfully
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int64
|
|
|
|
|
'400':
|
|
|
|
|
$ref: '#/components/responses/BadRequestError'
|
|
|
|
|
'403':
|
|
|
|
|
description: Authorization failed
|
2025-04-30 14:57:01 +00:00
|
|
|
|
'500':
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/responses/InternalServerError'
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
components:
|
|
|
|
|
securitySchemes:
|
|
|
|
|
bearerAuth:
|
|
|
|
|
type: http
|
|
|
|
|
scheme: bearer
|
|
|
|
|
bearerFormat: JWT
|
|
|
|
|
|
|
|
|
|
responses:
|
|
|
|
|
UnauthorizedError:
|
|
|
|
|
description: Unauthorized – authentication required
|
2025-05-11 20:06:16 +00:00
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
example: "Authentication required"
|
|
|
|
|
code:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 401
|
|
|
|
|
|
2025-04-30 14:57:01 +00:00
|
|
|
|
NotFoundError:
|
|
|
|
|
description: Resource not found
|
2025-05-11 20:06:16 +00:00
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
example: "Resource not found"
|
|
|
|
|
code:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 404
|
|
|
|
|
|
2025-04-30 14:57:01 +00:00
|
|
|
|
InternalServerError:
|
|
|
|
|
description: Internal server error
|
2025-05-11 20:06:16 +00:00
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
example: "Internal server error"
|
|
|
|
|
code:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 500
|
|
|
|
|
|
2025-04-30 14:57:01 +00:00
|
|
|
|
BadRequestError:
|
|
|
|
|
description: Invalid request data
|
2025-05-11 20:06:16 +00:00
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
example: "Invalid request data"
|
|
|
|
|
code:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 400
|
|
|
|
|
|
2025-04-30 14:57:01 +00:00
|
|
|
|
ConflictError:
|
|
|
|
|
description: Conflict – resource already exists
|
2025-05-11 20:06:16 +00:00
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
example: "Resource already exists"
|
|
|
|
|
code:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 409
|
|
|
|
|
|
2025-04-30 14:57:01 +00:00
|
|
|
|
AlreadyReportedError:
|
|
|
|
|
description: Resource already used
|
2025-05-11 20:06:16 +00:00
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
example: "Resource already used"
|
|
|
|
|
code:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 208
|
2025-05-12 16:20:40 +00:00
|
|
|
|
StatusNotAcceptableError:
|
|
|
|
|
description: Status not acceptable – requested format not supported
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
example: "Requested format not acceptable"
|
|
|
|
|
code:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 406
|
|
|
|
|
|
|
|
|
|
StatusFailedDependencyError:
|
|
|
|
|
description: Failed dependency – a prerequisite condition failed
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
example: "A prerequisite condition failed"
|
|
|
|
|
code:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 424
|
|
|
|
|
|
|
|
|
|
StatusConflictError:
|
|
|
|
|
description: Conflict – request could not be completed due to conflict with current state
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
error:
|
|
|
|
|
type: string
|
|
|
|
|
example: "Conflict with current state"
|
|
|
|
|
code:
|
|
|
|
|
type: integer
|
|
|
|
|
example: 409
|
|
|
|
|
|
|
|
|
|
|
2025-04-30 14:57:01 +00:00
|
|
|
|
|
|
|
|
|
schemas:
|
|
|
|
|
Account:
|
|
|
|
|
type: object
|
2025-05-11 20:06:16 +00:00
|
|
|
|
required:
|
|
|
|
|
- id
|
|
|
|
|
- user_id
|
|
|
|
|
- created_at
|
2025-04-30 14:57:01 +00:00
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Unique identifier of the account
|
2025-04-30 14:57:01 +00:00
|
|
|
|
user_id:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: User identifier
|
2025-04-30 14:57:01 +00:00
|
|
|
|
created_at:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Account creation timestamp
|
2025-04-30 14:57:01 +00:00
|
|
|
|
deleted:
|
|
|
|
|
type: boolean
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Whether the account is marked as deleted
|
|
|
|
|
default: false
|
2025-04-30 14:57:01 +00:00
|
|
|
|
privileges:
|
|
|
|
|
type: object
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Map of privileges assigned to the account
|
2025-04-30 14:57:01 +00:00
|
|
|
|
additionalProperties:
|
|
|
|
|
$ref: '#/components/schemas/ShortPrivilege'
|
|
|
|
|
|
|
|
|
|
ShortPrivilege:
|
|
|
|
|
type: object
|
2025-05-11 20:06:16 +00:00
|
|
|
|
required:
|
|
|
|
|
- id
|
|
|
|
|
- privilege_id
|
|
|
|
|
- privilege_name
|
|
|
|
|
- amount
|
|
|
|
|
- created_at
|
2025-04-30 14:57:01 +00:00
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Unique identifier of the privilege
|
2025-04-30 14:57:01 +00:00
|
|
|
|
privilege_id:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Privilege type identifier
|
2025-04-30 14:57:01 +00:00
|
|
|
|
privilege_name:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Name of the privilege
|
2025-04-30 14:57:01 +00:00
|
|
|
|
amount:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Amount or limit of the privilege
|
2025-04-30 14:57:01 +00:00
|
|
|
|
created_at:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: When the privilege was granted
|
|
|
|
|
|
2025-04-30 14:57:01 +00:00
|
|
|
|
LeadTarget:
|
|
|
|
|
type: object
|
2025-05-11 20:06:16 +00:00
|
|
|
|
required:
|
|
|
|
|
- id
|
|
|
|
|
- accountID
|
|
|
|
|
- type
|
|
|
|
|
- target
|
2025-04-30 14:57:01 +00:00
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int64
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Unique identifier of the lead target
|
2025-04-30 14:57:01 +00:00
|
|
|
|
accountID:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: ID of the account that owns this target
|
2025-04-30 14:57:01 +00:00
|
|
|
|
type:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Type of lead target
|
|
|
|
|
enum: [mail, telegram, whatsapp]
|
2025-04-30 14:57:01 +00:00
|
|
|
|
quizID:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int32
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Associated quiz ID (0 for general rules)
|
2025-04-30 14:57:01 +00:00
|
|
|
|
target:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Target address (email, channel ID, phone number)
|
2025-04-30 14:57:01 +00:00
|
|
|
|
inviteLink:
|
|
|
|
|
type: string
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Invite link for Telegram channel
|
2025-04-30 14:57:01 +00:00
|
|
|
|
deleted:
|
|
|
|
|
type: boolean
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Whether the target is marked as deleted
|
|
|
|
|
default: false
|
2025-04-30 14:57:01 +00:00
|
|
|
|
createdAt:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description: Creation timestamp
|
|
|
|
|
|
|
|
|
|
CreateQuizRequest:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- name
|
|
|
|
|
properties:
|
|
|
|
|
fingerprinting:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether to store device ID
|
|
|
|
|
default: false
|
|
|
|
|
repeatable:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether to allow multiple quiz attempts
|
|
|
|
|
default: false
|
|
|
|
|
note_prevented:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether to save answers even if quiz is aborted
|
|
|
|
|
default: false
|
|
|
|
|
mail_notifications:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether to send email notifications for quiz completions
|
|
|
|
|
default: false
|
|
|
|
|
unique_answers:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether to save only the last quiz attempt
|
|
|
|
|
default: false
|
|
|
|
|
name:
|
|
|
|
|
type: string
|
|
|
|
|
description: Quiz name (max 700 characters)
|
|
|
|
|
maxLength: 700
|
|
|
|
|
description:
|
|
|
|
|
type: string
|
|
|
|
|
description: Quiz description
|
|
|
|
|
config:
|
|
|
|
|
type: string
|
|
|
|
|
description: JSON serialized configuration for page rules
|
|
|
|
|
status:
|
|
|
|
|
type: string
|
|
|
|
|
description: Quiz status
|
|
|
|
|
enum: [draft, template, stop, start]
|
|
|
|
|
default: draft
|
|
|
|
|
limit:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Maximum number of quiz attempts allowed
|
|
|
|
|
due_to:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Timestamp when quiz expires
|
|
|
|
|
question_cnt:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Number of questions to create in one request
|
|
|
|
|
time_of_passing:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Time limit for completing quiz in seconds
|
|
|
|
|
pausable:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether quiz can be paused
|
|
|
|
|
default: false
|
|
|
|
|
super:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether this is a group quiz
|
|
|
|
|
default: false
|
|
|
|
|
group_id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: ID of super quiz if this is part of a group
|
|
|
|
|
|
|
|
|
|
GetQuizListRequest:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
limit:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Number of items per page
|
|
|
|
|
minimum: 1
|
|
|
|
|
default: 10
|
|
|
|
|
page:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Page number
|
|
|
|
|
minimum: 1
|
|
|
|
|
default: 1
|
|
|
|
|
from:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int64
|
|
|
|
|
description: Start timestamp for filtering
|
|
|
|
|
to:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int64
|
|
|
|
|
description: End timestamp for filtering
|
|
|
|
|
search:
|
|
|
|
|
type: string
|
|
|
|
|
description: Search query
|
|
|
|
|
status:
|
|
|
|
|
type: string
|
|
|
|
|
description: Filter by status
|
|
|
|
|
enum: [stop, start, draft, template, timeout, offlimit]
|
|
|
|
|
deleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Filter by deletion status
|
|
|
|
|
archived:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Filter by archive status
|
|
|
|
|
super:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Filter by group status
|
|
|
|
|
group_id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Filter by group ID
|
|
|
|
|
|
|
|
|
|
GetQuizListResponse:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- count
|
|
|
|
|
- items
|
|
|
|
|
properties:
|
|
|
|
|
count:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Total number of items
|
|
|
|
|
items:
|
|
|
|
|
type: array
|
|
|
|
|
description: List of quizzes
|
|
|
|
|
items:
|
|
|
|
|
$ref: '#/components/schemas/Quiz'
|
|
|
|
|
|
|
|
|
|
UpdateQuizRequest:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- id
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
fp:
|
|
|
|
|
type: boolean
|
|
|
|
|
rep:
|
|
|
|
|
type: boolean
|
|
|
|
|
note_prevented:
|
|
|
|
|
type: boolean
|
|
|
|
|
mailing:
|
|
|
|
|
type: boolean
|
|
|
|
|
uniq:
|
|
|
|
|
type: boolean
|
|
|
|
|
name:
|
|
|
|
|
type: string
|
|
|
|
|
desc:
|
|
|
|
|
type: string
|
|
|
|
|
conf:
|
|
|
|
|
type: string
|
|
|
|
|
status:
|
|
|
|
|
type: string
|
|
|
|
|
enum: [draft, template, stop, start]
|
|
|
|
|
limit:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
due_to:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
time_of_passing:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
pausable:
|
|
|
|
|
type: boolean
|
|
|
|
|
question_cnt:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
super:
|
|
|
|
|
type: boolean
|
|
|
|
|
group_id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
|
|
|
|
|
UpdateQuizResponse:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
updated:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
|
|
|
|
|
CopyQuizRequest:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- id
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
|
|
|
|
|
GetQuizHistoryRequest:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- id
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
l:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
p:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
|
|
|
|
|
DeleteQuizRequest:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- id
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
|
|
|
|
|
DeleteQuizResponse:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
deactivated:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
|
|
|
|
|
QuizMoveRequest:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- qid
|
|
|
|
|
- accountID
|
|
|
|
|
properties:
|
|
|
|
|
qid:
|
|
|
|
|
type: string
|
|
|
|
|
accountID:
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
|
|
QuestionCreateRequest:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- quiz_id
|
|
|
|
|
- title
|
|
|
|
|
- type
|
|
|
|
|
properties:
|
|
|
|
|
quiz_id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: relation to quiz
|
|
|
|
|
title:
|
|
|
|
|
type: string
|
|
|
|
|
description: title of question (max 512 chars)
|
|
|
|
|
description:
|
|
|
|
|
type: string
|
|
|
|
|
description: additional content in question such as pics, html markup or plain text
|
|
|
|
|
type:
|
|
|
|
|
type: string
|
|
|
|
|
description: type of question
|
2025-05-12 13:32:38 +00:00
|
|
|
|
enum: [text, variant, images, select, varimg, emoji, date, number, page, rating, result, file]
|
2025-05-11 20:06:16 +00:00
|
|
|
|
required:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: set true if question must be answered for valid quiz passing
|
|
|
|
|
page:
|
|
|
|
|
type: integer
|
|
|
|
|
description: set page of question
|
|
|
|
|
content:
|
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: json serialized config
|
2025-05-11 20:06:16 +00:00
|
|
|
|
|
|
|
|
|
GetQuestionListRequest:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
limit:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: page size
|
|
|
|
|
page:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: page number
|
|
|
|
|
from:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int64
|
|
|
|
|
description: start of time period
|
|
|
|
|
to:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int64
|
|
|
|
|
quiz_id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: relation to quiz
|
|
|
|
|
search:
|
|
|
|
|
type: string
|
|
|
|
|
description: search string to search in files
|
|
|
|
|
type:
|
|
|
|
|
type: string
|
|
|
|
|
description: type of questions
|
2025-05-12 13:32:38 +00:00
|
|
|
|
enum: [text, variant, images, select, varimg, emoji, date, number, page, rating, result, file]
|
2025-05-11 20:06:16 +00:00
|
|
|
|
deleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: true to get only deleted questions
|
|
|
|
|
required:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: filter by required status
|
|
|
|
|
|
|
|
|
|
GetQuestionListResponse:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
count:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
items:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
$ref: '#/components/schemas/Question'
|
|
|
|
|
|
|
|
|
|
UpdateQuestionRequest:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- id
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
title:
|
|
|
|
|
type: string
|
|
|
|
|
description: title of question (max 512 chars)
|
|
|
|
|
desc:
|
|
|
|
|
type: string
|
|
|
|
|
description: additional content in question
|
|
|
|
|
type:
|
|
|
|
|
type: string
|
|
|
|
|
description: type of question
|
2025-05-12 13:32:38 +00:00
|
|
|
|
enum: [text, variant, images, select, varimg, emoji, date, number, page, rating, result, file]
|
2025-05-11 20:06:16 +00:00
|
|
|
|
required:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: set true if question must be answered
|
|
|
|
|
content:
|
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: json serialized config
|
2025-05-11 20:06:16 +00:00
|
|
|
|
page:
|
|
|
|
|
type: integer
|
|
|
|
|
description: page number of question
|
|
|
|
|
|
|
|
|
|
UpdateQuestionResponse:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
updated:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
|
|
|
|
|
CopyQuestionRequest:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- id
|
|
|
|
|
- quiz_id
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
quiz_id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
|
|
|
|
|
GetQuestionHistoryRequest:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- id
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
l:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
p:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
|
2025-05-12 13:32:38 +00:00
|
|
|
|
DeactivateQuestionRequest:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- id
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
|
2025-05-12 13:32:38 +00:00
|
|
|
|
DeactivateQuestionResponse:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: object
|
|
|
|
|
properties:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
deactivated:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
|
|
|
|
|
GetResultsRequest:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
To:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
2025-05-12 13:32:38 +00:00
|
|
|
|
From:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
2025-05-12 13:32:38 +00:00
|
|
|
|
New:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: boolean
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Page:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Limit:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
|
|
|
|
|
GetResultsResponse:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
total_count:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
results:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
$ref: '#/components/schemas/AnswerExport'
|
|
|
|
|
|
|
|
|
|
UpdateResultsStatusRequest:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
- Answers
|
2025-05-11 20:06:16 +00:00
|
|
|
|
properties:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Answers:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int64
|
|
|
|
|
|
|
|
|
|
DeviceStatRequest:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
From:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Start timestamp for statistics
|
2025-05-12 13:32:38 +00:00
|
|
|
|
To:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: End timestamp for statistics
|
|
|
|
|
|
|
|
|
|
DeviceStat:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Device:
|
|
|
|
|
type: object
|
|
|
|
|
additionalProperties:
|
|
|
|
|
type: number
|
|
|
|
|
format: float
|
|
|
|
|
description: Percentage distribution of device types across all answers with res=true
|
|
|
|
|
OS:
|
|
|
|
|
type: object
|
|
|
|
|
additionalProperties:
|
|
|
|
|
type: number
|
|
|
|
|
format: float
|
|
|
|
|
description: Percentage distribution of operating systems across all answers with res=true
|
|
|
|
|
Browser:
|
|
|
|
|
type: object
|
|
|
|
|
additionalProperties:
|
|
|
|
|
type: number
|
|
|
|
|
format: float
|
|
|
|
|
description: Percentage distribution of browsers across all answers with res=true
|
2025-05-11 20:06:16 +00:00
|
|
|
|
|
|
|
|
|
GeneralStatsResponse:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Open:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: object
|
|
|
|
|
additionalProperties:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Result:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: object
|
|
|
|
|
additionalProperties:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
2025-05-12 13:32:38 +00:00
|
|
|
|
AvTime:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: object
|
|
|
|
|
additionalProperties:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Conversion:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: object
|
|
|
|
|
additionalProperties:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
|
|
|
|
|
QuestionStat:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Funnel:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: array
|
|
|
|
|
items:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
type: number
|
|
|
|
|
format: float
|
|
|
|
|
maxItems: 3
|
|
|
|
|
description: Three separate funnel metrics
|
|
|
|
|
FunnelData:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
type: number
|
|
|
|
|
format: float
|
|
|
|
|
maxItems: 4
|
|
|
|
|
description: Funnel data metrics
|
|
|
|
|
Results:
|
|
|
|
|
type: object
|
|
|
|
|
additionalProperties:
|
|
|
|
|
type: number
|
|
|
|
|
format: float
|
|
|
|
|
description: Map of question titles to percentage of answers with result=true
|
|
|
|
|
Questions:
|
|
|
|
|
type: object
|
|
|
|
|
additionalProperties:
|
|
|
|
|
type: object
|
|
|
|
|
additionalProperties:
|
|
|
|
|
type: number
|
|
|
|
|
format: float
|
|
|
|
|
description: Map of question titles to their answer distributions
|
2025-05-11 20:06:16 +00:00
|
|
|
|
|
|
|
|
|
ServiceStatistics:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Registrations:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
2025-05-12 13:32:38 +00:00
|
|
|
|
format: int64
|
|
|
|
|
description: Number of registered accounts from from to to
|
|
|
|
|
Quizes:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
2025-05-12 13:32:38 +00:00
|
|
|
|
format: int64
|
|
|
|
|
description: Number of created non-deleted quizzes
|
|
|
|
|
Results:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
2025-05-12 13:32:38 +00:00
|
|
|
|
format: int64
|
|
|
|
|
description: Number of answers with result=true
|
2025-05-11 20:06:16 +00:00
|
|
|
|
|
|
|
|
|
PipelineStat:
|
|
|
|
|
type: object
|
2025-05-12 13:32:38 +00:00
|
|
|
|
additionalProperties:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
2025-05-12 16:20:40 +00:00
|
|
|
|
count:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: int64
|
2025-05-12 16:20:40 +00:00
|
|
|
|
questionID:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: int64
|
2025-05-11 20:06:16 +00:00
|
|
|
|
|
|
|
|
|
TelegramAccount:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
ID:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: int64
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Unique identifier of the Telegram account
|
|
|
|
|
ApiID:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: int32
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Telegram API ID
|
|
|
|
|
ApiHash:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Telegram API Hash
|
|
|
|
|
PhoneNumber:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Phone number in international format
|
|
|
|
|
Password:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Account password
|
|
|
|
|
Status:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
enum: [active, inactive, ban]
|
|
|
|
|
description: Current status of the Telegram account
|
|
|
|
|
Deleted:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether the account is marked as deleted
|
|
|
|
|
CreatedAt:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Creation timestamp
|
2025-05-11 20:06:16 +00:00
|
|
|
|
|
|
|
|
|
TelegramAuthRequest:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- api_id
|
|
|
|
|
- api_hash
|
|
|
|
|
- phone_number
|
2025-05-12 13:32:38 +00:00
|
|
|
|
- password
|
2025-05-11 20:06:16 +00:00
|
|
|
|
properties:
|
|
|
|
|
api_id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int32
|
|
|
|
|
description: Telegram API ID
|
|
|
|
|
api_hash:
|
|
|
|
|
type: string
|
|
|
|
|
description: Telegram API Hash
|
|
|
|
|
phone_number:
|
|
|
|
|
type: string
|
|
|
|
|
description: Phone number in international format
|
2025-05-12 13:32:38 +00:00
|
|
|
|
password:
|
|
|
|
|
type: string
|
|
|
|
|
description: Account password
|
2025-05-11 20:06:16 +00:00
|
|
|
|
|
|
|
|
|
TelegramCodeRequest:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- code
|
|
|
|
|
- signature
|
|
|
|
|
properties:
|
|
|
|
|
code:
|
|
|
|
|
type: string
|
|
|
|
|
description: Authorization code received from Telegram
|
|
|
|
|
signature:
|
|
|
|
|
type: string
|
|
|
|
|
description: Signature received from create endpoint
|
|
|
|
|
|
|
|
|
|
Question:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Unique identifier of the question
|
|
|
|
|
quiz_id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Relation to quiz table
|
2025-05-11 20:06:16 +00:00
|
|
|
|
title:
|
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Title of question
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description:
|
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: HTML/text representation of question and question description for answerer
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type:
|
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Type field
|
|
|
|
|
enum: [variant, images, varimg, file, text, emoji, select, date, number, page, rating, result]
|
2025-05-11 20:06:16 +00:00
|
|
|
|
required:
|
|
|
|
|
type: boolean
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Answerer must answer this question
|
2025-05-11 20:06:16 +00:00
|
|
|
|
deleted:
|
|
|
|
|
type: boolean
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Fake deleting field
|
2025-05-11 20:06:16 +00:00
|
|
|
|
page:
|
|
|
|
|
type: integer
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Set page number for question
|
2025-05-11 20:06:16 +00:00
|
|
|
|
content:
|
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Serialized JSON content
|
2025-05-11 20:06:16 +00:00
|
|
|
|
version:
|
|
|
|
|
type: integer
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Version number
|
2025-05-11 20:06:16 +00:00
|
|
|
|
parent_ids:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int32
|
|
|
|
|
description: IDs of parent questions if this is a child question
|
|
|
|
|
created_at:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
description: Creation timestamp
|
|
|
|
|
updated_at:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
description: Last update timestamp
|
|
|
|
|
|
|
|
|
|
Quiz:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Unique identifier of the quiz
|
|
|
|
|
qid:
|
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: UUID for secure data get and post
|
2025-05-11 20:06:16 +00:00
|
|
|
|
accountid:
|
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Account that created the quiz
|
2025-05-11 20:06:16 +00:00
|
|
|
|
deleted:
|
|
|
|
|
type: boolean
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Fake delete field
|
2025-05-11 20:06:16 +00:00
|
|
|
|
archived:
|
|
|
|
|
type: boolean
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Field for archiving quiz
|
2025-05-11 20:06:16 +00:00
|
|
|
|
fingerprinting:
|
|
|
|
|
type: boolean
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Field that need for storing device id
|
2025-05-11 20:06:16 +00:00
|
|
|
|
repeatable:
|
|
|
|
|
type: boolean
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Make it true for allow more than one quiz checkouting
|
2025-05-11 20:06:16 +00:00
|
|
|
|
note_prevented:
|
|
|
|
|
type: boolean
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Note answers even if the quiz was aborted
|
2025-05-11 20:06:16 +00:00
|
|
|
|
mail_notifications:
|
|
|
|
|
type: boolean
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Set true if you want get an email with every quiz passing
|
2025-05-11 20:06:16 +00:00
|
|
|
|
unique_answers:
|
|
|
|
|
type: boolean
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Set true if we you mention only last quiz passing
|
2025-05-11 20:06:16 +00:00
|
|
|
|
name:
|
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Quiz name
|
2025-05-11 20:06:16 +00:00
|
|
|
|
description:
|
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Quiz description
|
2025-05-11 20:06:16 +00:00
|
|
|
|
config:
|
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Serialize json with config for page rules
|
2025-05-11 20:06:16 +00:00
|
|
|
|
status:
|
|
|
|
|
type: string
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Status of quiz as enum
|
|
|
|
|
enum: [draft, template, stop, start, timeout, offlimit]
|
2025-05-11 20:06:16 +00:00
|
|
|
|
limit:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Max count of quiz passing
|
2025-05-11 20:06:16 +00:00
|
|
|
|
due_to:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Time when quiz is end
|
2025-05-11 20:06:16 +00:00
|
|
|
|
time_of_passing:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Amount of seconds for give all appropriate answers for quiz
|
2025-05-11 20:06:16 +00:00
|
|
|
|
pausable:
|
|
|
|
|
type: boolean
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: True allows to pause the quiz taking
|
2025-05-11 20:06:16 +00:00
|
|
|
|
version:
|
|
|
|
|
type: integer
|
2025-05-12 13:32:38 +00:00
|
|
|
|
description: Version number
|
2025-05-11 20:06:16 +00:00
|
|
|
|
version_comment:
|
|
|
|
|
type: string
|
|
|
|
|
description: Comment for the current version
|
|
|
|
|
parent_ids:
|
|
|
|
|
type: array
|
|
|
|
|
items:
|
|
|
|
|
type: integer
|
|
|
|
|
format: int32
|
|
|
|
|
description: IDs of parent quizzes if this is a child quiz
|
|
|
|
|
created_at:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
description: Creation timestamp
|
|
|
|
|
updated_at:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
description: Last update timestamp
|
|
|
|
|
questions_count:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Number of questions in the quiz
|
|
|
|
|
session_count:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Number of quiz sessions started
|
|
|
|
|
passed_count:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Number of completed quiz attempts
|
|
|
|
|
average_time:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Average time taken to complete the quiz in seconds
|
|
|
|
|
super:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether this is a super quiz (group)
|
|
|
|
|
group_id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: ID of the super quiz if this quiz belongs to a group
|
|
|
|
|
|
|
|
|
|
UTMSavingMap:
|
|
|
|
|
type: object
|
|
|
|
|
additionalProperties:
|
|
|
|
|
type: string
|
|
|
|
|
description: Map of UTM parameters and their values
|
|
|
|
|
|
|
|
|
|
Answer:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Id:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Unique identifier of the answer
|
|
|
|
|
content:
|
|
|
|
|
type: string
|
|
|
|
|
description: Serialized JSON content of the answer (empty for buttons)
|
|
|
|
|
question_id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: ID of the question this answer belongs to
|
2025-05-12 13:32:38 +00:00
|
|
|
|
QuizId:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: ID of the quiz this answer belongs to
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Fingerprint:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
|
|
|
|
description: Device identifier
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Session:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
|
|
|
|
description: Session identifier (xid)
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Result:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether this is a result answer
|
2025-05-12 13:32:38 +00:00
|
|
|
|
CreatedAt:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
description: Creation timestamp
|
|
|
|
|
new:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether this is a new answer
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Deleted:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether the answer is marked as deleted
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Email:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
|
|
|
|
description: Email address associated with the answer
|
2025-05-12 13:32:38 +00:00
|
|
|
|
DeviceType:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
|
|
|
|
description: Type of device used
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Device:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
|
|
|
|
description: Device information
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Browser:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
|
|
|
|
description: Browser information
|
2025-05-12 13:32:38 +00:00
|
|
|
|
IP:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
|
|
|
|
description: IP address
|
2025-05-12 13:32:38 +00:00
|
|
|
|
OS:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: string
|
|
|
|
|
description: Operating system information
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Start:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether this is a start answer
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Utm:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
$ref: '#/components/schemas/UTMSavingMap'
|
|
|
|
|
description: UTM parameters
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Version:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: int32
|
|
|
|
|
description: Version number
|
|
|
|
|
|
|
|
|
|
AnswerExport:
|
|
|
|
|
type: object
|
|
|
|
|
properties:
|
|
|
|
|
content:
|
|
|
|
|
type: string
|
|
|
|
|
description: Serialized JSON content of the answer
|
|
|
|
|
id:
|
|
|
|
|
type: integer
|
|
|
|
|
format: uint64
|
|
|
|
|
description: Unique identifier of the answer
|
|
|
|
|
new:
|
|
|
|
|
type: boolean
|
|
|
|
|
description: Whether this is a new answer
|
|
|
|
|
created_at:
|
|
|
|
|
type: string
|
|
|
|
|
format: date-time
|
|
|
|
|
description: Creation timestamp
|
2025-05-12 13:32:38 +00:00
|
|
|
|
Version:
|
2025-05-11 20:06:16 +00:00
|
|
|
|
type: integer
|
|
|
|
|
format: int32
|
|
|
|
|
description: Version number
|