개요
HTTP 동사
본 REST API에서 사용하는 HTTP 동사(verbs)는 가능한 한 표준 HTTP와 REST 규약을 따릅니다.
동사 | 용례 |
---|---|
|
리소스를 가져올 때 사용 |
|
새 리소스를 만들거나 데이터를 제출할 때 사용 |
|
기존 리소스를 수정할 때 사용 |
|
기존 리소스의 일부를 수정할 때 사용 |
|
기존 리소스를 삭제할 때 사용 |
HTTP 상태 코드
본 REST API에서 사용하는 HTTP 상태 코드는 가능한 한 표준 HTTP와 REST 규약을 따릅니다.
상태 코드 | 용례 |
---|---|
|
요청을 성공적으로 처리함 |
|
새 리소스를 성공적으로 생성함 |
|
기존 리소스를 성공적으로 수정함 |
|
잘못된 요청 |
|
인증되지 않은 요청 |
|
권한이 없는 요청 |
|
요청한 리소스가 존재하지 않음 |
|
요청이 현재 서버 상태와 충돌함 |
|
서버에 오류가 발생함 |
리소스
시험 관리
Question Service는 자격증 시험 문제 관리, 답안 제출, 북마크 기능을 제공합니다.
자격증 목록 조회
시스템에서 지원하는 자격증 목록을 조회합니다.
HTTP request
GET /exam HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: docs.api.com
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 144
[ {
"certificationId" : 1,
"certificationName" : "정보처리기사"
}, {
"certificationId" : 2,
"certificationName" : "컴활1급"
} ]
Response fields
Path | Type | Description |
---|---|---|
|
|
자격증 ID |
|
|
자격증 이름 |
자격증 연도/회차 정보 조회
특정 자격증의 연도별 회차 정보를 조회합니다.
Path parameters
Parameter | Description |
---|---|
|
자격증 ID |
HTTP request
GET /exam/certification/1/year-session HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: docs.api.com
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 78
[ {
"year" : 2023,
"session" : 1
}, {
"year" : 2023,
"session" : 2
} ]
Response fields
Path | Type | Description |
---|---|---|
|
|
시험 연도 |
|
|
시험 회차 |
자격증별 과목 목록 조회
특정 자격증의 과목 목록을 조회합니다.
Path parameters
Parameter | Description |
---|---|
|
자격증 ID |
HTTP request
GET /exam/certification/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: docs.api.com
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 143
[ {
"subjectId" : 1,
"subjectName" : "소프트웨어 설계"
}, {
"subjectId" : 2,
"subjectName" : "프로그래밍 언어 활용"
} ]
Response fields
Path | Type | Description |
---|---|---|
|
|
과목 ID |
|
|
과목 이름 |
문제 조회
과목별 단일 문제 조회
과목별로 특정 문제를 조회합니다 (Deprecated).
Path parameters
Parameter | Description |
---|---|
|
과목 ID |
Query parameters
Parameter | Description |
---|---|
|
문제 ID (기본값: 0) |
HTTP request
GET /exam/subject/1/question?questionId=1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: docs.api.com
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 98
{
"questionId" : 1,
"content" : "문제 내용",
"answer" : "4",
"explantion" : "해설"
}
Response fields
Path | Type | Description |
---|---|---|
|
|
문제 ID |
|
|
문제 내용 |
|
|
정답 |
|
|
문제 해설 |
과목별 랜덤 문제 조회
공부 모드에서 사용할 과목별 랜덤 문제를 조회합니다.
Path parameters
Parameter | Description |
---|---|
|
과목 ID |
HTTP request
GET /exam/subject/1/random HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: docs.api.com
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 102
[ {
"questionId" : 1,
"content" : "문제 내용",
"answer" : "4",
"explantion" : "해설"
} ]
Response fields
Path | Type | Description |
---|---|---|
|
|
문제 ID |
|
|
문제 내용 |
|
|
정답 |
|
|
문제 해설 |
과목별 기출 문제 조회
시험 모드에서 사용할 과목별 연도/회차 기출 문제를 조회합니다.
Path parameters
Parameter | Description |
---|---|
|
과목 ID |
|
시험 연도 |
|
시험 회차 |
HTTP request
GET /exam/subject/1/year/2023/session/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: docs.api.com
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 102
[ {
"questionId" : 1,
"content" : "문제 내용",
"answer" : "4",
"explantion" : "해설"
} ]
Response fields
Path | Type | Description |
---|---|---|
|
|
문제 ID |
|
|
문제 내용 |
|
|
정답 |
|
|
문제 해설 |
틀린 문제 조회
사용자가 틀린 문제 목록을 조회합니다 (퀵 모드).
Request headers
Name | Description |
---|---|
|
JWT 인증 토큰 |
Query parameters
Parameter | Description |
---|---|
|
문제 상태 (WRONG, CORRECT 등) |
HTTP request
GET /exam/wrong-questions?status=WRONG HTTP/1.1
Authorization: Bearer jwt-token-here
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: docs.api.com
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 102
[ {
"questionId" : 1,
"content" : "문제 내용",
"answer" : "4",
"explantion" : "해설"
} ]
Response fields
Path | Type | Description |
---|---|---|
|
|
문제 ID |
|
|
문제 내용 |
|
|
정답 |
|
|
문제 해설 |
답안 제출
일반 모드 답안 제출
공부 모드에서 단일 문제의 답안을 제출합니다.
Request headers
Name | Description |
---|---|
|
JWT 인증 토큰 |
Request fields
Path | Type | Description |
---|---|---|
|
|
문제 ID |
|
|
문제 상태 (CORRECT, WRONG 등) |
HTTP request
POST /exam/submit/normal HTTP/1.1
Authorization: Bearer jwt-token-here
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 46
Host: docs.api.com
{
"questionId" : 1,
"status" : "CORRECT"
}
HTTP response
HTTP/1.1 200 OK
시험 모드 답안 제출
시험 모드에서 여러 문제의 답안을 일괄 제출합니다.
Request headers
Name | Description |
---|---|
|
JWT 인증 토큰 |
Request fields
Path | Type | Description |
---|---|---|
|
|
문제 ID |
|
|
정답 |
|
|
사용자 답안 |
HTTP request
POST /exam/submit/test HTTP/1.1
Authorization: Bearer jwt-token-here
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 130
Host: docs.api.com
[ {
"questionId" : 1,
"answer" : "4",
"userAnswer" : "4"
}, {
"questionId" : 2,
"answer" : "2",
"userAnswer" : "3"
} ]
HTTP response
HTTP/1.1 200 OK
북마크 관리
북마크 생성
문제를 북마크에 추가합니다.
Request headers
Name | Description |
---|---|
|
JWT 인증 토큰 |
Query parameters
Parameter | Description |
---|---|
|
문제 ID |
HTTP request
POST /exam/book-mark?questionId=1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Authorization: Bearer jwt-token-here
Host: docs.api.com
HTTP response
HTTP/1.1 200 OK
북마크 삭제
문제를 북마크에서 제거합니다.
Request headers
Name | Description |
---|---|
|
JWT 인증 토큰 |
Query parameters
Parameter | Description |
---|---|
|
문제 번호 |
HTTP request
DELETE /exam/book-mark?questionId=1 HTTP/1.1
Authorization: Bearer jwt-token-here
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: docs.api.com
HTTP response
HTTP/1.1 200 OK
북마크된 문제 조회
사용자가 북마크한 문제 목록을 조회합니다.
Request headers
Name | Description |
---|---|
|
JWT 인증 토큰 |
Query parameters
Parameter | Description |
---|---|
|
자격증ID |
HTTP request
GET /exam/book-mark/question?certificationId=1 HTTP/1.1
Authorization: Bearer jwt-token-here
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: docs.api.com
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 102
[ {
"questionId" : 1,
"content" : "문제 내용",
"answer" : "4",
"explantion" : "해설"
} ]
Response fields
Path | Type | Description |
---|---|---|
|
|
문제 ID |
|
|
문제 내용 |
|
|
정답 |
|
|
문제 해설 |
북마크된 문제 번호 조회
사용자가 북마크한 문제 번호 목록을 조회합니다.
Request headers
Name | Description |
---|---|
|
JWT 인증 토큰 |
HTTP request
GET /exam/book-mark HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Authorization: Bearer jwt-token-here
Host: docs.api.com
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 26
[ {
"questionId" : 1
} ]
Response fields
Path | Type | Description |
---|---|---|
|
|
문제 ID |