HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
역수직구조
역수직구조
/
Rest API 명세서
Rest API 명세서
Rest API 명세서

Rest API 명세서


User 관련 API회원가입 API 명세서로그인 API 명세서회원탈퇴 API 명세서유저 정보 업데이트 API 명세서포트폴리오 전체 조회 API 명세서포트폴리오 세부 조회 API 명세서Project 관련 APIProject 스키마 구조Project list 조회 APIProject create APIProject detail 조회 API해당 User의 Projects 조회 APIProject update API (부분 수정 가능)Project delete APIContest 관련 APIContest 스키마 구조Contest list 조회 APIContest create APIContest detail 조회 APIContest update API (부분 수정 가능)Contest delete APIContest 참가 APIContest 팀원 승인 APIContest 특정 user가 참여한 contest list 불러오기 API

User 관련 API


회원가입 API 명세서

URL : http://localhost:5000/users/signup [POST]
Header : 없음
Body :
{ "name": 이름(string), "email": 이메일(string), "password": 비밀번호(string) - 최소 5자 이상 "profileImage": 이미지 "phoneNumber":  핸드폰번호(string), "major": 전공(string), "university": 대학(string), "description": 설명(string) }
정상 반환 값 :
notion image

 

로그인 API 명세서

URL : http://localhost:5000/users/signin [POST]
Header : 없음
Body : {
"email": 이메일(string),
"password": 패스워드(string)
}
정상 반환 값 :
{
"token" : 토큰 값(string),
"userInfo": {
"로그인 유저 정보"
}
}

회원탈퇴 API 명세서

URL : http://localhost:5000/users/deleteUser [DELETE]
Header: Authenticate - Bearer 토큰값
ex) Postman 예시
notion image
Body : 없음
정상 반환 값 :
{
"success" : true,
"message" : "정상적으로 유저가 삭제되었습니다."
}

유저 정보 업데이트 API 명세서

URL : http://localhost:5000/users/updateUserInfo [PUT]
Header: Authenticate - Bearer 토큰값
Body : {
"업데이트 필드" : "업데이트 값"
( 업데이트 사항이 많을 경우 필드 여러개 )
}
정상 반환 값 :
{
"success": true,
"message" : "성공적으로 유저 정보가 업데이트 되었습니다."
}

포트폴리오 전체 조회 API 명세서

URL : http://localhost:5000/users/getPortfolios [GET]
정상 반환 값 :
notion image

포트폴리오 세부 조회 API 명세서

URL : http://localhost:5000/users/detailPortfolio/:id [GET]
정상 반환 값 :
notion image

 
 

Project 관련 API

Project 스키마 구조

const projectSchema = mongoose.Schema({ title: { //프로젝트 타이틀 type: String, maxlength: 100 }, participant: { //프로젝트 참여원 type: String }, thumbnail: { //대표이미지 (노드에서 스트링 -> 이미지 변환 작업 중) type: String }, role: { //프로젝트에 필요한 역할 type: String }, explanation: { //프로젝트 설명 type: String, maslength: 1000 }, user_id: { //유저 id type: String, } })

Project list 조회 API

URL : http://localhost:5000/projects/lists [GET]
Header : 없음
Body : 없음
response
notion image

Project create API

URL : http://localhost:5000/projects/create [POST]
Header : Authorization - Bearer 토큰값
notion image
Body :
{
"title": "second",
"participant": "second",
"endDate": "2021-06-22",
"thumbnail": "second",
"role": "second"
}
response
notion image

Project detail 조회 API

URL : http://localhost:5000/projects/lists/<id값> [GET]
ex) http://localhost:5000/projects/lists/60a546590bdeaa67938a4887
Header : 없음
Body : 없음
response
notion image
→ id값에 해당하는 객체만 조회

해당 User의 Projects 조회 API

URL : http://localhost:5000/projects/<user_id값> [GET]
ex) http://localhost:5000/projects/lists/60a546590bdeaa67938a4887
Header : 없음
Body : 없음
response
notion image
→ id값에 해당하는 객체만 조회

Project update API (부분 수정 가능)

URL : http://localhost:5000/projects/<id값> [PATCH]
ex) http://localhost:5000/projects/60a546590bdeaa67938a488
Header : Authorization - Bearer 토큰값
notion image
Body : (수정을 원하는 부분만 수정할 수도 있음)
notion image
response
notion image

