Candidate
Retrieves all exams of the authenticated user, including their results.
OK
Unauthorized
Internal Server Error
GET /api/Candidate/Exams HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
[
{
"exam": {
"examId": "123e4567-e89b-12d3-a456-426614174000",
"title": "text",
"description": "text",
"totalPoints": 1,
"problemSolvingPoints": 1,
"writtenPoints": 1,
"mcqPoints": 1,
"durationMinutes": 1,
"isPublished": true,
"status": "text",
"opensAt": "2025-08-11T02:45:32.163Z",
"closesAt": "2025-08-11T02:45:32.163Z"
},
"result": {
"totalScore": 1,
"problemSolvingScore": 1,
"writtenScore": 1,
"mcqScore": 1,
"startedAt": "2025-08-11T02:45:32.163Z",
"submittedAt": "2025-08-11T02:45:32.163Z",
"hasCheated": true,
"isReviewed": true
}
}
]
Starts a specific exam for the authenticated user, providing exam details, questions, and prior submissions.
Identifier of the exam to start.
OK
Bad Request
Unauthorized
Internal Server Error
POST /api/Candidate/Exam/Start/{examId} HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"examId": "123e4567-e89b-12d3-a456-426614174000",
"startedAt": "2025-08-11T02:45:32.163Z",
"closesAt": "2025-08-11T02:45:32.163Z",
"questions": {
"problem": [
{
"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"
}
]
}
],
"written": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"examId": "123e4567-e89b-12d3-a456-426614174000",
"questionType": "ProblemSolving",
"hasLongAnswer": true,
"statementMarkdown": "text",
"score": 1,
"difficultyType": "Easy"
}
],
"mcq": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"examId": "123e4567-e89b-12d3-a456-426614174000",
"questionType": "ProblemSolving",
"statementMarkdown": "text",
"score": 1,
"difficultyType": "Easy",
"mcqOption": {
"option1": "text",
"option2": "text",
"option3": "text",
"option4": "text",
"isMultiSelect": true,
"answerOptions": "text"
}
}
]
},
"submits": {
"problem": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"problemSubmissionId": "123e4567-e89b-12d3-a456-426614174000",
"code": "text",
"language": "java"
}
],
"written": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"writtenSubmissionId": "123e4567-e89b-12d3-a456-426614174000",
"answer": "text"
}
],
"mcq": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"mcqSubmissionId": "123e4567-e89b-12d3-a456-426614174000",
"answerOptions": "text"
}
]
}
}
Creates or updates a problem-solving submission and returns the results of test code execution.
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
PUT /api/Candidate/Submit/Problem/Save HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 133
{
"examId": "123e4567-e89b-12d3-a456-426614174000",
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"code": "text",
"language": "java"
}
[
{
"testCaseId": "123e4567-e89b-12d3-a456-426614174000",
"isAccepted": true,
"receivedOutput": "text",
"errorMessage": "text",
"exception": "text",
"executionTime": 1
}
]
Creates or updates a written submission.
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
PUT /api/Candidate/Submit/Written/Save HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 144
{
"examId": "123e4567-e89b-12d3-a456-426614174000",
"submissions": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"candidateAnswer": "text"
}
]
}
No content
Creates or updates a multiple-choice question (MCQ) submission.
OK
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
PUT /api/Candidate/Submit/Mcq/Save HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 151
{
"examId": "123e4567-e89b-12d3-a456-426614174000",
"submissions": [
{
"questionId": "123e4567-e89b-12d3-a456-426614174000",
"candidateAnswerOptions": "text"
}
]
}
No content
Submits the completed exam for the authenticated user.
Identifier of the exam to submit.
OK
Bad Request
Unauthorized
Internal Server Error
PATCH /api/Candidate/Submit/Exam/{examId} HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
No content
Executes and tests code for a given problem-solving question.
OK
Bad Request
Unauthorized
Internal Server Error
POST /api/Candidate/RunAnyCode HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 50
{
"code": "text",
"input": "text",
"languageId": "java"
}
{
"status": "text",
"stdout": "text",
"stdin": "text",
"stderr": "text",
"exception": "text",
"executionTime": 1
}