유저(User)
팔로우 기능
인증 (로그인 / 로그아웃)
게시글(Post)
댓글
좋아요 기능
원본
| API |
Method |
URL |
Request |
Request 샘플 |
Response |
Response 샘플 |
HTTP 상태 코드 |
| 유저 생성 |
POST |
/api/users/signup |
- email: String(필수) |
|
|
|
|
- nickname: String(필수)
- password: String(필수) | {
”email": "test@email.com",
”nickname”: “test”,
"password": "1q2w3e4r!"
} | 생성된 유저 정보
- 유저 ID: Long
- 이메일: String
- 닉네임: String
- 생성일: LocalDate
- 수정일: LocalDate | {
”id": 1,
”email”: "test@email.com",
”nickname”: “test”,
"created_at": "2025-05-27",
”modified_at”: “2025-05-27”
} | 201 CREATED |
| 유저 닉네임 수정 | PATCH | /api/users/nickname | - nickname: String(필수)
- password: String(필수) | {
“nickname”: “test”,
“password”: “1q2w3e4r!”
} | 변경 확인 메세지 | “닉네임 변경” | 200 OK |
| 유저 비밀번호 수정 | PATCH | /api/users/password | - password : String(필수) ,
- newPassword : String(필수)
| {
"password" : "password123!" ,
"newPassword" "password13!"
} | 변경 확인 메세지 | “비밀번호 변경” | 200 OK |
| 유저 삭제 | DELETE | /api/users | - password : String(필수) | {
"password" : "password123!"
} | 삭제 확인 메세지 | “유저 삭제” | 200 OK |
| 로그인 | POST | /api/users/login | - email: String(필수)
- password: String(필수) | {
“email”: “test@email.com”,
“password”: “1q2w3e4r!”
} | 토큰 저장 | | 200 OK |
| 로그아웃 | POST | /api/users/logout | 없음 | 없음 | | | 200 OK- |
| 마이페이지 | GET | /api/me | 없음 | 없음 | 생성된 유저 정보
- 유저 ID: Long
- 이메일: String
- 닉네임: String
- 팔로우 수 : Long
- 생성일: LocalDate
- 수정일: LocalDate
- 게시글:List<String> | {
”id": 1,
”email”: "test@email.com",
”nickname”: “test”,
“followCount” : 50
"created_at": "2025-05-27",
”modified_at”: “2025-05-27”,
"posts": [
{
"title": “title of post”,
}
]
} | 200 OK |
| 유저 팔로우 | POST | /api/users/follow/{user_id} | user_id(로그인 유저) : Long (필수)
follow_id(팔로우 유저) : Long (필수) | {
“fromId”: 1,
“toId”: 2
} | 팔로우 확인 메세지 | “팔로우 확인” | 200 OK |
| 전체 조회 | GET | /api/posts | 요청 없음
- 페이징 처리 (게시글 10개)
- 생성일 기준 내림차순 | - | {
- 게시물 ID : Long
- 유저이름 : String
- 게시물 제목 : String
- 게시물 내용 : String
- 게시물 사진 : String
- 생성일 : DateTime
} | [{
”id” : 1,
”nickname” : “닉네임”,
”title” : “제목”,
”content” : “내용”,
”imageUrl “:”imgUrl”,
"created_at": "2025-05-27"
}] | 200 OK |
| 게시물 생성 | POST | /api/posts | 요청 Body
- title: String(필수)
- content : String(필수)
- imageUrl : String(필수) | {
”title” : “제목”
”content” : “내용”
”imageUrl “:”imgUrl”
} | 생성된 게시물 정보
{
- 게시물 ID : Long
- 게시물 제목 : String
- 게시물 내용 : String
- 게시물 사진 : String
- 생성일 : DateTime
- 수정일 : DateTime
} | {
”id” : 1,
”userId” : 1,
”title” : “제목”,
”content” : “내용”,
”imageUrl “:”imgUrl”,
"created_at": "2025-05-27",
”modified_at”: “2025-05-27”
} | 201 CREATED |
| 게시물 단건 조회 | GET | /api/posts/{post_id} | 요청 Param
post_id : Long(필수) | /api/posts/1 | 조회된 게시물 정보
- 닉네임
- 게시물 제목
- 게시물 내용
- 게시물 사진
- 생성일
- 수정일
{생성일 기준 얼마나 지났는지 넣을 예정} | {
”id” : 1,
”nickname” : “닉네임”,
”title” : “제목”,
”content” : “내용”,
”imageUrl “:”imgUrl”,
"created_at": "2025-05-27",
”modified_at”: “2025-05-27”
} | 200 OK |
| 게시물 수정 | PATCH | /api/posts/{post_id} | 요청 Param
- post_id: Long(필수)
요청 Body (3개중 1개)
- title: String
- content : String
- imageUrl : String | /api/posts/1
{
”title” : “제목”
”content” : “내용”
”imageUrl “:”imgUrl”
} | 게시물 변경 메세지 | “게시물 변경” | 200 OK |
| 게시물 삭제 | DELETE | /api/posts/{post_id} | 요청 Param
요청 Body
- password : String(필수) | /api/posts/1
{
”password” : “password123”
} | 삭제 확인 메세지 | “게시물 삭제” | 200 OK |