Project delete API

URL : http://localhost:5000/projects/delete/<id값> [DELETE]
ex) http://localhost:5000/projects/delete/60a546590bdeaa67938a4887
Header : Authorization - Bearer 토큰값
notion image
Body : 없음
→ 삭제 후 전체 조회한 결과 (해당 객체 삭제 된 것 확인)
notion image

Contest 관련 API

Contest 스키마 구조

// 포지션 const positionSchema = mongoose.Schema({ positionName: { // 포지션 이름 type: String, default: "" }, recruitNumbers: { // 모집 인원 type: Number, default: 0 }, applyNumbers: { // 신청 인원 type: Number, default: 0 }, applyMembers: { // 신청 인원 목록 type: Array, default: [] }, confirmedNumbers: { // 승인 인원 type: Number, default: 0 }, confirmedMembers: { // 숭인 인원 목록 type: Array, default: [] } }); // 공모전 글 const contestSchema = mongoose.Schema({ contestName: { // 공모전 이름 type: String, maxlength: 50 }, hitCount: { // 조회수 type: Number, default: 0 }, title: { // 게시글 제목 type: String, maxlength: 50 }, author: { // 작성자 type: String }, postDate: { // 등록일자 type: Date, default: Date.now }, deadLine: { // 마감일자 type: Date, default: Date.now }, detail: { // 세부사항 type: String }, poster: { // 공모전 포스터 type: String }, category: { // 공모전 카테고리 type: String, default: "", }, organizer: { // 주최기관 type: String, maxlength: 100 }, closingStatus: { // 모집 마감여부 type: Boolean, default: false }, totalMembers: { // 전체 모집 인원 type: Number, default: 0 }, applyStatus: { // 신청 현황 totalApplyNumbers: { // 전체 신청 인원 type: Number, default: 0 }, totalConfirmedNumbers: { // 전체 승인 인원 type: Number, default: 0 } }, positions: [positionSchema] });

Contest list 조회 API

URL : http://localhost:5000/contests/lists [GET]
Header : 없음
Body : 없음
Response : 200 OK
notion image

Contest create API

URL : http://localhost:5000/contests/create [POST]
Header : Authentication - Bearer 토큰값
notion image
Request Body :
{ "contestName": "111yee111", "title": "222yee222", "author": "ningpop", "deadLine": "2018-03-29T00:00:00.000Z", "detail": "333yee333", "poster": "https://www.naver.com", "category": "IT,hackathon", "organizer": "likelion", "totalMembers": 5, "positions": [ { "positionName": "Back-end", "recruitNumbers": 2 }, { "positionName": "Front-end", "recruitNumbers": 2 }, { "positionName": "Designer", "recruitNumbers": 1 } ] }
Response : 201 Created
{ "applyStatus": { "totalApplyNumbers": 1, "totalConfirmedNumbers": 0 }, "hitCount": 0, "supportScale": "150억원", "category": "IT,hackathon", "homepage": "minsgy.dev", "closingStatus": false, "totalMembers": 5, "positions": [ { "positionName": "Back-end", "recruitNumbers": 2, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [] }, { "positionName": "Front-end", "recruitNumbers": 2, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [] }, { "positionName": "Designer", "recruitNumbers": 1, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [] } ], "_id": "60ccaf2e4be408da861272aa", "contestName": "qqqqqqqqqqqqqq111yee111", "title": "222yee222", "author": "ningpop", "deadLine": "2018-03-29T00:00:00.000Z", "detail": "333yee333", "poster": "https://www.naver.com", "organizer": "likelion", "postDate": "2021-06-18T14:35:26.624Z", "__v": 0 }

Contest detail 조회 API

