EndPoint
Search
도메인
Name
Type
URL
Request
Response
권한
User
POST
/api/users/signup
{
"account": "example_user",
"password": "example_password", "email": "user@example.com", "nickname": "a123", github: "github@example.com", description: "example"
}
{
"status": 201,
"message":
"User registered successfully",
"account": 123
}
모든 접속자
POST
/api/users/login
{
"account": "example_user",
"password": "example_password"
}
{
"status": 200,
"message": "Login success", "account": 123, "token": "example_token"
}
모든 접속자
POST
/api/users/logout
Request Cookies:
• refreshToken=[Refresh Token]
Success Response:
• Status Code: 200 OK
• Content-Type: application/json
• Body: MessageDTO
로그인한 접속자
DELETE
/api/users/signout
Request Headers:
• Authorization: Bearer [Access Token]
{
"status": 200,
"message": "유저가 탈퇴했습니다."
}
로그인한 유저
GET
/api/user/profile(users가아님)
Request Headers:
Authorization: Bearer [Access Token]
{"account": "[User Account]"}
POST
/api/users/refresh
Request Cookies:
• refreshToken=[Refresh Token]
Success Response:
• Status Code: 200 OK
• Content-Type: application/json
• Headers:
◦ Authorization: Bearer [New Access Token]
• Body: MessageDTO
Category
POST
/api/categories
{
"name": "게시판1-1번",
"parent": "게시판1번"
}
{ "id": 2,
"name": "게시판1-1번",
"depth": 2,
"parent": {
"id": 1,
"name": "게시판1번",
"parent": null,
"depth": 1 }
}
관리자
Product
POST
/api/category/{parentCategory_name}/{childCategory_id}/products
{
"title": "tpgns4283",
"content": "테스트글35",
"startAt": "2024-01-19T00:00:00",
"closedAt": "2024-01-22T00:00:00",
"rewardList" : [{
"rewardItem": "보상100",
"itemSize": 2
},
{
"rewardItem": "보상200",
"itemSize": 3
},
{
"rewardItem": "보상300",
"itemSize": 5
}]
}
{
"id": 1,
"title": "tpgns4283",
"content": "테스트글35",
"productLikeCnt": 0,
"category": "게시판1-1번",
"createAt": "2024-01-26T16:41:38.4334575",
"startAt": "2024-01-19T00:00:00",
"closedAt": "2024-01-22T00:00:00"
}
로그인한 유저
PATCH
/api/category/{parentCategory_name}/{childCategory_id}/products/{productId}/update
로그인 && product 생성한 유저
DELETE
/api/category/{parentCategory_name}/{childCategory_id}/products/{productId}/delete
로그인 && product 생성한 유저
GET
/api/category/{parentCategory_name}/{childCategory_id}/products/{productId}
모든 유저
Survey
POST
/api/category/{parentCategory_name}/{childCategory_id}/products/{product_id}/survey
{ "title": "12312sss3123", "content": "1231231", "questionList": [ { "text": "한줄평", "questionType": "SHORT_ANSWER" }, { "text": "평점", "questionType": "MULTI_CHOICE", "optionList": [ { "text": "1점" }, { "text": "2점" }, { "text": "3점" }, { "text": "4점" }, { "text": "5점" } ] }, { "text": "추천", "questionType": "MULTI_CHOICE", "optionList": [ { "text": "딱히" }, { "text": "그냥 그럼" }, { "text": "개추" } ] } ]}
{
"id": 1,
"title": "12312sss3123",
"createdAt": "2024-01-26T22:36:14.1362507",
"productId": 1
}
product 생성한 유저 && 로그인한 유저
GET
/api/category/{parentCategoryName}/{childCategoryId}/products/{productId}/survey/{surveyId}
{
"id": 1,
"title": "12312sss3123",
"createAt": "2024-01-26T22:36:14.136251",
"questionList": [
{
"id": 1,
"text": "한줄평",
"questionType": "SHORT_ANSWER",
"optionList": [],
"surveyId": 1
},
{
"id": 2,
"text": "평점",
"questionType": "MULTI_CHOICE",
"optionList": [
{
"id": 1,
"text": "1점",
"questionId": 2
},
{
"id": 2,
"text": "2점",
"questionId": 2
},
{
"id": 3,
"text": "3점",
"questionId": 2
},
{
"id": 4,
"text": "4점",
"questionId": 2
},
{
"id": 5,
"text": "5점",
"questionId": 2
}
],
"surveyId": 1
}
}
로그인 && 피드백 생성한 유저
Feedback
POST
/api/category/{parentCategoryName}/{childCategoryId}/products/{productId}/survey/{surveyId}/feedback
{
"feedbackDetailsList" : [{
"response": "응답1"
},
{
"response": "응답2"
},
{
"response": "응답3"
}]
}
{
"id": 1,
"createdAt": "2024-01-26T22:39:33.9930827",
"productId": 1,
"userId": 1
}
Comment
POST
/category/{parentCategory_name}/{childCategory_id}/products/{product_id}/comments
{
”content”: “댓글 내용”
}
{
”id”: comment_id
”content”: “댓글 내용”
}
로그인한 유저
PATCH
/category/{parentCategory_name}/{childCategory_id}/products/{product_id}/comments/{comment_id}
{
”content”: “댓글 내용”
}
{
”content”: “댓글 내용”
}
로그인한 유저
DELETE
/category/{parentCategory_name}/{childCategory_id}/products/{product_id}/comments/{comment_id}
{
”id”: comment_id
}
{
"status": 200,
"message": “Comment deleted successfully"
}
로그인한 유저
GET
/category/{parentCategory_name}/{childCategory_id}/products/{product_id}/comments
{
”content”: “댓글 내용1”
},
{
”content”: “댓글 내용2”
},
{
”content”: “댓글 내용3”
}
로그인한 유저
Profile
GET
/api/users/{account}
{
"profile":
{
"nickname": "example1",
"image": "이미지",
"description": example
}
}
로그인한 유저
PATCH
/api/users/{account}/update
{
”nickname”: “닉네임변경”
”password”: “비밀번호 변경”
”profile_img”: “이미지 변경”
}
{
"status": 200,
”nickname”: “닉네임변경”
”password”: “비밀번호 변경”
”profile_img”: “이미지 변경””
}
로그인한 유저
GET
/api/users/{account}/registeredProducts
Path Parameters: {
’account ’: User account
}
Request Headers:
• Authorization: Bearer [Access Token]
{
{
”title”: title1,
”createdAt”: createdAt1,
”closedAt”: closedAt1
},
{
”title”: title2,
”createdAt”: createdAt2,
”closedAt”: closedAt2
},
{
”title”: title3,
”createdAt”: createdAt3,
”closedAt”: closedAt3
}
}
로그인한 유저
GET
/api/users/{account}/participatedProducts
• Path Parameters:
◦ account (String): User account identifier
• Request Headers:
◦ Authorization: Bearer [Access Token]
{
{
”productTitle”: title1,
”createdAt”: createdAt1
},
{
”productTitle”: title2,
”createdAt”: createdAt2
}
}
GET
/api/users/{account}/averageStarRating
• Path Parameters:
◦ account (String): User account identifier
• Request Headers:
◦ Authorization: Bearer [Access Token]
{
”average”: (double) avg
}
POST
/api/users/{account}/ratingStar/{productId}/{feedbackId}
Path Parameters:
• account (String): User account identifier
• productId (Long): Product identifier
• feedbackId (Long): Feedback identifier
{
”message”: “별점이 3.5점 매겨졌습니다.”
”status”: 200
}
GET
/api/users/{account}/lotto/{productId}
• Path Parameters:
◦ account (String): User account identifier
◦ productId (Long): Product identifier
• Request Headers:
◦ Authorization: Bearer [Access Token]
{
{”account”: 추첨된유저1},
{”account”: 추첨된유저2},
{”account”: 추첨된유저3}
}
ProductLike
PATCH
/api/category/{parentCategory_name}/{childCategory_id}/products/{product_id}/product_like
{
”isProductLiked” : ”true”
}
로그인한 유저
CommentLike
PATCH
/api/category/{parentCategory_name}/{childCategory_id}/products/{product_id}/comments/{comment_id}/comment_like
{
”isCommentLiked”:”true”
}
로그인한 유저
BugReport
POST
/category/{parentCategory_name}/{childCategory_id}/products/{product_id}/report
{
”id”: “000001”,
”user_id”: ”taennos”
”report”: “신고 내용”,
”reportImg”: “버그_스크린샷.png”,
”createdAt”: ”2024-01-22T00:00:00”
}
{
”status”: 200,
”id”: product_id,
”user_id”: ”작성자”
”report”: “신고 내용”,
”reportImg”: “fileUrl”,
”createdAt”: ”생성 시간”
}
로그인한 유저
GET
/category/{parentCategory_name}/{childCategory_id}/products/{product_id}/report/{report_id}
{
”id”: product_id,
”user_id”: ”작성자”
”report”: “신고 내용”,
”reportImg”: “fileUrl”,
”createdAt”: ”생성 시간”
}
Product 생성한 유저