Skip to content

통합 API 문서

노을 edited this page Jul 6, 2021 · 1 revision

백엔드에게 필요한 API 를 요청하기 위해, 요구사항을 정리하는 문서

자신이 어떤 HTTP 요청으로, 어떤 응답을 받고 싶은지 적어주시면 노을이 그대로 만들어 드립니다!

조회(GET), 추가(POST), 수정(PUT), 삭제(DELETE)



조회

GET 전체 마일스톤 조회

  • {{ip}}/api/web/milestones

GET 이슈 조회

  • {{ip}}/api/web/issues?status=close&milestone=1&writer=test&created=2021-06-18

PARAMS
status all, open, close
milestone 마일스톤ID
writer 이슈 작성자 아이디
created 이슈 생성일

GET 이슈 옵션 조회 - 담당자, 레이블, 마일스톤 리스트

  • {{ip}}/api/web/issues/form

GET 이슈 상세 정보 조회

  • {{ip}}/api/web/issues/{이슈번호}

GET 특정 이슈 댓글 조회

  • {{ip}}/api/web/issues/{이슈번호}/comments

GET 전체 라벨 조회

  • {{ip}}/api/web/labels

생성

  • 생성 API 요청 시 아무런 응답이 없다면 정상적으로 동작한 것입니다.

POST Issue 추가

  • {{ip}}/api/web/issues
HEADERS
Authorization Bearer jwtToken
Content-Type application/json
  • Body
{
  "title": "이슈 생성 제목",
  "comment": "이슈 내용",
  "milestoneId": 1
}

POST Label 추가

  • {{ip}}/api/web/labels
  • BODY
{
    "title": "제목",
    "description":"설명",
    "backgroundColor": "white",
    "textColor": "black"
}

POST Milestone 추가

  • {{ip}}/api/web/milestones
  • Body
{
    "title": "마일스톤 제목",
    "description": "마일스톤 설명"
}

POST Comment 추가

  • {{ip}}/api/web/issues/{이슈번호}/comments
  • BODY
{
    "content":"코멘트를 달았습니다."
}

수정

  • 수정 API 요청 시 아무런 응답이 없다면 정상적으로 동작한 것입니다.

PUT Issue 수정

  • {{ip}}/api/web/issues/{이슈번호}
HEADERS
Authorization Bearer jwtToken
Content-Type application/json
  • BODY
{
  "title": "수정할 이슈 제목",
  "comment": "수정할 이슈 내용",
  "milestoneId": 2
}

PUT Assignee 수정

  • {{ip}}/api/web/issues/{이슈번호}/assignees

  • Body

  • 담당자를 아무도 선택하고 싶지 않는 경우

{
    "assigneeIds": [null]
}
  • 담당자 선택
{
    "assigneeIds": ["neo","tami"]
}

PUT Issue에 있는 Label 수정

  • {{ip}}/api/web/issues/{이슈번호}/labels
  • Body
  • 라벨을 아무것도 선택하고 싶지 않는 경우
{
    "labelIds": [null]
}
  • 라벨 선택
{
    "labelIds": [1,2]
}

PUT Label 수정

  • {{ip}}/api/web/labels/{라벨번호}
  • Body
- BODY
{
    "title": "바뀐 라벨 제목",
    "description":"바뀐 라벨 설명",
    "backgroundColor": "changed_white",
    "textColor": "changed_black"
}

PUT Milestone 수정

  • {{ip}}/api/web/milestones/{마일스톤 번호}

  • BODY

{
    "title": "바뀐 마일스톤 제목",
    "description": "바뀐 마일스톤 설명"
}

PUT Comment 수정

  • {{ip}}/api/web/issues/{이슈번호}/comments/{코멘트 번호}
  • BODY
{
    "content":"바뀐 코멘트"
}