URL : http://localhost:5000/contests/detail/<id값> [GET]
ex) http://localhost:5000/contests/detail/60ba226c79c95e01b5d620f1
Header : 없음
Body : 없음
Response : 200 OK
{ "applyStatus": { "totalApplyNumbers": 0, "totalConfirmedNumbers": 0 }, "hitCount": 0, "supportScale": "150억원", "category": "IT,hackathon", "homepage": "minsgy.dev", "closingStatus": false, "totalMembers": 5, "_id": "60ccd6e5f1e9b007401df731", "contestName": "qqqqqqqqqqqqqq111yee111", "title": "222yee222", "author": "ningpop", "deadLine": "2018-03-29T00:00:00.000Z", "detail": "333yee333", "poster": "https://www.naver.com", "organizer": "likelion", "postDate": "2021-06-18T17:24:53.823Z", "positions": [ { "positionName": "Front-end", "recruitNumbers": 2, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [], "_id": "60ccd6e5f1e9b007401df733" }, { "positionName": "Designer", "recruitNumbers": 1, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [], "_id": "60ccd6e5f1e9b007401df734" }, { "positionName": "Back-end", "recruitNumbers": 2, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [], "_id": "60ccd6e5f1e9b007401df732" } ], "__v": 3 }
→ id값에 해당하는 객체만 조회
→ Detail 조회시마다 Contest의 조회수(hitCount) 1씩 증가

Contest update API (부분 수정 가능)

URL : http://localhost:5000/contests/<id값> [PATCH]
ex) http://localhost:5000/contests/60ba226c79c95e01b5d620f1
Header : Authentication - Bearer 토큰값
notion image
Body : 원하는 부분만 수정 가능
수정 가능 필드 (클릭해서 열기)
  • contestName : 공모전 이름
  • title : 게시글 제목
  • deadLine : 마감일자
  • detail : 세부사항
  • poster : 포스터 이미지 링크
  • category : 공모전 카테고리(array)
  • organizer : 주최기관
  • totalMembers : 전체 모집 인원
notion image
Response : 200 OK
notion image

Contest delete API

URL : http://localhost:5000/contests/delete/<id값> [DELETE]
ex) http://localhost:5000/contests/delete/60ba226c79c95e01b5d620f1
Header : Authentication - Bearer 토큰값
notion image
Body : 없음
Response : 204 No Content

Contest 참가 API

URL : http://localhost:5000/contests/participate/<id값> [PATCH]
ex) http://localhost:5000/contests/participate/60ba268279c95e01b5d620f2
Header : Authentication - Bearer 토큰값
notion image
Body :
{ "positionName": "Back-end", "volunteer": "ningpoppppp" }
Response : 200 OK
{ "applyStatus": { "totalApplyNumbers": 2, "totalConfirmedNumbers": 1 }, "hitCount": 0, "supportScale": "150억원", "category": "IT,hackathon", "homepage": "minsgy.dev", "closingStatus": false, "totalMembers": 5, "_id": "60ccd6e5f1e9b007401df731", "contestName": "qqqqqqqqqqqqqq111yee111", "title": "222yee222", "author": "ningpop", "deadLine": "2018-03-29T00:00:00.000Z", "detail": "333yee333", "poster": "https://www.naver.com", "organizer": "likelion", "postDate": "2021-06-18T17:24:53.823Z", "positions": [ { "positionName": "Front-end", "recruitNumbers": 2, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [], "_id": "60ccd6e5f1e9b007401df733" }, { "positionName": "Designer", "recruitNumbers": 1, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [], "_id": "60ccd6e5f1e9b007401df734" }, { "positionName": "Back-end", "recruitNumbers": 2, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [], "_id": "60ccd6e5f1e9b007401df732" } ], "__v": 3 }

Contest 팀원 승인 API

URL : http://localhost:5000/contests/confirmMember/<id값> [PATCH]
ex) http://localhost:5000/contests/confirmMember/60ba268279c95e01b5d620f2
Header : Authentication - Bearer 토큰값
notion image
Body :
{ "positionName": "Back-end", "volunteer": "qwerqwer" }
Response : 201 Created
{ "applyStatus": { "totalApplyNumbers": 2, "totalConfirmedNumbers": 1 }, "hitCount": 0, "supportScale": "150억원", "category": "IT,hackathon", "homepage": "minsgy.dev", "closingStatus": false, "totalMembers": 5, "_id": "60ccd6e5f1e9b007401df731", "contestName": "qqqqqqqqqqqqqq111yee111", "title": "222yee222", "author": "ningpop", "deadLine": "2018-03-29T00:00:00.000Z", "detail": "333yee333", "poster": "https://www.naver.com", "organizer": "likelion", "postDate": "2021-06-18T17:24:53.823Z", "positions": [ { "positionName": "Front-end", "recruitNumbers": 2, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [], "_id": "60ccd6e5f1e9b007401df733" }, { "positionName": "Designer", "recruitNumbers": 1, "applyNumbers": 1, "applyMembers": [ "ningpoppppp" ], "confirmedNumbers": 0, "confirmedMembers": [], "_id": "60ccd6e5f1e9b007401df734" }, { "positionName": "Back-end", "recruitNumbers": 2, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 1, "confirmedMembers": [ "qwerqwer" ], "_id": "60ccd6e5f1e9b007401df732" } ], "__v": 3 }
→ 승인 시 memberList(승인된 유저)에 추가되고 membersNum(현재 팀원 수)은 1 증가

Contest 특정 user가 참여한 contest list 불러오기 API

URL : http://localhost:5000/contests/user/contestlist/<user의 id값> [GET]
ex) http://localhost:5000/contests/user/contestlist/60a528c56d86c42f18bc952c
Header : 없음
Body : 없음
Response : 200 OK
[ { "applyStatus": { "totalApplyNumbers": 0, "totalConfirmedNumbers": 1 }, "hitCount": 1, "supportScale": "150억원", "category": "IT,hackathon", "homepage": "minsgy.dev", "closingStatus": false, "totalMembers": 5, "_id": "60cce5255cdd360ccba6594e", "contestName": "민스기 놀리기", "title": "민스기 놀리기 공모전 참가하실 분 찾아요", "author": "ningpop", "deadLine": "2018-03-29T00:00:00.000Z", "detail": "민스기민스기민스기민스기", "poster": "https://noticon-static.tammolo.com/dgggcrkxq/image/upload/v1580888106/noticon/owcvyw4dggdylen2ql5w.gif", "organizer": "likelion", "postDate": "2021-06-18T18:25:41.174Z", "positions": [ { "positionName": "Back-end", "recruitNumbers": 2, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 1, "confirmedMembers": [ "test1@naver.com" ], "_id": "60cce5255cdd360ccba6594f" }, { "positionName": "Front-end", "recruitNumbers": 2, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [], "_id": "60cce5255cdd360ccba65950" }, { "positionName": "Designer", "recruitNumbers": 1, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [], "_id": "60cce5255cdd360ccba65951" } ], "__v": 0 }, { "applyStatus": { "totalApplyNumbers": 0, "totalConfirmedNumbers": 1 }, "hitCount": 0, "supportScale": "150억원", "category": "IT,hackathon", "homepage": "minsgy.dev", "closingStatus": false, "totalMembers": 5, "_id": "60cce5a65cdd360ccba6595a", "contestName": "율희공주 놀리기", "title": "율희공주 놀리기 공모전 참가하실 분 찾아요", "author": "ningpop", "deadLine": "2018-03-29T00:00:00.000Z", "detail": "김두부김두부김두부김두부", "poster": "https://noticon-static.tammolo.com/dgggcrkxq/image/upload/v1617087525/noticon/uedixpon6rcvcqbtuf0c.gif", "organizer": "likelion", "postDate": "2021-06-18T18:27:50.689Z", "positions": [ { "positionName": "Back-end", "recruitNumbers": 2, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [], "_id": "60cce5a65cdd360ccba6595b" }, { "positionName": "Front-end", "recruitNumbers": 2, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 1, "confirmedMembers": [ "test1@naver.com" ], "_id": "60cce5a65cdd360ccba6595c" }, { "positionName": "Designer", "recruitNumbers": 1, "applyNumbers": 0, "applyMembers": [], "confirmedNumbers": 0, "confirmedMembers": [], "_id": "60cce5a65cdd360ccba6595d" } ], "__v": 0 } ]