Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

스크랩 등록 API SPEC #91

Open
jminkkk opened this issue Sep 28, 2023 · 0 comments
Open

스크랩 등록 API SPEC #91

jminkkk opened this issue Sep 28, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@jminkkk
Copy link
Collaborator

jminkkk commented Sep 28, 2023

  • 유저가 특정 문서를 스크랩한다.

Request

HTTP Method URI
POST /scrap
  • Header
Name Value Description
Authorization JWT 인증용 JWT
  • RequestBody
{
  "memberId" : 0,
  "docsId" : 1
}

Response

Success

  • Status: 200 OK
  • Header
Name Value Description
content-type application/json  
{
  "success" : true,
  "response" : null
  "error": null
}

Fail

Status Description
400 BAD_REQUEST 잘 못 된 요청
401 UNAUTHORIZED 인증 실패
404 NOT_FOUND 문서 없음
500 Internal Server Error unknown server error

400 BAD_REQUEST

{
  "success" : false,
  "response" : null,
   "error": {
    "message": "잘못된 요청입니다.",
    "status": 400
  }
}

401 UNAUTHORIZED

{
  "success" : false,
  "response" : null,
   "error": {
    "message": "로그인이 필요한 기능입니다.",
    "status": 401
  }
}

404 NOT_FOUND

{
  "success" : false,
  "response" : null,
   "error": {
    "message": "존재하지 않는 문서입니다.",
    "status": 404
  }
}
@jminkkk jminkkk added the documentation Improvements or additions to documentation label Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant