-
Notifications
You must be signed in to change notification settings - Fork 1
API 정리
- Postman 요청 API
- 모든 요청에 Authorization: Bearer {jwt} 헤더 포함해야 합니다.
- Issue 추가
- Issue 조회
- Issue 수정
- Issue에 Label 추가
- Issue에 Label 삭제
- Issue에 Assignee 추가
- Issue에 Assignee 제거
- Issue에 Milestone 추가
- Issue에 Milestone 제거
FE에서 깃허브 로그인 시에 클라이언트에서 보여줄 주소
https://github.com/login/oauth/authorize?client_id=c39689919134be7915cf&redirect_uri=http://localhost:3000/login
code를 받아서 서버로 보내주실 주소
GET /api/login/github/web?code=
iOS에서 깃허브 로그인 시 주소
https://github.com/login/oauth/authorize?client_id=8592b1a7529d99516dd5&redirect_uri=issue-tracker://login
code를 받아서 서버로 보내주실 주소
GET /api/login/github/ios?code=
GET /api/users
Response
{
"users": [
{
"id": "853ee3ba-cbed-4f44-a586-2b25f1ebaee8",
"nickName": "Dami Kim",
"imageUrl": "https://avatars.githubusercontent.com/u/56783350?v=4"
}
]
}
GET /api/labels
Response
{
"labels": [
{
"id": "4b1b887f-c16f-4eca-8694-0986802907db",
"name": "feature",
"description": "새 기능",
"colors": {
"backgroundColor": "#000000",
"textColor": "#FFFFFF"
}
},
{
"id": "5dd4f7b3-9ef5-490d-8f27-50bee346f6f8",
"name": "documentation",
"description": "문서 작성",
"colors": {
"backgroundColor": "#FF0000",
"textColor": "#FFFFFF"
}
}
]
}
POST /api/labels
Request Body
{
"name": "feature",
"description": "새 기능",
"colors" : {
"backgroundColor" : "#000000",
"textColor" : "#FFFFFF"
}
}
Response Body
{
"label": {
"id": "6e828faa-cc91-4892-bbb6-879feeb3aa10",
"name": "feature",
"description": "새 기능",
"colors": {
"backgroundColor": "#000000",
"textColor": "#FFFFFF"
}
}
}
PUT /api/labels/:labelId
ex)
PUT /api/labels/6e828faa-cc91-4892-bbb6-879feeb3aa10
Request Body
{
"name": "feature",
"description": "새로운 기능",
"colors" : {
"backgroundColor" : "#000000",
"textColor" : "#FFFFFF"
}
}
Response Body
{
"label": {
"id": "6e828faa-cc91-4892-bbb6-879feeb3aa10",
"name": "feature",
"description": "새로운 기능",
"colors": {
"backgroundColor": "#000000",
"textColor": "#EEEEEE"
}
}
}
DELETE /api/labels/:labelId
ex) DELETE /api/labels/6e828faa-cc91-4892-bbb6-879feeb3aa10
Response : 204 No Content
GET /api/milestones
{
"milestones": [
{
"id": "fc6dea95-36b7-44f7-bec6-75f2978a72d0",
"title": "[BE] 마일스톤 기능",
"description": "마일스톤은 추가/조회/수정/삭제할 수 있다.",
"dueDate": "2021-06-10"
},
{
"id": "80a01ae0-412d-46b0-8a1b-394c6c4f483d",
"title": "[BE] 라벨 기능",
"description": "라벨은 추가/조회/수정/삭제할 수 있다.",
"dueDate": "2021-06-11"
}
]
}
POST /api/milestones
Request Body
{
"title" : "[BE] 마일스톤 기능",
"description" : "마일스톤은 추가/조회/수정/삭제할 수 있다.",
"dueDate" : "2021-06-10"
}
Response Body
{
"milestone" : {
"id": "fc6dea95-36b7-44f7-bec6-75f2978a72d0",
"title": "[BE] 마일스톤 기능",
"description": "마일스톤은 추가/조회/수정/삭제할 수 있다.",
"dueDate": "2021-06-10"
}
}
PUT /api/milestones/:milestoneId
ex)
PUT /api/milestones/fc6dea95-36b7-44f7-bec6-75f2978a72d0
Request Body
{
"title" : "[BE] 마일스톤 기능",
"description" : "마일스톤을 추가 수정 삭제 전체조회할 수 있다.",
"dueDate" : "2021-06-11"
}
Response Body
{
"milestone": {
"id": "fc6dea95-36b7-44f7-bec6-75f2978a72d0",
"title": "[BE] 마일스톤 기능",
"description": "마일스톤을 추가 수정 삭제 전체조회할 수 있다.",
"dueDate": "2021-06-11"
}
}
DELETE /api/milestones/:milestoneId
ex) DELETE /api/milestones/fc6dea95-36b7-44f7-bec6-75f2978a72d0
Response : 204 No Content
POST /api/issues
Request body
{
"title" : "[BE] Issue 등록",
"comment" : "코멘트",
"assigneeIds" : ["e33d0533-db20-4e46-b0d0-61cb2217c09e"],
"labelIds" : ["6f5a0331-2d8c-40b8-a869-bd777858d631"],
"milestoneId" : "dd3a87c5-b290-4794-9914-29df1f58533d"
}
Response Body
{
"issue": {
"id": 3,
"author": {
"id": "e33d0533-db20-4e46-b0d0-61cb2217c09e",
"nickName": "K",
"imageUrl": "https://avatars.githubusercontent.com/u/75236235?v=4",
"githubId": "PizzaCola-K",
"appleId": null
},
"title": "[BE] Issue 등록",
"createdAt": "2021-06-16T14:21:34.5047137",
"labels": [
{
"id": "6f5a0331-2d8c-40b8-a869-bd777858d631",
"name": "documentation",
"description": "문서화",
"colors": {
"backgroundColor": "#000000",
"textColor": "#FFFFFF"
}
}
],
"assignees": [
{
"id": "e33d0533-db20-4e46-b0d0-61cb2217c09e",
"nickName": "K",
"imageUrl": "https://avatars.githubusercontent.com/u/75236235?v=4",
"githubId": "PizzaCola-K",
"appleId": null
}
],
"milestone": {
"id": "dd3a87c5-b290-4794-9914-29df1f58533d",
"title": "제목",
"description": "상세 내용",
"dueDate": "2021-06-10"
},
"comments": [
{
"id": "7ed0f3bb-b139-472e-afe9-a3c3c5b6914d",
"issueId": 3,
"author": {
"id": "e33d0533-db20-4e46-b0d0-61cb2217c09e",
"nickName": "K",
"imageUrl": "https://avatars.githubusercontent.com/u/75236235?v=4",
"githubId": "PizzaCola-K",
"appleId": null
},
"createdAt": "2021-06-16T14:21:34.5207118",
"content": "코멘트"
}
],
"open": true
}
}
GET /api/issues
Response Body
{
"issues" : [{}, {}]
}
GET /api/issues/:issueId
Response Body
{
"issue" : {
...
}
}
타이틀을 수정할 때나, open / close 상태를 수정할 때 사용합니다.
PUT /api/issues/:issueId
Request Body
{
"title": "제목",
"open" : true | false
}
Response Body
{
"issue": {
}
}
POST /api/issues/:issueId/labels
Request Body
{
"labelId" : "uuid"
}
Response Body
204 NO CONTENT
DELETE /api/issues/:issueId/labels/:labelId
Response Body
204 NO CONTENT
POST /api/issues/:issueId/assignees
Request Body
{
"assigneeId" : "uuid"
}
Response Body 204 NO CONTENT
DELETE /api/issues/:issueId/assignees/:assigneeId
Response Body
204 NO CONTENT
POST /api/issues/:issueId/milestone
{
"milestoneId": "uuid"
}
Response Body
204 NO CONTENT
DELETE /api/issues/:issueId/milestone
Response Body 204 NO CONTENT
POST /api/comments
Request Body
{
"content" : "내용",
"issueId" : 1
}
Response Body
{
"id" : "uuid",
"issueId" : 1,
"author" : User,
"createdAt" : 시간,
"content" : "내용"
}
PUT /api/comments/id
Request Body
{
"content" : "수정사항1",
"issueId" : 1
}
Response Body
{
"id" : "uuid",
"issueId" : 1,
"author" : User,
"createdAt" : 시간,
"content" : "수정사항1"
}