Member
회원가입
Request
POST /members/join?_csrf=cb7021f1-f525-4db5-97f7-ca509b655fb7 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 75
Host: localhost:8080
{
"name" : "홍길동",
"password" : "1234",
"role" : [ "STUDENT" ]
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 58
{
"message" : "회원가입이 완료되었습니다."
}
로그인
Request
POST /members/login?_csrf=ac6ffdea-5364-4fb5-8459-a25b013d0d7b HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 49
Host: localhost:8080
{
"name" : "홍길동",
"password" : "1234"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 101
{
"message" : "로그인에 성공하였습니다.",
"memberId" : 1,
"jwtToken" : "jwt-token"
}
선생님 목록 조회
Request
GET /members/teachers?_csrf=0a6c007b-5025-4311-9cbd-9e11aa3c4471 HTTP/1.1
Host: localhost:8080
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 341
{
"teachers" : [ {
"id" : 1,
"name" : "선생님",
"authorities" : [ "TEACHER" ],
"status" : "ACTIVE"
}, {
"id" : 2,
"name" : "선생님2",
"authorities" : [ "TEACHER" ],
"status" : "ACTIVE"
}, {
"id" : 3,
"name" : "선생님3",
"authorities" : [ "TEACHER" ],
"status" : "ACTIVE"
} ]
}
선생님 추가
Request
POST /members/teachers/enrollment?_csrf=d832c313-abef-4da8-a432-ea8b13360b8f HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 33
Host: localhost:8080
{
"teacherName" : "선생님"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 79
{
"message" : "선생님 추가 및 회원가입에 성공하였습니다."
}
선생님 삭제
Request
PATCH /members/teachers/expulsion/1 HTTP/1.1
Host: localhost:8080
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 73
{
"message" : "선생님 삭제 및 탈퇴에 성공하였습니다."
}
교재 상세조회(전체 학생에 대한 오답노트 조회)
Request
GET /mistake-notes/workbooks/1?_csrf=0d4d13f5-666c-4036-9d96-620d5207d208 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 366
{
"students" : [ {
"studentId" : 2,
"name" : "갑"
}, {
"studentId" : 3,
"name" : "을"
}, {
"studentId" : 4,
"name" : "병"
} ],
"mistakeNoteInfo" : [ {
"wrongNumber" : 1,
"wrongStudentsCount" : 4
}, {
"wrongNumber" : 4,
"wrongStudentsCount" : 2
}, {
"wrongNumber" : 10,
"wrongStudentsCount" : 7
} ]
}
학생별 N번 틀린 문제 문자열 출력
Request
GET /mistake-notes/workbooks/1/2?count=2&from=30&to=50&_csrf=00152d19-7918-43c7-88cd-871eee832708 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 41
{
"wrongNumber" : "30,31,33,40,45,50"
}
학생별 오답노트 조회
Request
GET /mistake-notes/workbooks/1/students/2?_csrf=a2c6f91f-606d-46d0-ba50-ea8835598cd1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 92
[ {
"wrongNumber" : 1,
"wrongCount" : 3
}, {
"wrongNumber" : 2,
"wrongCount" : 1
} ]
오답 기록하기
Request
POST /mistake-notes/workbooks/1/students/2?_csrf=0d60a966-38da-4f80-8b55-60ad9097d4ee HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 36
Host: localhost:8080
{
"mistakeNumbers" : [ 1, 2, 3 ]
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 52
{
"message" : "오답이 기록되었습니다."
}
Classroom
반 추가
Request
POST /classrooms/enrollment?_csrf=4acc10d0-f273-4622-9275-a288f6302459 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 104
Host: localhost:8080
{
"name" : "1반",
"description" : "1반 설명입니다.",
"grade" : "high1",
"teacherId" : 1
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 49
{
"message" : "반이 추가되었습니다."
}
반 목록 조회
Request
GET /classrooms?teacher-id=1&_csrf=79f81976-38d1-472a-9d8d-73cab197aab8 HTTP/1.1
Host: localhost:8080
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 206
{
"classroomInfoList" : [ {
"id" : 1,
"name" : "1",
"description" : "111",
"grade" : "high1"
}, {
"id" : 2,
"name" : "2",
"description" : "222",
"grade" : "high2"
} ]
}
반 상세 조회
Request
GET /classrooms/1?_csrf=d8d372c4-171c-4388-87fe-255afde92cb6 HTTP/1.1
Host: localhost:8080
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 385
{
"id" : 1,
"name" : "1반",
"description" : "1반 설명",
"grade" : "high1",
"teacherId" : 2,
"studentInfoList" : [ {
"studentId" : 1,
"studentName" : "갑"
}, {
"studentId" : 2,
"studentName" : "을"
} ],
"workbookInfoList" : [ {
"workbookId" : 10,
"workbookName" : "책10"
}, {
"workbookId" : 11,
"workbookName" : "책11"
} ]
}
반 정보 수정
Request
PATCH /classrooms/info/1?_csrf=caf17e3e-79c9-4622-9bf3-bf0c2707dc75 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 68
Host: localhost:8080
{
"name" : "2반",
"description" : "2222",
"grade" : "high2"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 44
{
"message" : "반 정보 수정 성공"
}
반 삭제
Request
DELETE /classrooms/expulsion/1?_csrf=942cbdd1-5bde-46a8-9a6b-137d64011a49 HTTP/1.1
Host: localhost:8080
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 37
{
"message" : "반 삭제 성공"
}
학생 추가
Request
POST /classrooms/1/students/enrollment?_csrf=356bdd54-2b34-4f9c-9ba0-3e9a72d1353a HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 27
Host: localhost:8080
{
"studentName" : "갑"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 66
{
"message" : "해당 반에 학생이 추가되었습니다."
}
학생 삭제
Request
PATCH /classrooms/1/expulsion/students/2 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 52
{
"message" : "학생을 삭제하였습니다."
}
교재 목록 조회
Request
GET /classrooms/1/workbooks?_csrf=e44b14d7-be6c-4fda-af30-68d14d7bc480 HTTP/1.1
Host: localhost:8080
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 252
{
"workbookList" : [ {
"id" : 1,
"name" : "교재",
"createdAt" : "2023-09-01"
}, {
"id" : 2,
"name" : "교재2",
"createdAt" : "2023-09-01"
}, {
"id" : 3,
"name" : "교재3",
"createdAt" : "2023-09-01"
} ]
}
교재 추가
Request
POST /classrooms/1/workbooks?_csrf=5e9a4ecd-2e92-4eb9-9a92-0caf927631b2 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 127
Host: localhost:8080
{
"name" : "교재",
"description" : "교재에 대한 설명입니다.",
"startingNumber" : 1,
"endingNumber" : 2000
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 83
{
"message" : "해당 반에 교재 및 오답노트가 추가되었습니다."
}
교재 정보 수정
Request
PATCH /classrooms/workbooks/info/1?_csrf=1cec5f91-16c5-4771-94fe-d5d1fb0ab548 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 101
Host: localhost:8080
{
"name" : "수정할 교재명",
"description" : "수정할 교재에 대한 설명입니다."
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 60
{
"message" : "교재 정보가 수정 되었습니다."
}