회원
회원가입 (성공)
Request Example
POST /join HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 189
Host: 52.78.70.225:7777
{
"name" : "권민수",
"password" : "##234dkfid",
"email" : "user7777@gmail.com",
"phoneNumber" : "010-1111-1111",
"startWork" : "2020-05-01",
"teamName" : "개발팀"
}
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" : "ok",
"data" : null
}
Curl
$ curl 'http://52.78.70.225:7777/join' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"name" : "권민수",
"password" : "##234dkfid",
"email" : "user7777@gmail.com",
"phoneNumber" : "010-1111-1111",
"startWork" : "2020-05-01",
"teamName" : "개발팀"
}'
회원가입 (실패: 이메일 형식)
Request Example
POST /join HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 188
Host: 52.78.70.225:7777
{
"name" : "권으뜸",
"password" : "##smash1234",
"email" : "user7777@gmail.c",
"phoneNumber" : "010-1111-1111",
"startWork" : "2020-05-01",
"teamName" : "개발팀"
}
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: 179
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "email",
"value" : "50자가 넘지 않도록 이메일 형식에 맞춰 작성해주세요."
}
}
Curl
$ curl 'http://52.78.70.225:7777/join' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"name" : "권으뜸",
"password" : "##smash1234",
"email" : "user7777@gmail.c",
"phoneNumber" : "010-1111-1111",
"startWork" : "2020-05-01",
"teamName" : "개발팀"
}'
회원가입 (실패: 비밀번호 형식)
Request Example
POST /join HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 184
Host: 52.78.70.225:7777
{
"name" : "권으뜸",
"password" : "sma1234",
"email" : "user7777@gmail.c",
"phoneNumber" : "010-1111-1111",
"startWork" : "2020-05-01",
"teamName" : "개발팀"
}
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: 211
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "password",
"value" : "영문, 숫자, 특수문자를 각각 1개 이상 사용하여 8~20자 이내로 작성해주세요."
}
}
Curl
$ curl 'http://52.78.70.225:7777/join' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"name" : "권으뜸",
"password" : "sma1234",
"email" : "user7777@gmail.c",
"phoneNumber" : "010-1111-1111",
"startWork" : "2020-05-01",
"teamName" : "개발팀"
}'
회원가입 (실패: 입사일 형식)
Request Example
POST /join HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 199
Host: 52.78.70.225:7777
{
"name" : "권으뜸",
"password" : "##smash1234",
"email" : "user7777@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2020-05-01T00:00:00",
"teamName" : "개발팀"
}
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: 165
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "startWork",
"value" : "입사일(2023-05-10)의 형태로 작성해주세요."
}
}
Curl
$ curl 'http://52.78.70.225:7777/join' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"name" : "권으뜸",
"password" : "##smash1234",
"email" : "user7777@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2020-05-01T00:00:00",
"teamName" : "개발팀"
}'
이메일 중복확인 ( 중복된 이메일 )
Request Example
POST /join/check HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 38
Host: 52.78.70.225:7777
{
"email" : "user1234@gmail.com"
}
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" : "ok",
"data" : true
}
Curl
$ curl 'http://52.78.70.225:7777/join/check' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"email" : "user1234@gmail.com"
}'
이메일 중복확인 ( 중복된 이메일 X )
Request Example
POST /join/check HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 41
Host: 52.78.70.225:7777
{
"email" : "user7777777@gmail.com"
}
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: 58
{
"status" : 200,
"msg" : "ok",
"data" : false
}
Curl
$ curl 'http://52.78.70.225:7777/join/check' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"email" : "user7777777@gmail.com"
}'
로그인 (성공)
Request Example
POST /login HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 67
Host: 52.78.70.225:7777
{
"email" : "User1@gmail.com",
"password" : "dltmdals123!"
}
Response Example
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJyb2xlIjoiVVNFUiIsImlkIjoxLCJleHAiOjE2ODQyMjE4Nzl9.ftrC7zH9muQQnV9XBsTl13bzdvl6TQJstdj0nuI0UJbjhy2Hh8H74zmOzFeJbi2cgqVmJ5PwclOUXOwOxWYzoQ
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: 304
{
"status" : 200,
"msg" : "ok",
"data" : {
"id" : 1,
"name" : "User1",
"email" : "User1@gmail.com",
"phoneNumber" : "010-1234-5678",
"profileImage" : null,
"startWork" : "2023-05-15",
"remain" : 20.0,
"teamName" : "개발팀",
"role" : "USER"
}
}
Curl
$ curl 'http://52.78.70.225:7777/login' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"email" : "User1@gmail.com",
"password" : "dltmdals123!"
}'
로그인 (실패)
Request Example
POST /login HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 65
Host: 52.78.70.225:7777
{
"email" : "User1@gmail.com",
"password" : "dltmdals1!"
}
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: 94
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "인증되지 않았습니다."
}
Curl
$ curl 'http://52.78.70.225:7777/login' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"email" : "User1@gmail.com",
"password" : "dltmdals1!"
}'
내 정보 조회 (성공)
Request Example
GET /auth/user/ HTTP/1.1
Host: 52.78.70.225:7777
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: 295
{
"status" : 200,
"msg" : "ok",
"data" : {
"id" : 5,
"teamName" : "admin",
"name" : "Ceo",
"email" : "Ceo@gmail.com",
"phoneNumber" : "010-1234-5678",
"remain" : 20.0,
"startWork" : "2023-05-15",
"profileImage" : null,
"role" : "CEO"
}
}
Curl
$ curl 'http://52.78.70.225:7777/auth/user/' -i -X GET
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
내 정보 조회 (실패: 인증안됨)
Request Example
GET /auth/user/ HTTP/1.1
Host: 52.78.70.225:7777
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: 94
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "인증되지 않았습니다."
}
Curl
$ curl 'http://52.78.70.225:7777/auth/user/' -i -X GET
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
개인정보 수정 (성공)
Request Example
POST /auth/user/1/upload HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 141
Host: 52.78.70.225:7777
{
"curPassword" : "dltmdals123!",
"newPassword" : "dltmdals1234!",
"phoneNumber" : "010-8765-4321",
"startWork" : "2023-05-13"
}
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: 157
{
"status" : 200,
"msg" : "ok",
"data" : {
"phoneNumber" : "010-8765-4321",
"startWork" : "2023-05-13",
"profileImage" : null
}
}
Curl
$ curl 'http://52.78.70.225:7777/auth/user/1/upload' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"curPassword" : "dltmdals123!",
"newPassword" : "dltmdals1234!",
"phoneNumber" : "010-8765-4321",
"startWork" : "2023-05-13"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
Parameter | Description |
---|---|
|
유저 id |
개인정보 수정 (실패: apipath의 id와 로그인한 유저id가 다름)
Request Example
POST /auth/user/2/upload HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 141
Host: 52.78.70.225:7777
{
"curPassword" : "dltmdals123!",
"newPassword" : "dltmdals1234!",
"phoneNumber" : "010-8765-4321",
"startWork" : "2023-05-13"
}
Response Example
HTTP/1.1 403 Forbidden
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: 85
{
"status" : 403,
"msg" : "forbidden",
"data" : "권한이 없습니다."
}
Curl
$ curl 'http://52.78.70.225:7777/auth/user/2/upload' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"curPassword" : "dltmdals123!",
"newPassword" : "dltmdals1234!",
"phoneNumber" : "010-8765-4321",
"startWork" : "2023-05-13"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
Parameter | Description |
---|---|
|
유저 id |
회원탈퇴 (성공)
Request Example
POST /auth/user/1/delete HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 67
Host: 52.78.70.225:7777
{
"email" : "User1@gmail.com",
"password" : "dltmdals123!"
}
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" : "ok",
"data" : null
}
Curl
$ curl 'http://52.78.70.225:7777/auth/user/1/delete' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"email" : "User1@gmail.com",
"password" : "dltmdals123!"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
Parameter | Description |
---|---|
|
유저 id |
회원탈퇴 (실패: 이메일 틀림)
Request Example
POST /auth/user/1/delete HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 73
Host: 52.78.70.225:7777
{
"email" : "user1234567@gmail.com",
"password" : "dltmdals123!"
}
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: 135
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "email",
"value" : "이메일이 틀렸습니다"
}
}
Curl
$ curl 'http://52.78.70.225:7777/auth/user/1/delete' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"email" : "user1234567@gmail.com",
"password" : "dltmdals123!"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
Parameter | Description |
---|---|
|
유저 id |
회원탈퇴 (실패: 비밀번호 틀림)
Request Example
POST /auth/user/1/delete HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 64
Host: 52.78.70.225:7777
{
"email" : "User1@gmail.com",
"password" : "smash1234"
}
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" : "password",
"value" : "비밀번호가 틀렸습니다"
}
}
Curl
$ curl 'http://52.78.70.225:7777/auth/user/1/delete' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"email" : "User1@gmail.com",
"password" : "smash1234"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
Parameter | Description |
---|---|
|
유저 id |
이미지 업로드 (성공)
Request Example
POST /auth/user/1/image HTTP/1.1
Content-Type: multipart/form-data;charset=UTF-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Host: 52.78.70.225:7777
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=profileImage; filename=test-image.jpg
Content-Type: multipart/form-data
test image content
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
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: 164
{
"status" : 200,
"msg" : "ok",
"data" : {
"profileImage" : "http://localhost:8080/upload/86be4802-e506-4fd1-9567-a6bdb17ea49f_test-image.jpg"
}
}
Curl
$ curl 'http://52.78.70.225:7777/auth/user/1/image' -i -X POST \
-H 'Content-Type: multipart/form-data;charset=UTF-8' \
-F 'profileImage=@test-image.jpg;type=multipart/form-data'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
Parameter | Description |
---|---|
|
유저 id |
관리자
사용자 권한 설정 페이지 조회 (성공)
Request Example
GET /auth/admin?teamName=&keyword=%EC%9D%B4&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: 3835
{
"status" : 200,
"msg" : "ok",
"data" : {
"teamList" : [ {
"teamId" : 1,
"teamName" : "개발팀",
"teamCount" : 7
}, {
"teamId" : 2,
"teamName" : "회계팀",
"teamCount" : 6
}, {
"teamId" : 3,
"teamName" : "마케팅팀",
"teamCount" : 7
}, {
"teamId" : 4,
"teamName" : "기획팀",
"teamCount" : 0
}, {
"teamId" : 5,
"teamName" : "admin",
"teamCount" : 1
} ],
"userList" : [ {
"userId" : 8,
"profileImage" : null,
"name" : "이경주",
"email" : "이경주@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2023-05-15",
"teamName" : "개발팀",
"role" : "USER"
}, {
"userId" : 13,
"profileImage" : null,
"name" : "이광조",
"email" : "이광조@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2023-05-15",
"teamName" : "회계팀",
"role" : "USER"
}, {
"userId" : 20,
"profileImage" : null,
"name" : "이백준",
"email" : "이백준@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2023-05-15",
"teamName" : "마케팅팀",
"role" : "USER"
}, {
"userId" : 5,
"profileImage" : null,
"name" : "이빛나",
"email" : "이빛나@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2023-05-15",
"teamName" : "개발팀",
"role" : "USER"
}, {
"userId" : 6,
"profileImage" : null,
"name" : "이산",
"email" : "이산@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2023-05-15",
"teamName" : "개발팀",
"role" : "USER"
}, {
"userId" : 19,
"profileImage" : null,
"name" : "이석주",
"email" : "이석주@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2023-05-15",
"teamName" : "마케팅팀",
"role" : "USER"
}, {
"userId" : 21,
"profileImage" : null,
"name" : "이석준",
"email" : "이석준@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2023-05-15",
"teamName" : "마케팅팀",
"role" : "USER"
}, {
"userId" : 2,
"profileImage" : null,
"name" : "이승민",
"email" : "이승민@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2023-05-15",
"teamName" : "개발팀",
"role" : "MANAGER"
}, {
"userId" : 14,
"profileImage" : null,
"name" : "이요한",
"email" : "이요한@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2023-05-15",
"teamName" : "회계팀",
"role" : "USER"
}, {
"userId" : 18,
"profileImage" : null,
"name" : "이원우",
"email" : "이원우@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2023-05-15",
"teamName" : "마케팅팀",
"role" : "USER"
}, {
"userId" : 3,
"profileImage" : null,
"name" : "이윤경",
"email" : "이윤경@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2023-05-15",
"teamName" : "개발팀",
"role" : "USER"
}, {
"userId" : 7,
"profileImage" : null,
"name" : "이인호",
"email" : "이인호@gmail.com",
"phoneNumber" : "010-1234-5678",
"startWork" : "2023-05-15",
"teamName" : "개발팀",
"role" : "USER"
} ],
"size" : 12,
"totalElements" : 14,
"totalPages" : 2,
"curPage" : 0,
"first" : true,
"last" : false,
"empty" : false
}
}
Curl
$ curl 'http://localhost:8080/auth/admin?teamName=&keyword=%EC%9D%B4&page=0' -i -X GET
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
사용자 권한 설정 페이지 조회 (실패)
Request Example
GET /auth/admin?teamName=&keyword=%EC%9D%B4&page=0 HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 403 Forbidden
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: 85
{
"status" : 403,
"msg" : "forbidden",
"data" : "권한이 없습니다."
}
Curl
$ curl 'http://localhost:8080/auth/admin?teamName=&keyword=%EC%9D%B4&page=0' -i -X GET
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
사용자 권한/팀 변경 (성공)
Request Example
PATCH /auth/admin/user HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 69
Host: localhost:8080
{
"userId" : 2,
"teamName" : "회계팀",
"role" : "USER"
}
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" : "ok",
"data" : null
}
Curl
$ curl 'http://localhost:8080/auth/admin/user' -i -X PATCH \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"userId" : 2,
"teamName" : "회계팀",
"role" : "USER"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
사용자 권한/팀 변경 (실패)
Request Example
PATCH /auth/admin/user HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 69
Host: localhost:8080
{
"userId" : 2,
"teamName" : "영업팀",
"role" : "USER"
}
Response Example
HTTP/1.1 404 Not Found
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: 94
{
"status" : 404,
"msg" : "notFound",
"data" : "존재하지 않는 팀입니다."
}
Curl
$ curl 'http://localhost:8080/auth/admin/user' -i -X PATCH \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"userId" : 2,
"teamName" : "영업팀",
"role" : "USER"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
팀 추가 (성공)
Request Example
POST /auth/admin/team HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 32
Host: localhost:8080
{
"teamName" : "영업팀"
}
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: 130
{
"status" : 200,
"msg" : "ok",
"data" : {
"teamId" : 6,
"teamName" : "영업팀",
"teamCount" : 0
}
}
Curl
$ curl 'http://localhost:8080/auth/admin/team' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"teamName" : "영업팀"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
팀 추가 (실패)
Request Example
POST /auth/admin/team HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 32
Host: localhost:8080
{
"teamName" : "개발팀"
}
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: 144
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "개발팀",
"value" : "이미 존재하는 팀입니다."
}
}
Curl
$ curl 'http://localhost:8080/auth/admin/team' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"teamName" : "개발팀"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
팀 삭제 (성공)
Request Example
DELETE /auth/admin/team/4 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" : "ok",
"data" : null
}
Curl
$ curl 'http://localhost:8080/auth/admin/team/4' -i -X DELETE
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
Parameter | Description |
---|---|
|
팀 id |
팀 삭제 (실패)
Request Example
DELETE /auth/admin/team/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: 151
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "1",
"value" : "팀에 소속된 인원이 1명 이상입니다."
}
}
Curl
$ curl 'http://localhost:8080/auth/admin/team/1' -i -X DELETE
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
Parameter | Description |
---|---|
|
팀 id |
스케줄
메인 페이지 조회 (성공)
Request Example
GET /auth/user/main 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: 1653
{
"status" : 200,
"msg" : "ok",
"data" : {
"scheduleList" : [ {
"scheduleId" : 1,
"user" : {
"userId" : 1,
"name" : "김사장",
"email" : "ceo1@gmail.com",
"teamName" : "개발팀",
"role" : "CEO",
"profileImage" : null
},
"type" : "DAYOFF",
"reason" : "쉬고싶음",
"startDate" : "2023-05-15T16:24:30",
"endDate" : "2023-05-15T16:24:30"
}, {
"scheduleId" : 2,
"user" : {
"userId" : 11,
"name" : "황민서",
"email" : "user11@gmail.com",
"teamName" : "인사팀",
"role" : "USER",
"profileImage" : null
},
"type" : "DAYOFF",
"reason" : "쉬고싶음",
"startDate" : "2023-05-15T16:24:30",
"endDate" : "2023-05-15T16:24:30"
}, {
"scheduleId" : 3,
"user" : {
"userId" : 3,
"name" : "최준기",
"email" : "user3@gmail.com",
"teamName" : "개발팀",
"role" : "USER",
"profileImage" : null
},
"type" : "DAYOFF",
"reason" : "쉬고싶음",
"startDate" : "2023-05-15T16:24:30",
"endDate" : "2023-05-15T16:24:30"
}, {
"scheduleId" : 5,
"user" : {
"userId" : 7,
"name" : "남궁훈",
"email" : "user7@gmail.com",
"teamName" : "개발팀",
"role" : "USER",
"profileImage" : null
},
"type" : "HALFOFF",
"reason" : "쉬고싶음",
"startDate" : "2023-05-15T16:24:30",
"endDate" : "2023-05-15T16:24:30"
} ]
}
}
Curl
$ curl 'http://localhost:8080/auth/user/main' -i -X GET
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
메인 페이지 조회 (실패)
Request Example
GET /auth/user/main 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: 94
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "인증되지 않았습니다."
}
Curl
$ curl 'http://localhost:8080/auth/user/main' -i -X GET
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
개인 스케줄 내역 조회 (성공)
Request Example
GET /auth/user/7/schedule 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: 1586
{
"status" : 200,
"msg" : "ok",
"data" : {
"scheduleList" : [ {
"scheduleId" : 11,
"startDate" : "2023-05-15T16:24:20",
"endDate" : "2023-05-15T16:24:20",
"type" : "DAYOFF",
"status" : "FIRST",
"reason" : "쉬고싶음",
"user" : {
"userId" : 7,
"name" : "남궁훈",
"email" : "user7@gmail.com",
"phoneNumber" : "010-1111-1111",
"startWork" : "2023-05-15",
"role" : "USER",
"teamName" : "개발팀",
"profileImage" : null
}
}, {
"scheduleId" : 6,
"startDate" : "2023-05-15T16:24:20",
"endDate" : "2023-05-15T16:24:20",
"type" : "DAYOFF",
"status" : "REJECTED",
"reason" : "쉬고싶음",
"user" : {
"userId" : 7,
"name" : "남궁훈",
"email" : "user7@gmail.com",
"phoneNumber" : "010-1111-1111",
"startWork" : "2023-05-15",
"role" : "USER",
"teamName" : "개발팀",
"profileImage" : null
}
}, {
"scheduleId" : 5,
"startDate" : "2023-05-15T16:24:20",
"endDate" : "2023-05-15T16:24:20",
"type" : "HALFOFF",
"status" : "APPROVED",
"reason" : "쉬고싶음",
"user" : {
"userId" : 7,
"name" : "남궁훈",
"email" : "user7@gmail.com",
"phoneNumber" : "010-1111-1111",
"startWork" : "2023-05-15",
"role" : "USER",
"teamName" : "개발팀",
"profileImage" : null
}
} ]
}
}
Curl
$ curl 'http://localhost:8080/auth/user/7/schedule' -i -X GET
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
Parameter | Description |
---|---|
|
유저 id |
개인 스케줄 내역 조회 (실패: 인증 안됨)
Request Example
GET /auth/user/1/schedule 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: 94
{
"status" : 401,
"msg" : "unAuthorized",
"data" : "인증되지 않았습니다."
}
Curl
$ curl 'http://localhost:8080/auth/user/1/schedule' -i -X GET
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
Parameter | Description |
---|---|
|
유저 id |
승인 요청 (성공)
Request Example
POST /auth/user/3/schedule HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 135
Host: localhost:8080
{
"startDate" : "2023-03-03T09:00:00",
"endDate" : "2023-03-03T12:00:00",
"type" : "HALFOFF",
"reason" : "병원 예약"
}
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" : "ok",
"data" : null
}
Curl
$ curl 'http://localhost:8080/auth/user/3/schedule' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"startDate" : "2023-03-03T09:00:00",
"endDate" : "2023-03-03T12:00:00",
"type" : "HALFOFF",
"reason" : "병원 예약"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
Parameter | Description |
---|---|
|
유저 id |
승인 요청 (실패)
Request Example
POST /auth/user/5/schedule HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 135
Host: localhost:8080
{
"startDate" : "2023-03-03T09:00:00",
"endDate" : "2023-03-03T12:00:00",
"type" : "HALFOFF",
"reason" : "병원 예약"
}
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: 161
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "5",
"value" : "ADMIN 계정으로는 승인 요청이 불가능합니다."
}
}
Curl
$ curl 'http://localhost:8080/auth/user/5/schedule' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"startDate" : "2023-03-03T09:00:00",
"endDate" : "2023-03-03T12:00:00",
"type" : "HALFOFF",
"reason" : "병원 예약"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
Parameter | Description |
---|---|
|
유저 id |
스케쥴 관리 페이지 (성공: 로그인한 유저가 사장)
Request Example
GET /auth/super/schedule 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: 1582
{
"status" : 200,
"msg" : "ok",
"data" : {
"scheduleList" : [ {
"scheduleId" : 9,
"startDate" : "2023-05-15T16:24:26",
"endDate" : "2023-05-15T16:24:26",
"type" : "DAYOFF",
"status" : "LAST",
"reason" : "쉬고싶음",
"user" : {
"userId" : 4,
"name" : "서재식",
"email" : "user4@gmail.com",
"phoneNumber" : "010-1111-1111",
"startWork" : "2023-05-15",
"role" : "USER",
"teamName" : "개발팀",
"profileImage" : null
}
}, {
"scheduleId" : 8,
"startDate" : "2023-05-15T16:24:26",
"endDate" : "2023-05-15T16:24:26",
"type" : "DAYOFF",
"status" : "LAST",
"reason" : "쉬고싶음",
"user" : {
"userId" : 9,
"name" : "김잔디",
"email" : "user9@gmail.com",
"phoneNumber" : "010-1111-1111",
"startWork" : "2023-05-15",
"role" : "USER",
"teamName" : "인사팀",
"profileImage" : null
}
}, {
"scheduleId" : 7,
"startDate" : "2023-05-15T16:24:26",
"endDate" : "2023-05-15T16:24:26",
"type" : "HALFOFF",
"status" : "LAST",
"reason" : "쉬고싶음",
"user" : {
"userId" : 8,
"name" : "최민우",
"email" : "manager8@gmail.com",
"phoneNumber" : "010-1111-1111",
"startWork" : "2023-05-15",
"role" : "MANAGER",
"teamName" : "인사팀",
"profileImage" : null
}
} ]
}
}
Curl
$ curl 'http://localhost:8080/auth/super/schedule' -i -X GET
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
스케쥴 관리 페이지 (성공: 로그인한 유저가 팀장)
Request Example
GET /auth/super/schedule 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: 583
{
"status" : 200,
"msg" : "ok",
"data" : {
"scheduleList" : [ {
"scheduleId" : 11,
"startDate" : "2023-05-15T16:24:22",
"endDate" : "2023-05-15T16:24:22",
"type" : "DAYOFF",
"status" : "FIRST",
"reason" : "쉬고싶음",
"user" : {
"userId" : 7,
"name" : "남궁훈",
"email" : "user7@gmail.com",
"phoneNumber" : "010-1111-1111",
"startWork" : "2023-05-15",
"role" : "USER",
"teamName" : "개발팀",
"profileImage" : null
}
} ]
}
}
Curl
$ curl 'http://localhost:8080/auth/super/schedule' -i -X GET
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
스케쥴 관리 페이지 (실패: 로그인한 유저의 role이 USER or ADMIN)
Request Example
GET /auth/super/schedule HTTP/1.1
Host: localhost:8080
Response Example
HTTP/1.1 403 Forbidden
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: 84
{
"status" : 403,
"msg" : "forbidden",
"data" : "권한이 없습니다"
}
Curl
$ curl 'http://localhost:8080/auth/super/schedule' -i -X GET
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
승인 및 거절하기 (성공)
Request Example
POST /auth/super/schedule HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 50
Host: localhost:8080
{
"scheduleId" : 7,
"status" : "APPROVED"
}
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: 131
{
"status" : 200,
"msg" : "ok",
"data" : {
"scheduleId" : 7,
"status" : "APPROVED",
"remain" : 19.5
}
}
Curl
$ curl 'http://localhost:8080/auth/super/schedule' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"scheduleId" : 7,
"status" : "APPROVED"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
승인 및 거절하기 (실패: 요청한 스케쥴을 승인거절할 수 없는 직급)
Request Example
POST /auth/super/schedule HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 50
Host: localhost:8080
{
"scheduleId" : 7,
"status" : "APPROVED"
}
Response Example
HTTP/1.1 403 Forbidden
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: 84
{
"status" : 403,
"msg" : "forbidden",
"data" : "권한이 없습니다"
}
Curl
$ curl 'http://localhost:8080/auth/super/schedule' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"scheduleId" : 7,
"status" : "APPROVED"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |
승인 및 거절하기 (실패: 요청한 스케쥴이 최종승인 또는 거절된 상태)
Request Example
POST /auth/super/schedule HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 50
Host: localhost:8080
{
"scheduleId" : 6,
"status" : "APPROVED"
}
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: 168
{
"status" : 400,
"msg" : "badRequest",
"data" : {
"key" : "status",
"value" : "이미 최종승인되었거나 거절된 스케쥴입니다"
}
}
Curl
$ curl 'http://localhost:8080/auth/super/schedule' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"scheduleId" : 6,
"status" : "APPROVED"
}'
Name | Description |
---|---|
|
인증헤더 Bearer token 필수 |