유저 API
회원가입 (성공)
Request Example
POST /join HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 77
Host: localhost:8080
{
"email" : "love@nate.com",
"password" : "1234",
"username" : "love"
}
Response Example
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJVU0VSIiwiaWQiOjQsImV4cCI6MTY4NDA3MDEwMX0._a7GHZxbukEM3PqVJqR4nyraHJwHKhvPvFDZUwRr-t_pHOOJz4U07vLwiy_gFRrnHT68ZkrZY56LtohcWl0S8A
Content-Type: application/json;charset=UTF-8
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
Content-Length: 148
{
"status" : 201,
"msg" : "성공",
"data" : {
"id" : 4,
"email" : "love@nate.com",
"username" : "love",
"role" : "USER"
}
}
Curl
$ curl 'http://localhost:8080/join' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"email" : "love@nate.com",
"password" : "1234",
"username" : "love"
}'
회원가입 (email 중복 실패)
Request Example
POST /join HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 77
Host: localhost:8080
{
"email" : "ssar@nate.com",
"password" : "1234",
"username" : "ssar"
}
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 129
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "email",
"value" : "이메일이 존재합니다."
}
}
Curl
$ curl 'http://localhost:8080/join' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"email" : "ssar@nate.com",
"password" : "1234",
"username" : "ssar"
}'
회원가입 (유효성 검사 email 형식 오류)
Request Example
POST /join HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 76
Host: localhost:8080
{
"email" : "ssarnate.com",
"password" : "1234",
"username" : "ssar"
}
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 141
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "email",
"value" : "이메일 형식으로 작성해주세요"
}
}
Curl
$ curl 'http://localhost:8080/join' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"email" : "ssarnate.com",
"password" : "1234",
"username" : "ssar"
}'
로그인 (성공)
Request Example
POST /login HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 54
Host: localhost:8080
{
"email" : "ssar@nate.com",
"password" : "1234"
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJVU0VSIiwiaWQiOjEsImV4cCI6MTY4NDA3MDA5OX0.UlTCJzPQeSjfyGb92nHB6R_vaKr9iROviJX9KDA9-l6bpvR6JN6WGiB_IcudbHsmGModfWli3Bo-h31bz61byw
Content-Type: application/json;charset=UTF-8
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
Content-Length: 148
{
"status" : 200,
"msg" : "성공",
"data" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
}
}
Curl
$ curl 'http://localhost:8080/login' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"email" : "ssar@nate.com",
"password" : "1234"
}'
로그인 (인증 실패)
Request Example
POST /login HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 44
Host: localhost:8080
{
"email" : null,
"password" : "12345"
}
Response Example
HTTP/1.1 401 Unauthorized
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 89
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "인증되지 않았습니다"
}
Curl
$ curl 'http://localhost:8080/login' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"email" : null,
"password" : "12345"
}'
회원상세보기 (성공)
Request Example
GET /s/user HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 148
{
"status" : 200,
"msg" : "성공",
"data" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
}
}
Curl
$ curl 'http://localhost:8080/s/user' -i -X GET
회원상세보기 (인증 안됨 실패)
Request Example
GET /s/user HTTP/1.1
Host: localhost:8080
POST /join HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 77
Host: localhost:8080
{
"email" : "love@nate.com",
"password" : "1234",
"username" : "love"
}
Response Example
HTTP/1.1 401 Unauthorized
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json; charset=utf-8
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
Content-Length: 89
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "인증되지 않았습니다"
}
Curl
$ curl 'http://localhost:8080/s/user' -i -X GET
회원 정보 수정 (성공)
Request Example
POST /s/user HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJVU0VSIiwiaWQiOjEsImV4cCI6MTY4NDA3MDEwMH0.zNiAT2JEXHiDSj-h3OmPN16jxVJA7V6Xwb4ANQkpRwd9dERYfUtoglYJjmKMS2_oJJdKO1g_f-LqFenMxSpHzA
Content-Length: 50
Host: localhost:8080
{
"password" : "5678",
"username" : "archie"
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 150
{
"status" : 200,
"msg" : "성공",
"data" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "archie",
"role" : "USER"
}
}
Curl
$ curl 'http://localhost:8080/s/user' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJVU0VSIiwiaWQiOjEsImV4cCI6MTY4NDA3MDEwMH0.zNiAT2JEXHiDSj-h3OmPN16jxVJA7V6Xwb4ANQkpRwd9dERYfUtoglYJjmKMS2_oJJdKO1g_f-LqFenMxSpHzA' \
-d '{
"password" : "5678",
"username" : "archie"
}'
회원 정보 수정 (인증 실패)
Request Example
POST /s/user HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 50
Host: localhost:8080
{
"password" : "5678",
"username" : "archie"
}
Response Example
HTTP/1.1 401 Unauthorized
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json; charset=utf-8
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
Content-Length: 89
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "인증되지 않았습니다"
}
Curl
$ curl 'http://localhost:8080/s/user' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"password" : "5678",
"username" : "archie"
}'
회원 정보 수정 (토큰은 있으나 존재하지 않는 유저 실패)
Request Example
POST /s/user HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJVU0VSIiwiaWQiOjEsImV4cCI6MTY4NDA3MDEwMH0.zNiAT2JEXHiDSj-h3OmPN16jxVJA7V6Xwb4ANQkpRwd9dERYfUtoglYJjmKMS2_oJJdKO1g_f-LqFenMxSpHzA
Content-Length: 50
Host: localhost:8080
{
"password" : "5678",
"username" : "archie"
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 150
{
"status" : 200,
"msg" : "성공",
"data" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "archie",
"role" : "USER"
}
}
Curl
$ curl 'http://localhost:8080/s/user' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJVU0VSIiwiaWQiOjEsImV4cCI6MTY4NDA3MDEwMH0.zNiAT2JEXHiDSj-h3OmPN16jxVJA7V6Xwb4ANQkpRwd9dERYfUtoglYJjmKMS2_oJJdKO1g_f-LqFenMxSpHzA' \
-d '{
"password" : "5678",
"username" : "archie"
}'
일정 관련 요청 결과 확인 (성공)
Request Example
GET /s/user/annualDutyCheck HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJVU0VSIiwiaWQiOjEsImV4cCI6MTY4NDA3MDEwMn0.mZykVSv6qGoaTUfMCgQIAE3cv7zaNvDu-jQbKFMjbI7bE11VdX0Keohq3UWRc5bVMmU4BEt7GjYq12uU8rpnSA
Content-Length: 45
Host: localhost:8080
{
"updateRequestLogList" : [ 10, 11, 12 ]
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 1495
{
"status" : 200,
"msg" : "성공",
"data" : [ {
"id" : 10,
"username" : null,
"msg" : "일정 등록에 성공하였습니다.",
"annualDuty" : {
"id" : 145,
"status" : "1",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:15:02.380899",
"endTime" : "2023-05-18T22:15:02.380902",
"type" : true,
"updateStatus" : null
}
}, {
"id" : 11,
"username" : null,
"msg" : "일정 등록에 성공하였습니다.",
"annualDuty" : {
"id" : 146,
"status" : "1",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:15:02.381785",
"endTime" : "2023-05-18T22:15:02.381786",
"type" : true,
"updateStatus" : null
}
}, {
"id" : 12,
"username" : null,
"msg" : "일정 등록에 성공하였습니다.",
"annualDuty" : {
"id" : 147,
"status" : "1",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:15:02.382155",
"endTime" : "2023-05-18T22:15:02.382155",
"type" : true,
"updateStatus" : null
}
} ]
}
Curl
$ curl 'http://localhost:8080/s/user/annualDutyCheck' -i -X GET \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJVU0VSIiwiaWQiOjEsImV4cCI6MTY4NDA3MDEwMn0.mZykVSv6qGoaTUfMCgQIAE3cv7zaNvDu-jQbKFMjbI7bE11VdX0Keohq3UWRc5bVMmU4BEt7GjYq12uU8rpnSA' \
-d '{
"updateRequestLogList" : [ 10, 11, 12 ]
}'
일정 관련 요청 결과 확인 후 처리 (성공)
Request Example
POST /s/user/annualDutyCheck HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJVU0VSIiwiaWQiOjEsImV4cCI6MTY4NDA3MDEwMX0.nHfpTK8x1ttRzlcrXqi5kmn17_zO4Rjz8rQoTVaczbVxrUp8HFdc670-kKTryZSyD_Z3MivgHzHOqv7LVzFQQw
Content-Length: 43
Host: localhost:8080
{
"annualDutyCheckedList" : [ 7, 8, 9 ]
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 57
{
"status" : 200,
"msg" : "성공",
"data" : null
}
Curl
$ curl 'http://localhost:8080/s/user/annualDutyCheck' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJVU0VSIiwiaWQiOjEsImV4cCI6MTY4NDA3MDEwMX0.nHfpTK8x1ttRzlcrXqi5kmn17_zO4Rjz8rQoTVaczbVxrUp8HFdc670-kKTryZSyD_Z3MivgHzHOqv7LVzFQQw' \
-d '{
"annualDutyCheckedList" : [ 7, 8, 9 ]
}'
개인연차/당직 API
일정 등록 요청 (성공)
Request Example
Unresolved directive in api-docs.adoc - include::./build/generated-snippets/{annualduty}/save_test/http-request.adoc[]
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 390
{
"status" : 200,
"msg" : "성공",
"data" : {
"id" : 81,
"status" : "0",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:57.615",
"endTime" : "2023-05-18T22:14:57.615",
"type" : true,
"updateStatus" : null
}
}
Curl
$ curl 'http://localhost:8080/s/user/annualDuty/save' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"calendarId" : "0",
"username" : "taeheoki",
"email" : "taeheoki@nate.com",
"title" : "taeheoki의 일정",
"start" : "2023-05-13T22:14:57.615Z",
"end" : "2023-05-18T22:14:57.615Z",
"isAllday" : true,
"role" : "USER",
"endTimeAfterStartTime" : true
}'
일정 등록 요청 (실패 - 일정 종료가 시작보다 빠름)
Request Example
POST /s/user/annualDuty/save HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 271
Host: localhost:8080
{
"calendarId" : "0",
"username" : "taeheoki",
"email" : "taeheoki@nate.com",
"title" : "taeheoki의 일정",
"start" : "2023-05-13T22:14:58.109Z",
"end" : "2023-05-08T22:14:58.109Z",
"isAllday" : true,
"role" : "USER",
"endTimeAfterStartTime" : false
}
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 151
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "endTimeAfterStartTime",
"value" : "End time should be after start time"
}
}
Curl
$ curl 'http://localhost:8080/s/user/annualDuty/save' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"calendarId" : "0",
"username" : "taeheoki",
"email" : "taeheoki@nate.com",
"title" : "taeheoki의 일정",
"start" : "2023-05-13T22:14:58.109Z",
"end" : "2023-05-08T22:14:58.109Z",
"isAllday" : true,
"role" : "USER",
"endTimeAfterStartTime" : false
}'
일정 수정 요청 (성공)
Request Example
POST /s/user/annualDuty/update/141 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 155
Host: localhost:8080
{
"title" : "taeheoki의 일정 수정",
"start" : "2023-05-13T22:14:59.308Z",
"end" : "2023-05-28T22:14:59.308Z",
"endTimeAfterStartTime" : true
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 614
{
"status" : 200,
"msg" : "성공",
"data" : {
"id" : 17,
"annualDuty" : {
"id" : 141,
"status" : "1",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:59.30774",
"endTime" : "2023-05-18T22:14:59.307742",
"type" : true,
"updateStatus" : 1
},
"title" : "taeheoki의 일정 수정",
"startTime" : "2023-05-13T22:14:59.308",
"endTime" : "2023-05-28T22:14:59.308",
"status" : false
}
}
Curl
$ curl 'http://localhost:8080/s/user/annualDuty/update/141' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"title" : "taeheoki의 일정 수정",
"start" : "2023-05-13T22:14:59.308Z",
"end" : "2023-05-28T22:14:59.308Z",
"endTimeAfterStartTime" : true
}'
일정 수정 요청 (실패 - 일정 종료가 시작보다 빠름)
Request Example
POST /s/user/annualDuty/update/90 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 156
Host: localhost:8080
{
"title" : "taeheoki의 일정 수정",
"start" : "2023-05-13T22:14:57.869Z",
"end" : "2023-04-28T22:14:57.869Z",
"endTimeAfterStartTime" : false
}
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 151
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "endTimeAfterStartTime",
"value" : "End time should be after start time"
}
}
Curl
$ curl 'http://localhost:8080/s/user/annualDuty/update/90' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"title" : "taeheoki의 일정 수정",
"start" : "2023-05-13T22:14:57.869Z",
"end" : "2023-04-28T22:14:57.869Z",
"endTimeAfterStartTime" : false
}'
일정 수정 요청 (실패 - 존재하지 않는 일정 수정 요청)
Request Example
POST /s/user/annualDuty/update/9223372036854775807 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 155
Host: localhost:8080
{
"title" : "taeheoki의 일정 수정",
"start" : "2023-05-13T22:14:57.086Z",
"end" : "2023-05-28T22:14:57.086Z",
"endTimeAfterStartTime" : true
}
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 133
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "id",
"value" : "존재하지 않는 일정입니다."
}
}
Curl
$ curl 'http://localhost:8080/s/user/annualDuty/update/9223372036854775807' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"title" : "taeheoki의 일정 수정",
"start" : "2023-05-13T22:14:57.086Z",
"end" : "2023-05-28T22:14:57.086Z",
"endTimeAfterStartTime" : true
}'
일정 수정 요청 (실패 - 권한이 부여되지 않은 유저 수정 요청)
Request Example
POST /s/user/annualDuty/update/56 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 155
Host: localhost:8080
{
"title" : "taeheoki의 일정 수정",
"start" : "2023-05-13T22:14:56.813Z",
"end" : "2023-05-28T22:14:56.813Z",
"endTimeAfterStartTime" : true
}
Response Example
HTTP/1.1 401 Unauthorized
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 108
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "본인의 일정만 수정할 수 있습니다."
}
Curl
$ curl 'http://localhost:8080/s/user/annualDuty/update/56' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"title" : "taeheoki의 일정 수정",
"start" : "2023-05-13T22:14:56.813Z",
"end" : "2023-05-28T22:14:56.813Z",
"endTimeAfterStartTime" : true
}'
일정 삭제 요청 (성공)
Request Example
POST /s/user/annualDuty/delete/107 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 57
{
"status" : 200,
"msg" : "성공",
"data" : null
}
Curl
$ curl 'http://localhost:8080/s/user/annualDuty/delete/107' -i -X POST
일정 삭제 요청 (실패 - 존재하지 않는 일정 삭제 요제)
Request Example
POST /s/user/annualDuty/delete/9223372036854775807 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 133
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "id",
"value" : "존재하지 않는 일정입니다."
}
}
Curl
$ curl 'http://localhost:8080/s/user/annualDuty/delete/9223372036854775807' -i -X POST
일정 삭제 요청 (실패 - 권한이 부여되지 않은 유저 삭제 요)
Request Example
POST /s/user/annualDuty/delete/132 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 401 Unauthorized
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 108
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "본인의 일정만 수정할 수 있습니다."
}
Curl
$ curl 'http://localhost:8080/s/user/annualDuty/delete/132' -i -X POST
일정 조회 요청 (토큰 X)
Request Example
GET /annualDuty?year=2023&month=5 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 1433
{
"status" : 200,
"msg" : "성공",
"data" : [ {
"id" : 66,
"status" : "1",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:57.343337",
"endTime" : "2023-05-18T22:14:57.34334",
"type" : true,
"updateStatus" : null
}, {
"id" : 68,
"status" : "1",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:57.344107",
"endTime" : "2023-05-18T22:14:57.34411",
"type" : true,
"updateStatus" : null
}, {
"id" : 70,
"status" : "1",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:57.344945",
"endTime" : "2023-05-18T22:14:57.344948",
"type" : true,
"updateStatus" : null
}, {
"id" : 72,
"status" : "1",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:57.345781",
"endTime" : "2023-05-18T22:14:57.345784",
"type" : true,
"updateStatus" : null
} ]
}
Curl
$ curl 'http://localhost:8080/annualDuty?year=2023&month=5' -i -X GET
일정 조회 요청 (유저 토큰)
Request Example
GET /annualDuty/?year=2023&month=5 HTTP/1.1
Authorization: Bearer Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJVU0VSIiwiaWQiOjIsImV4cCI6MTY4NDA3MDA5OH0.H0hCrcYmP8j7_lDEVJYB34pzvzZFDwYDbut6ZThnelwmUAlLdO8S8H8meKmY6n_FC6v5DQCHS1oYi8BCiLG4Eg
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 2107
{
"status" : 200,
"msg" : "성공",
"data" : [ {
"id" : 109,
"status" : "1",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:58.586067",
"endTime" : "2023-05-18T22:14:58.586069",
"type" : true,
"updateStatus" : null
}, {
"id" : 110,
"status" : "0",
"user" : {
"id" : 2,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:58.586535",
"endTime" : "2023-05-18T22:14:58.586536",
"type" : true,
"updateStatus" : null
}, {
"id" : 111,
"status" : "1",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:58.586857",
"endTime" : "2023-05-18T22:14:58.586859",
"type" : true,
"updateStatus" : null
}, {
"id" : 113,
"status" : "1",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:58.587616",
"endTime" : "2023-05-18T22:14:58.587617",
"type" : true,
"updateStatus" : null
}, {
"id" : 114,
"status" : "0",
"user" : {
"id" : 2,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:58.588078",
"endTime" : "2023-05-18T22:14:58.588079",
"type" : true,
"updateStatus" : null
}, {
"id" : 115,
"status" : "1",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:58.588576",
"endTime" : "2023-05-18T22:14:58.588577",
"type" : true,
"updateStatus" : null
} ]
}
Curl
$ curl 'http://localhost:8080/annualDuty/?year=2023&month=5' -i -X GET \
-H 'Authorization: Bearer Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJVU0VSIiwiaWQiOjIsImV4cCI6MTY4NDA3MDA5OH0.H0hCrcYmP8j7_lDEVJYB34pzvzZFDwYDbut6ZThnelwmUAlLdO8S8H8meKmY6n_FC6v5DQCHS1oYi8BCiLG4Eg'
일정 조회 요청 (관리자 토큰)
Request Example
GET /annualDuty/?year=2023&month=5 HTTP/1.1
Authorization: Bearer Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJBRE1JTiIsImlkIjozLCJleHAiOjE2ODQwNzAwOTZ9.riSw7zSPVgYbK4myfZhXz4zl1XfX1oCuQAh121kh20-JOYkgd36XS6ghkhQn1dI-XWE42KW5mw0JJ34vCRnbzw
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 2788
{
"status" : 200,
"msg" : "성공",
"data" : [ {
"id" : 40,
"status" : "0",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:56.525795",
"endTime" : "2023-05-18T22:14:56.525798",
"type" : true,
"updateStatus" : null
}, {
"id" : 41,
"status" : "1",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:56.52628",
"endTime" : "2023-05-18T22:14:56.526285",
"type" : true,
"updateStatus" : null
}, {
"id" : 42,
"status" : "0",
"user" : {
"id" : 2,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:56.526596",
"endTime" : "2023-05-18T22:14:56.526599",
"type" : true,
"updateStatus" : null
}, {
"id" : 43,
"status" : "1",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:56.526923",
"endTime" : "2023-05-18T22:14:56.526926",
"type" : true,
"updateStatus" : null
}, {
"id" : 44,
"status" : "0",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:56.52722",
"endTime" : "2023-05-18T22:14:56.527223",
"type" : true,
"updateStatus" : null
}, {
"id" : 45,
"status" : "1",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:56.52751",
"endTime" : "2023-05-18T22:14:56.527515",
"type" : true,
"updateStatus" : null
}, {
"id" : 46,
"status" : "0",
"user" : {
"id" : 2,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:56.527828",
"endTime" : "2023-05-18T22:14:56.527831",
"type" : true,
"updateStatus" : null
}, {
"id" : 47,
"status" : "1",
"user" : {
"id" : 1,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:56.528415",
"endTime" : "2023-05-18T22:14:56.528421",
"type" : true,
"updateStatus" : null
} ]
}
Curl
$ curl 'http://localhost:8080/annualDuty/?year=2023&month=5' -i -X GET \
-H 'Authorization: Bearer Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqd3RzdHVkeSIsInJvbGUiOiJBRE1JTiIsImlkIjozLCJleHAiOjE2ODQwNzAwOTZ9.riSw7zSPVgYbK4myfZhXz4zl1XfX1oCuQAh121kh20-JOYkgd36XS6ghkhQn1dI-XWE42KW5mw0JJ34vCRnbzw'
관리자 API
유저 권한 변경 - 성공
Request Example
POST /s/admin/update/role HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 51
Host: localhost:8080
{
"email" : "ssar@nate.com",
"role" : "ADMIN"
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 149
{
"status" : 200,
"msg" : "성공",
"data" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "ADMIN"
}
}
Curl
$ curl 'http://localhost:8080/s/admin/update/role' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"email" : "ssar@nate.com",
"role" : "ADMIN"
}'
일정 등록 승인 - 성공
Request Example
POST /s/admin/save/accept/26 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 395
{
"status" : 200,
"msg" : "성공",
"data" : {
"id" : 26,
"status" : "1",
"user" : {
"id" : 3,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:54.340284",
"endTime" : "2023-05-18T22:14:54.34029",
"type" : true,
"updateStatus" : null
}
}
Curl
$ curl 'http://localhost:8080/s/admin/save/accept/26' -i -X POST
일정 등록 승인 - 인증 실패
Request Example
POST /s/admin/save/accept/4 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 401 Unauthorized
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json; charset=utf-8
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
Content-Length: 89
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "인증되지 않았습니다"
}
Curl
$ curl 'http://localhost:8080/s/admin/save/accept/4' -i -X POST
일정 등록 승인 - 유효한 토큰은 있으나 삭제된 유저일 경우
Request Example
POST /s/admin/save/accept/2 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 133
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "id",
"value" : "등록되지 않은 유저입니다."
}
}
Curl
$ curl 'http://localhost:8080/s/admin/save/accept/2' -i -X POST
일정 등록 거절 - 성공
Request Example
POST /s/admin/save/reject/39 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 57
{
"status" : 200,
"msg" : "성공",
"data" : null
}
Curl
$ curl 'http://localhost:8080/s/admin/save/reject/39' -i -X POST
일정 등록 거절 - 인증 실패
Request Example
POST /s/admin/save/reject/6 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 401 Unauthorized
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json; charset=utf-8
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
Content-Length: 89
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "인증되지 않았습니다"
}
Curl
$ curl 'http://localhost:8080/s/admin/save/reject/6' -i -X POST
일정 등록 거절 - 유효한 토큰은 있으나 삭제된 유저일 경우
Request Example
POST /s/admin/save/reject/5 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 133
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "id",
"value" : "등록되지 않은 유저입니다."
}
}
Curl
$ curl 'http://localhost:8080/s/admin/save/reject/5' -i -X POST
일정 삭제 승인 - 성공
Request Example
POST /s/admin/delete/accept/22 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 57
{
"status" : 200,
"msg" : "성공",
"data" : null
}
Curl
$ curl 'http://localhost:8080/s/admin/delete/accept/22' -i -X POST
일정 삭제 승인 - 인증 실패
Request Example
POST /s/admin/delete/accept/19 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 401 Unauthorized
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json; charset=utf-8
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
Content-Length: 89
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "인증되지 않았습니다"
}
Curl
$ curl 'http://localhost:8080/s/admin/delete/accept/19' -i -X POST
일정 삭제 승인 - 유효한 토큰은 있으나 삭제된 유저일 경우
Request Example
POST /s/admin/delete/accept/7 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 133
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "id",
"value" : "등록되지 않은 유저입니다."
}
}
Curl
$ curl 'http://localhost:8080/s/admin/delete/accept/7' -i -X POST
일정 삭제 거절 - 성공
Request Example
POST /s/admin/delete/reject/21 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 57
{
"status" : 200,
"msg" : "성공",
"data" : null
}
Curl
$ curl 'http://localhost:8080/s/admin/delete/reject/21' -i -X POST
일정 삭제 거절 - 인증 실패
Request Example
POST /s/admin/delete/reject/3 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 401 Unauthorized
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json; charset=utf-8
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
Content-Length: 89
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "인증되지 않았습니다"
}
Curl
$ curl 'http://localhost:8080/s/admin/delete/reject/3' -i -X POST
일정 삭제 거절 - 유효한 토큰은 있으나 삭제된 유저일 경우
Request Example
POST /s/admin/delete/reject/1 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 133
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "id",
"value" : "등록되지 않은 유저입니다."
}
}
Curl
$ curl 'http://localhost:8080/s/admin/delete/reject/1' -i -X POST
일정 업데이트 승인 - 성공
Request Example
POST /s/admin/update/accept/2 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 386
{
"status" : 200,
"msg" : "성공",
"data" : {
"id" : 20,
"status" : "1",
"user" : {
"id" : 3,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정 수정",
"startTime" : "2023-05-13T10:30:01",
"endTime" : "2023-05-20T10:30:01",
"type" : true,
"updateStatus" : 0
}
}
Curl
$ curl 'http://localhost:8080/s/admin/update/accept/2' -i -X POST
일정 업데이트 승인 - 인증 실패
Request Example
POST /s/admin/update/accept/5 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 401 Unauthorized
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json; charset=utf-8
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
Content-Length: 89
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "인증되지 않았습니다"
}
Curl
$ curl 'http://localhost:8080/s/admin/update/accept/5' -i -X POST
일정 업데이트 승인 - 유효한 토큰은 있으나 삭제된 유저일 경우
Request Example
POST /s/admin/update/accept/4 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 133
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "id",
"value" : "등록되지 않은 유저입니다."
}
}
Curl
$ curl 'http://localhost:8080/s/admin/update/accept/4' -i -X POST
일정 업데이트 승인 - 존재하지 않는 수정 요청 실패
Request Example
POST /s/admin/update/accept/1 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 140
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "id",
"value" : "수정사항이 존재하지 않습니다. "
}
}
Curl
$ curl 'http://localhost:8080/s/admin/update/accept/1' -i -X POST
일정 수정 거절 - 성공
Request Example
POST /s/admin/update/reject/16 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 57
{
"status" : 200,
"msg" : "성공",
"data" : null
}
Curl
$ curl 'http://localhost:8080/s/admin/update/reject/16' -i -X POST
일정 수정 거절 - 인증 실패
Request Example
POST /s/admin/update/reject/1 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 401 Unauthorized
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json; charset=utf-8
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
Content-Length: 89
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "인증되지 않았습니다"
}
Curl
$ curl 'http://localhost:8080/s/admin/update/reject/1' -i -X POST
일정 삭제 거절 - 유효한 토큰은 있으나 삭제된 유저일 경우
Request Example
POST /s/admin/delete/reject/3 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 133
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "id",
"value" : "등록되지 않은 유저입니다."
}
}
Curl
$ curl 'http://localhost:8080/s/admin/delete/reject/3' -i -X POST
일정 업데이트 승인 - 존재하지 않는 수정 요청 실패
Request Example
POST /s/admin/update/reject/1 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 140
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "id",
"value" : "수정사항이 존재하지 않습니다. "
}
}
Curl
$ curl 'http://localhost:8080/s/admin/update/reject/1' -i -X POST
등록 요청 데이터조회 - 성공
Request Example
GET /s/admin/save?page=0 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 3464
{
"status" : 200,
"msg" : "성공",
"data" : {
"content" : [ {
"id" : 37,
"status" : "0",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:54.77555",
"endTime" : "2023-05-18T22:14:54.775553",
"type" : true,
"updateStatus" : null
}, {
"id" : 36,
"status" : "0",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:54.775176",
"endTime" : "2023-05-18T22:14:54.77518",
"type" : true,
"updateStatus" : null
}, {
"id" : 35,
"status" : "0",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:54.774629",
"endTime" : "2023-05-18T22:14:54.774632",
"type" : true,
"updateStatus" : null
}, {
"id" : 34,
"status" : "0",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:54.774187",
"endTime" : "2023-05-18T22:14:54.77419",
"type" : true,
"updateStatus" : null
}, {
"id" : 33,
"status" : "0",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:54.773615",
"endTime" : "2023-05-18T22:14:54.773621",
"type" : true,
"updateStatus" : null
}, {
"id" : 32,
"status" : "0",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:54.773021",
"endTime" : "2023-05-18T22:14:54.773024",
"type" : true,
"updateStatus" : null
}, {
"id" : 31,
"status" : "0",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:54.772435",
"endTime" : "2023-05-18T22:14:54.772441",
"type" : true,
"updateStatus" : null
}, {
"id" : 30,
"status" : "0",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:54.77179",
"endTime" : "2023-05-18T22:14:54.771793",
"type" : true,
"updateStatus" : null
} ],
"pageable" : {
"sort" : {
"empty" : true,
"unsorted" : true,
"sorted" : false
},
"offset" : 0,
"pageNumber" : 0,
"pageSize" : 8,
"paged" : true,
"unpaged" : false
},
"last" : false,
"totalPages" : 2,
"totalElements" : 10,
"first" : true,
"size" : 8,
"number" : 0,
"sort" : {
"empty" : true,
"unsorted" : true,
"sorted" : false
},
"numberOfElements" : 8,
"empty" : false
}
}
Curl
$ curl 'http://localhost:8080/s/admin/save?page=0' -i -X GET
수정 요청 데이터 조회 - 성공
Request Example
GET /s/admin/update HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 5376
{
"status" : 200,
"msg" : "성공",
"data" : {
"content" : [ {
"id" : 6,
"annualDuty" : {
"id" : 27,
"status" : "1",
"user" : {
"id" : 3,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:54.584194",
"endTime" : "2023-05-18T22:14:54.584198",
"type" : true,
"updateStatus" : null
},
"title" : "taeheoki의 일정 수정",
"startTime" : "2023-05-13T10:30:01",
"endTime" : "2023-05-20T10:30:01",
"status" : false
}, {
"id" : 7,
"annualDuty" : {
"id" : 27,
"status" : "1",
"user" : {
"id" : 3,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:54.584194",
"endTime" : "2023-05-18T22:14:54.584198",
"type" : true,
"updateStatus" : null
},
"title" : "taeheoki의 일정 수정",
"startTime" : "2023-05-13T10:30:01",
"endTime" : "2023-05-20T10:30:01",
"status" : false
}, {
"id" : 8,
"annualDuty" : {
"id" : 27,
"status" : "1",
"user" : {
"id" : 3,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:54.584194",
"endTime" : "2023-05-18T22:14:54.584198",
"type" : true,
"updateStatus" : null
},
"title" : "taeheoki의 일정 수정",
"startTime" : "2023-05-13T10:30:01",
"endTime" : "2023-05-20T10:30:01",
"status" : false
}, {
"id" : 9,
"annualDuty" : {
"id" : 27,
"status" : "1",
"user" : {
"id" : 3,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:54.584194",
"endTime" : "2023-05-18T22:14:54.584198",
"type" : true,
"updateStatus" : null
},
"title" : "taeheoki의 일정 수정",
"startTime" : "2023-05-13T10:30:01",
"endTime" : "2023-05-20T10:30:01",
"status" : false
}, {
"id" : 10,
"annualDuty" : {
"id" : 27,
"status" : "1",
"user" : {
"id" : 3,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:54.584194",
"endTime" : "2023-05-18T22:14:54.584198",
"type" : true,
"updateStatus" : null
},
"title" : "taeheoki의 일정 수정",
"startTime" : "2023-05-13T10:30:01",
"endTime" : "2023-05-20T10:30:01",
"status" : false
}, {
"id" : 11,
"annualDuty" : {
"id" : 27,
"status" : "1",
"user" : {
"id" : 3,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:54.584194",
"endTime" : "2023-05-18T22:14:54.584198",
"type" : true,
"updateStatus" : null
},
"title" : "taeheoki의 일정 수정",
"startTime" : "2023-05-13T10:30:01",
"endTime" : "2023-05-20T10:30:01",
"status" : false
}, {
"id" : 12,
"annualDuty" : {
"id" : 27,
"status" : "1",
"user" : {
"id" : 3,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:54.584194",
"endTime" : "2023-05-18T22:14:54.584198",
"type" : true,
"updateStatus" : null
},
"title" : "taeheoki의 일정 수정",
"startTime" : "2023-05-13T10:30:01",
"endTime" : "2023-05-20T10:30:01",
"status" : false
}, {
"id" : 13,
"annualDuty" : {
"id" : 27,
"status" : "1",
"user" : {
"id" : 3,
"email" : "taeheoki@nate.com",
"username" : "taeheoki",
"role" : "USER"
},
"title" : "taeheoki의 일정",
"startTime" : "2023-05-13T22:14:54.584194",
"endTime" : "2023-05-18T22:14:54.584198",
"type" : true,
"updateStatus" : null
},
"title" : "taeheoki의 일정 수정",
"startTime" : "2023-05-13T10:30:01",
"endTime" : "2023-05-20T10:30:01",
"status" : false
} ],
"pageable" : {
"sort" : {
"empty" : true,
"unsorted" : true,
"sorted" : false
},
"offset" : 0,
"pageNumber" : 0,
"pageSize" : 8,
"paged" : true,
"unpaged" : false
},
"last" : false,
"totalPages" : 2,
"totalElements" : 10,
"first" : true,
"size" : 8,
"number" : 0,
"sort" : {
"empty" : true,
"unsorted" : true,
"sorted" : false
},
"numberOfElements" : 8,
"empty" : false
}
}
Curl
$ curl 'http://localhost:8080/s/admin/update' -i -X GET
삭제 요청 데이터 조회 - 성공
Request Example
GET /s/admin/delete?page=0 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 3438
{
"status" : 200,
"msg" : "성공",
"data" : {
"content" : [ {
"id" : 9,
"status" : "1",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:51.949592",
"endTime" : "2023-05-18T22:14:51.9496",
"type" : true,
"updateStatus" : 2
}, {
"id" : 10,
"status" : "1",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:51.950366",
"endTime" : "2023-05-18T22:14:51.95037",
"type" : true,
"updateStatus" : 2
}, {
"id" : 11,
"status" : "1",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:51.950852",
"endTime" : "2023-05-18T22:14:51.950856",
"type" : true,
"updateStatus" : 2
}, {
"id" : 12,
"status" : "1",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:51.951339",
"endTime" : "2023-05-18T22:14:51.951343",
"type" : true,
"updateStatus" : 2
}, {
"id" : 13,
"status" : "1",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:51.952538",
"endTime" : "2023-05-18T22:14:51.952544",
"type" : true,
"updateStatus" : 2
}, {
"id" : 14,
"status" : "1",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:51.953166",
"endTime" : "2023-05-18T22:14:51.95317",
"type" : true,
"updateStatus" : 2
}, {
"id" : 15,
"status" : "1",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:51.953693",
"endTime" : "2023-05-18T22:14:51.953697",
"type" : true,
"updateStatus" : 2
}, {
"id" : 16,
"status" : "1",
"user" : {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
},
"title" : "ssar의 일정",
"startTime" : "2023-05-13T22:14:51.95424",
"endTime" : "2023-05-18T22:14:51.954244",
"type" : true,
"updateStatus" : 2
} ],
"pageable" : {
"sort" : {
"empty" : true,
"unsorted" : true,
"sorted" : false
},
"offset" : 0,
"pageNumber" : 0,
"pageSize" : 8,
"paged" : true,
"unpaged" : false
},
"last" : false,
"totalPages" : 2,
"totalElements" : 10,
"first" : true,
"size" : 8,
"number" : 0,
"sort" : {
"empty" : true,
"unsorted" : true,
"sorted" : false
},
"numberOfElements" : 8,
"empty" : false
}
}
Curl
$ curl 'http://localhost:8080/s/admin/delete?page=0' -i -X GET
전체 유저 조회 - 성공
Request Example
GET /s/admin/users HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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
Content-Length: 1451
{
"status" : 200,
"msg" : "성공",
"data" : {
"content" : [ {
"id" : 1,
"email" : "ssar@nate.com",
"username" : "ssar",
"role" : "USER"
}, {
"id" : 2,
"email" : "admin@nate.com",
"username" : "admin",
"role" : "ADMIN"
}, {
"id" : 3,
"email" : "user0@nate.com",
"username" : "user0",
"role" : "USER"
}, {
"id" : 4,
"email" : "user1@nate.com",
"username" : "user1",
"role" : "USER"
}, {
"id" : 5,
"email" : "user2@nate.com",
"username" : "user2",
"role" : "USER"
}, {
"id" : 6,
"email" : "user3@nate.com",
"username" : "user3",
"role" : "USER"
}, {
"id" : 7,
"email" : "user4@nate.com",
"username" : "user4",
"role" : "USER"
}, {
"id" : 8,
"email" : "user5@nate.com",
"username" : "user5",
"role" : "USER"
} ],
"pageable" : {
"sort" : {
"empty" : true,
"unsorted" : true,
"sorted" : false
},
"offset" : 0,
"pageNumber" : 0,
"pageSize" : 8,
"paged" : true,
"unpaged" : false
},
"last" : false,
"totalPages" : 2,
"totalElements" : 12,
"first" : true,
"size" : 8,
"number" : 0,
"sort" : {
"empty" : true,
"unsorted" : true,
"sorted" : false
},
"numberOfElements" : 8,
"empty" : false
}
}
Curl
$ curl 'http://localhost:8080/s/admin/users' -i -X GET