/api/auth/login
์ฌ์ฉ์๊ฐ ๋ก๊ทธ์ธ์ ํ๋ฉด Jwt ๋ฅผ ๋ฐ๊ธ๋ฐ๋๋ค.
-
{
"username": "๋ก๊ทธ์ธ์์ด๋", (String)
"password": "๋น๋ฐ๋ฒํธ", (String)
}
204 OK
ํค๋: Jwt ์์ธ์ค ํ ํฐ,
์ฟ ํค: Refresh ํ ํฐ
/api/auth/logout
๋ธ๋ผ์ฐ์ ์์ ์๋ฒ๋ก ํ ํฐ์ ๋ณด๋ธ ํ ํ ํฐ ์ญ์
Authorization - Jwt
-
204 NO_CONTENT
/api/auth/reissue
Refresh ํ ํฐ์ผ๋ก ์์ฒญํ์ฌ Refresh, Access ํ ํฐ ์ฌ๋ฐ๊ธ
์ฟ ํค: Refresh ํ ํฐ
204 OK
ํค๋: Jwt ์์ธ์ค ํ ํฐ,
์ฟ ํค: Refresh ํ ํฐ
400
์ ํจํ์ง ์์ ํ ํฐ์ผ๋ก ์์ฒญ์
์๋ฌ์๋ต ํฌ๋งท์ผ๋ก ์์ฑ
/api/auth/email/verify
-
-
-
-
ํ์ ๋ฐ ์ธ์ฆ
/api/member/signup
์๋ก์ด ์ฌ์ฉ์๊ฐ ID์ ๋น๋ฐ๋ฒํธ์ ํํ๋ก ์๋น์ค์ ๊ฐ์
ํ ์ ์์ด์ผ ํฉ๋๋ค.
-
{
"username": "๋ก๊ทธ์ธ์์ด๋", (String)
"password": "๋น๋ฐ๋ฒํธ", (String)
"nickname": "๋๋ค์"
}
201 CREATED
/api/member/username/verify?username={username}
์์ด๋ ์ค๋ณต๊ฒ์ฌ
query string
username - ์์ด๋
204 NO_CONTENT
409 - ์์ด๋๊ฐ ์กด์ฌํ๋ ๊ฒฝ์ฐ
ํ๋กํ ๊ด๋ฆฌ
/api/member/nickname/verify
200 OK
409 - ๋๋ค์์ด ์กด์ฌํ๋ ๊ฒฝ์ฐ
/api/member/{memberId}
Authorization - Jwt
{
"nickname": "๋๋ค์", (String)
"introduce": "ํ์ค์๊ฐ", (String)
"password": "๋น๋ฐ๋ฒํธ", (String)
"confirmPassword": "๋น๋ฐ๋ฒํธ ํ์ธ" (String)
}
200 OK
{
"nickname": "๋๋ค์", (String)
"introduce": "ํ์ค์๊ฐ", (String)
}
400 - ์
๋ ฅํ ๋น๋ฐ๋ฒํธ, ๋น๋ฐ๋ฒํธ ํ์ธ ๋ค๋ฆ
403 - ์์ ๊ถํ ์์
404 - memberId ํ๋กํ ์์
/api/member/{memberId}
path variable
memberId - ํ์ ID
{
"nickname": "๋๋ค์", (String)
"introduce": "ํ์ค์๊ฐ", (String)
}
/api/member/{memberId}/password
Authorization - Jwt
{
โpasswordโ:โ๋น๋ฐ๋ฒํธโ
}
200OK
{
โpasswordโ: โ๋น๋ฐ๋ฒํธโ
}
ํผ๋
/api/post
-
200 OK
[{
โcategoryโ : โ์นดํ
๊ณ ๋ฆฌโ,
โnicknameโ : โ์์ฑ์โ,
โtitleโ : โ๊ฒ์๋ฌผ ์ ๋ชฉโ,
โcontentโ : โ๋ด์ฉโ,
โimageโ: โimg-urlโ,
โlikesโ : 123,
โcommentsโ : [{}, {}],
โcreated_date_timeโ : โ2023-07-26โ,
โmodified_date_timeโ : โ2023-07-26โ
},
{
โcategoryโ : โ์นดํ
๊ณ ๋ฆฌ2โ,
โnicknameโ : โ์์ฑ์2โ,
โtitleโ : โ๊ฒ์๋ฌผ ์ ๋ชฉ2โ,
โcontentโ : โ๋ด์ฉ2โ,
โimageโ: โimg-url2โ,
โlikesโ : 13,
โcommentsโ : [{}, {}],
โcreated_date_timeโ : โ2023-07-27โ,
โmodified_date_timeโ : โ2023-07-27โ
}]
๊ฒ์๋ฌผ
/api/post
Authorization - Jwt
{
โtitleโ:โ์ ๋ชฉโ
โcontentsโ:โ๋ด์ฉโ
โcategoryโ: โ์นดํ
๊ณ ๋ฆฌ ์ข
๋ฅโ
}
200 OK
{
โpost_idโ: โidโ
โcategoryโ : โ์นดํ
๊ณ ๋ฆฌโ,
โnicknameโ : โ์์ฑ์โ,
โtitleโ : โ๊ฒ์๋ฌผ ์ ๋ชฉโ,
โcontentโ : โ๋ด์ฉโ,
โimageโ: [
{
โimg-urlโ:โurlโ,
โfileTypeโ: โํ์ผ ํ์
โ
}
]
โcreated_date_timeโ : โ2023-07-26โ,
}
/api/post/{id}
200 OK
{
โpost_idโ: โidโ
โcategoryโ : โ์นดํ
๊ณ ๋ฆฌโ,
โnicknameโ : โ์์ฑ์โ,
โtitleโ : โ๊ฒ์๋ฌผ ์ ๋ชฉโ,
โcontentโ : โ๋ด์ฉโ,
โimageโ: [
{
โimg-urlโ:โurlโ,
โfileTypeโ: โํ์ผ ํ์
โ
}
]
โlikesโ : 123,
โcreated_date_timeโ : โ2023-07-26โ,
โmodified_date_timeโ : โ2023-07-26โ
โcommentsโ : [
{
โcommentโ: โ์ฝ๋ฉํธโ
, โnicknameโ: โ๋๋ค์โ
}
]
โlikeโ:[
]
}
/api/post/{id}
Authorization - Jwt
{
โtitleโ:โ์ ๋ชฉโ
โcontentsโ:โ๋ด์ฉโ
}
200 OK
{
โpost_idโ: โidโ
โcategoryโ : โ์นดํ
๊ณ ๋ฆฌโ,
โnicknameโ : โ์์ฑ์โ,
โtitleโ : โ๊ฒ์๋ฌผ ์ ๋ชฉโ,
โcontentโ : โ๋ด์ฉโ,
โimageโ: [โimg-urlโ]
โcreated_date_timeโ : โ2023-07-26โ,
โmodified_date_timeโ : โ2023-07-26โ
}
/api/post/{postid}
Authorization - Jwt
200 OK
๋๊ธ
/api/post/{postId}/comment
Authorization - Jwt
{
โcommentโ: โcommentโ
}
201 CREATE
/api/post/{postId}/comment/{commentId}
Authorization - Jwt
-
200 OK
{
โcommentโ : โ๋ด์ฉโ,
โwriterโ : โ์์ฑ์ ๋๋ค์โ,
โcreated_date_timeโ : โ์์ฑ์ผโ
}
/api/post/{postId}/comment/{commentId}
Authorization - Jwt
{
โcommentโ: โcommentโ
}
200 OK
/api/post/{postId}/comments/{commentId}
Authorization - Jwt
-
204 NO_CONTENT
์ข์์
/api/post/{postsId}/like
Authorization - Jwt
201 CREATED
/api/post/{postsId}/like
Authorization - Jwt
-
204 NO_CONTENT
ํ์ผ
/api/post/{postId}/file
Authorization - Jwt
{
โfileโ : โํ์ผโ
}
200 OK
/api/post/{postId}/file
Authorization - Jwt
-
204 NO_CONTENT
/api/member/{memberId}/follow
Authorization - Jwt
-
204 NO_CONTENT
ํ๋ก์ฐ
/api/member/{memberId}/follow
Authorization - Jwt
-
201 OK
/api/member/{memberId}/follow
-
200 OK
{
โfollowersโ : [
{
โmemberIdโ: โidโ,
โnicknameโ: โ๋๋ค์โ
}โฆ
]
}