HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
프로그래머스 프론트엔드 데브코스 2기
프로그래머스 프론트엔드 데브코스 2기
/
📓
기동팀
/
💪
기동팀(CheQuiz)
/
✏️
API 명세서 v2
✏️

API 명세서 v2

ModelUsersProfiles(deprecated)QuizzesQuizPacksAcheivements (adv)CommentsLikes

Model

💡
Text Vs string
User (done)
{ "username": Text "email" : Email "provider": Text "password" : Password "resetPasswordToken": Text "confirmationToken" : Text "confirmed" : Boolean "blocked": Boolean "role" : Relation with Role (from: users-permissions) "profile" : Profile, // Relation with Profile }
Quiz (done)
{ "category": Text, "answerType": Enum // trueOrFalse | multipleChoice | shortAnswer "question": Text, "image": Text(optional), "answer": Text, "explanation": Text, // 정답 설명 "difficulty": Number, "importance": Number, + "correctCnt" : Number, + "incorrectCnt" : Number "profile" : Profile // Relation with Profile, 1:1 "quiz_pack": QuizPack[] // Relation with QuizPack, 다:1 "likes": Like[] // Relation with Like, "comments": Comment[] // Relation with Comment, }
QuizPack (done)
{ "title": Text, "tags": Tag[] // // Relation with Tag, '다:다' "description": Text // 퀴즈세트 설명 내용 "profile": Profile // Relation with Profile, '다:1', "quizzes": Quiz[], // Relation with Quiz, '1:다' }
Profile (done)
{ "nickname":Text, "points": Number, "users_permissions_user" : User, "achivements": Achievement[] // Relation with Achievement, '다:다' "quizzes": Quiz[], // Relation with Quiz, '1:다' "quiz_packs" :QuizPack[] // Relation with QuizPack, '1:다' => 자기가 만든 것 "likes": Like[], // Relation with Like, '1:다' "comments": String[], // Relation with Comment, '1:다' }
Achievement (done)
{ "title" : String "profiles": Profile[] // Relation with Profile, '다:다', }
Comment (done)
{ "content": Text, "author": Profile[] // Relation with Profile, '다:1', "quiz": Quiz, // Relation with Quiz, '다:1' }
Like (done)
{ "author": Profile[] // Relation with Profile, '다:1', "quiz": Quiz, // Relation with Quiz, '다:1' }
Tag (done)
{ "content" : Text "quiz_packs": QuizPack[] // Relation with QuizPack,'다:다' }
 

Users

Action

/auth/local

[ Description ]
  • 로그인
[ Parameters ]
  • Body
    • email : string
    • password : string
[ Responses ]
  • 200 OK
    • token : string
    • user : User
  • 401 Unauthorized

/auth/local/register

[ Description ]
  • 회원가입
[ Parameters ]
  • Body
    • email : string
    • password : string
    • nickname : string
[ Responses ]
  • 200 OK
    • token : string
    • user : User
  • 400 Bad Request

/users/me

[ Description ]
  • 인가
[ Parameters ]
  • Header
    • Authorization
[ Responses ]
  • 200 OK
    • token : string
    • user : User
  • 401 Unauthorized

/logout

 

Create

Read

/users

[ Description ]
  • 유저 전체 불러오기
[ Responses ]
  • 200 OK
    • User

/users/:id

[ Description ]
  • 유저 하나 불러오기
[ Responses ]
  • 200 OK
    • User
 

Update

/users

[ Description ]
  • 유저 정보(비밀번호)를 변경합니다.
[ Parameters ]
  • Header
    • Authorization
  • Body
    • password : string
[ Responses ]
  • 200 OK
    • user : User
  • 401 Unauthorized
 

Delete

Profiles(deprecated)

Action

Create

Read

/profiles

[ Description ]
  • 모든 유저의 프로필 정보를 불러옵니다.
[ Responses ]
  • 200 OK
    • Profile[]
  • 404 Not Found

/profiles/:id

[ Description ]
  • 특정 유저의 프로필 정보를 불러옵니다.
[ Responses ]
  • 200 OK
    • Profile
  • 404 Not Found
 

Update

/profiles/:id

[ Description ]
  • 특정 유저의 프로필 정보를 수정합니다.
[ Parameters ]
  • Header
    • Authorization
  • Body
    • nickname : string
    • points : number
[ Responses ]
  • 200 OK
    • token : string
    • user : User
  • 400 Bad Request (로그인은 되어있지만, 잘못된 정보가 들어갈 때)
  • 401 Unauthorized
 

Delete

Quizzes

Action

Create

/quizzes

[ Description ]
  • 퀴즈를 만듭니다.
[ Parameters ]
  • Header
    • Authorization
  • Body
    • title : string
    • explanation : string
    • difficulty : number
    • importance : number
    • answer : string
    • answerType : string
    • choices : string optional
    • image : string optional
    • category : string // ex) javascript
    • setId : string optional
[ Response ]
  • 200 OK
    • Quiz
  • 400 Bad Request
  • 401 Unauthorized
 

Read

/quizzes

[ Description ]
  • 모든 퀴즈를 불러옵니다.
[ Parameters ]
  • query
    • page : number optional
[ Response ]
  • 200 OK
    • Quiz[]
  • 400 Bad Request

/quizzes/random

[ Description ]
  • 랜덤한 퀴즈를 불러옵니다.
[ Parameters ]
  • query
    • count : number
[ Response ]
  • 200 OK
    • Quiz[]
  • 400 Bad Request

/quizzes/:id

[ Description ]
  • 퀴즈 상세 정보를 불러옵니다.
[ Response ]
  • 200 OK
    • Quiz[]
  • 400 Bad Request
 

Update (adv)

/quizzes/:id

[ Description ]
  • 퀴즈를 수정합니다.
[ Parameters ]
  • Header
    • Authorization
  • Body
    • title : string
    • explanation : string
    • difficulty : string
    • importance : string
    • answer : string
    • answerType : string
    • choices : string optional
    • imageUrl: string optional
    • category: string
[ Response ]
  • 200 OK
    • Quiz
  • 401 Unauthorized
 

Delete (adv)

/quizzes/:id

[ Description ]
  • 퀴즈를 삭제합니다.
[ Parameters ]
  • Header
    • Authorization
[ Response ]
  • 200 OK
  • 401 Unauthorized
 

QuizPacks

Action

Create

/quiz-packs

[ Description ]
  • 퀴즈세트를 만듭니다.
[ Parameters ]
  • Header
    • Authorization
  • Body
    • title : string
    • tags : Tag[]
    • description : string
[ Response ]
  • 200 OK
    • QuizPack
  • 401 Unauthorized
 

Read

/quiz-packs

[ Description ]
  • 모든 퀴즈 세트를 가져옵니다.
[ Parameters ]
  • query
    • page : number optional
[ Response ]
  • 200 OK
    • QuizPack[]
  • 400 Bad Request

/quizpacks/:id

[ Description ]
  • 퀴즈 세트 상세 정보를 불러옵니다.
[ Response ]
  • 200 OK
    • QuizPack
  • 400 Bad Request
 

Update (adv)

/quizpacks/:id

[ Description ]
  • 퀴즈세트를 수정합니다.
[ Parameters ]
  • Header
    • Authorization
  • Body
    • title : string
    • tag : string[]
    • description : string
[ Response ]
  • 200 OK
    • QuizPack
  • 401 Unauthorized
 

Delete (adv)

/quizpacks/:id

[ Description ]
  • 퀴즈세트를 삭제합니다.
  • 퀴즈는 남아있음 → SET_NULL
[ Parameters ]
  • Header
    • Authorization
[ Response ]
  • 200 OK
  • 401 Unauthorized
 
 

Acheivements (adv)

Action

Create

Read

/achievements

[ Description ]
모든 업적을 가져옵니다.
[ Parameters ]
  • query
    • page: number optional
[ Response ]
  • 200 OK
    • Achievement[]
  • 400 Bad Request

/achievements/:id

[ Description ]
업적의 상세 정보를 불러옵니다.
[ Response ]
  • 200 OK
    • Achievement
  • 400 Bad Request
 

Update

Delete

Comments

Action

Create

/comments

[ Description ]
  • 댓글을 작성합니다.
[ Parameters ]
  • Header
    • Authorization
  • Body
    • quizId : string
    • content : string
[ Response ]
  • 200 OK
    • Comment
  • 401 Unauthorized
 

Read

/comments

[ Description ]
  • 모든 댓글을 불러옵니다.
[ Parameters ]
  • Header
    • Authorization
  • Body
    • content : string
[ Response ]
  • 200 OK
    • Comment[]
  • 401 Unauthorized
 

Update (adv)

/comments/:id

[ Description ]
  • 댓글을 수정합니다.
[ Parameters ]
  • Header
    • Authorization
  • Body
    • quizId : string
    • content : string
[ Response ]
  • 200 OK
    • Quiz
  • 401 Unauthorized
 

Delete

/comments/:id

[ Description ]
  • 퀴즈를 삭제합니다.
[ Parameters ]
  • Header
    • Authorization
[ Response ]
  • 200 OK
  • 401 Unauthorized
 

Likes

Action

Create

/likes

[ Description ]
  • 좋아요를 생성합니다.
[ Parameters ]
  • Header
    • Authorization
  • Body
    • quizId : string
[ Response ]
  • 200 OK
    • Like
  • 400 Bad Request
 

Read (adv)

/likes

[ Description ]
  • 모든 좋아요를 가져옵니다.
[ Parameters ]
  • query
    • page: number optional
[ Response ]
  • 200 OK
    • Like[]
  • 400 Bad Request

/likes/:id

[ Description ]
  • 좋아요 정보를 불러옵니다.
[ Response ]
  • 200 OK
    • Like
  • 400 Bad Request
 

Update

Delete

/likes/:id

[ Description ]
  • 좋아요를 삭제합니다.
[ Parameters ]
  • Header
    • Authorization
[ Response ]
  • 200 OK
  • 400 Bad Request