QuestionProblem
Creates a new problem-solving question.
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
POST /api/Questions/Problem/Create HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 181
{
"examId": "123e4567-e89b-12d3-a456-426614174000",
"problemQuestions": [
{
"statementMarkdown": "text",
"points": 1,
"difficultyType": "Easy",
"testCases": [
{
"input": "text",
"output": "text"
}
]
}
]
}
[
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"examId": "123e4567-e89b-12d3-a456-426614174000",
"questionType": "ProblemSolving",
"statementMarkdown": "text",
"points": 1,
"difficultyType": "Easy",
"testCases": [
{
"testCaseId": "123e4567-e89b-12d3-a456-426614174000",
"input": "text",
"output": "text"
}
]
}
]
Retrieves a specific problem-solving question by its unique identifier.
The unique identifier of the problem-solving question to retrieve.
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
GET /api/Questions/Problem/{questionId} HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"examId": "123e4567-e89b-12d3-a456-426614174000",
"questionType": "ProblemSolving",
"statementMarkdown": "text",
"points": 1,
"difficultyType": "Easy",
"testCases": [
{
"testCaseId": "123e4567-e89b-12d3-a456-426614174000",
"input": "text",
"output": "text"
}
]
}
Retrieves all problem-solving questions associated with a specific exam.
The unique identifier of the exam.
OK
Bad Request
Unauthorized
Forbidden
Internal Server Error
GET /api/Questions/Problem/ByExam/{examId} HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
[
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"examId": "123e4567-e89b-12d3-a456-426614174000",
"questionType": "ProblemSolving",
"statementMarkdown": "text",
"points": 1,
"difficultyType": "Easy",
"testCases": [
{
"testCaseId": "123e4567-e89b-12d3-a456-426614174000",
"input": "text",
"output": "text"
}
]
}
]
Updates an existing problem-solving question with new details and test cases.
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal Server Error
PATCH /api/Questions/Problem/Update HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 214
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"statementMarkdown": "text",
"points": 1,
"difficultyType": "Easy",
"testCases": [
{
"testCaseId": "123e4567-e89b-12d3-a456-426614174000",
"input": "text",
"output": "text"
}
]
}
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"examId": "123e4567-e89b-12d3-a456-426614174000",
"questionType": "ProblemSolving",
"statementMarkdown": "text",
"points": 1,
"difficultyType": "Easy",
"testCases": [
{
"testCaseId": "123e4567-e89b-12d3-a456-426614174000",
"input": "text",
"output": "text"
}
]
}
Deletes a specific problem-solving question by its unique identifier.
The unique identifier of the problem-solving question to delete.
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal Server Error
DELETE /api/Questions/Problem/Delete/{questionId} HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{}
Deletes a specific test case associated with a problem-solving question.
The unique identifier of the test case to delete.
OK
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Internal Server Error
DELETE /api/Questions/Problem/TestCase/{testCaseId} HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
No content