Backend API 명세 - boostcamp-2020/IssueTracker-13 GitHub Wiki
| 의도 | method | URL | query params | request(body) | response(body) |
|---|---|---|---|---|---|
| 회원가입 | POST | /api/auth/signUp | - | (1) | (3) |
| 로그인 | POST | /api/auth/signIn | - | (2) | (3) |
| GitHub 회원가입 | GET | /api/auth/github | - | - | GitHub 인증페이지 리디렉션 |
| GitHub 로그인 | GET | /api/auth/github | authtoken | - | (3) |
| 번호 | password | |
|---|---|---|
| 1 | [email protected] | junsushin-devpw |
| 2 | [email protected] | parkdit94pw |
(1) - 회원가입 request body
//apple
{"authType":"apple", "email": "[email protected]", "name": "junsushin-dev", "oAuthId": "000879.axbdedc" }
//local
{"authType":"local", "email": "[email protected]", "name": "junsushin-dev", "password": "1234" }(2) - 로그인 request body
//apple
{"authType":"apple", "oAuthId": "12341234.abc" }
//local
{"authType":"local", "email": "[email protected]", "password": "1234" }(3) - response body
{"name":"junsushin-dev", "profile": "xxx.png", token": "jwtabcdefg123" }통신 흐름
| 의도 | method | URL | query params | request(body) | response(body) |
|---|---|---|---|---|---|
| 전체조회 | GET | /api/issues | - | - | (1) |
| 조건조회 | GET | /api/issues | (a) | - | (1) |
| 단일조회 | GET | /api/issues/{id} | (5) | ||
| 추가 | POST | /api/issues | - | (2) | {"message":"success"} |
| 수정 | PUT | /api/issues | - | (3) | {"message":"success"} |
| 단일수정 | PUT | /api/issues/{id} | - | (6) | {"message":"success"} |
| 삭제 | DEL | /api/issues | - | (4) | {"message":"success"} |
- (a) ?isOpen=true&author=junsu&label=iOS&milestone=1주차&commentator=junsu [isOpen, author, label, milestone, comment 관련 query만 가능]
(1)
[
{
"id": 1,
"title": "레이블 목록 보기 구현",
"isOpen": true,
"preview": "레이블 전체 목록을 볼 수 있어야 한다. 2줄까지 보입니다.",
"createdAt": "2020-11-04T09:10:45.000Z",
"Milestone": {
"title": "1주차 - Web"
},
"author": {
"userName": "junsushin-dev"
},
"Assignee": [
{
"userName": "junsushin-dev",
"profile": "https://avatars3.githubusercontent.com/u/32405358?s=400&u=cbda272c344b4c9e35cc1ee452f0bc4eae7e34c3&v=4"
},
{
"userName": "parkdit94",
"profile": "https://avatars1.githubusercontent.com/u/52442237?s=400&u=48c1ef65d9f5094f65f99e02dd1191656c57425f&v=4"
}
],
"Labels": [
{
"title": "enhancement",
"color": "#000000",
"backgroundColor": "#a2eeef"
},
{
"title": "bug",
"color": "#FFFFFF",
"backgroundColor": "#d73a4a"
}
]
}
](2)
{
"title": "title11",
"comment": "comment22",
"Assignee": [
{
"id": 2,
"userName": "parkdit94",
"profile": "https://avatars1.githubusercontent.com/u/52442237?s=400&u=48c1ef65d9f5094f65f99e02dd1191656c57425f&v=4"
}
],
"Labels": [
{
"id": 3,
"title": "documentation",
"description": "Improvements or additions to documentation",
"color": "#FFFFFF",
"backgroundColor": "#0075ca"
}
],
"Milestone": {
"id": 1,
"title": "1주차 - Web",
"description": "1주차 Web Milestone",
"dueDate": "2020-10-30T00:00:00.000Z",
"isOpen": 1,
"allIssueCount": 3,
"closedIssueCount": 0
}
}(3)
{
"id" : [1, 2],
"isOpen": true, // open
"isOpen": false // close
}
또는
{
"id" : 1,
"isOpen": true, // open
"isOpen": false // close
}(4)
{
"id" : [1, 2]
}
또는
{
"id" : 1
}(5)
{
"id": 1,
"title": "레이블 목록 보기 구현",
"isOpen": true,
"preview": "레이블 전체 목록을 볼 수 있어야 한다. 2줄까지 보입니다.",
"createdAt": "2020-11-11T05:12:42.000Z",
"Milestone": {
"title": "1주차 - Web"
},
"author": {
"userName": "junsushin-dev"
},
"Assignee": [
{
"userName": "junsushin-dev",
"profile": "https://avatars3.githubusercontent.com/u/32405358?s=400&u=cbda272c344b4c9e35cc1ee452f0bc4eae7e34c3&v=4"
},
{
"userName": "parkdit94",
"profile": "https://avatars1.githubusercontent.com/u/52442237?s=400&u=48c1ef65d9f5094f65f99e02dd1191656c57425f&v=4"
}
],
"Labels": [
{
"title": "enhancement",
"color": "#000000",
"backgroundColor": "#a2eeef"
},
{
"title": "bug",
"color": "#FFFFFF",
"backgroundColor": "#d73a4a"
}
],
"Comments": [
{
"id": 1,
"description": "레이블 전체 목록을 볼 수 있는게 어떨까요",
"createdAt": "2020-11-11T05:12:42.000Z",
"User": {
"userName": "junsushin-dev",
"profile": "https://avatars3.githubusercontent.com/u/32405358?s=400&u=cbda272c344b4c9e35cc1ee452f0bc4eae7e34c3&v=4"
}
},
{
"id": 2,
"description": "긍정적인 기능이네요",
"createdAt": "2020-11-11T05:12:42.000Z",
"User": {
"userName": "parkdit94",
"profile": "https://avatars1.githubusercontent.com/u/52442237?s=400&u=48c1ef65d9f5094f65f99e02dd1191656c57425f&v=4"
}
}
]
}(6)
{
"id": 1,
"title": "레이블 목록 보기 구현",
"isOpen": true,
"Milestone": {
"id": 1,
},
"Assignee": [
{
"id": 1,
},
{
"id": 3,
}
],
"Labels": [
{
"id": 1,
},
{
"id": 3
}
],
}| 의도 | method | URL | query params | request(body) | response(body) |
|---|---|---|---|---|---|
| 전체조회 | GET | /api/comments | ?issueId=1 | - | (1) |
| 추가 | POST | /api/comments | - | (2) | {"message": "success"} |
| 수정 | PUT | /api/comments | - | (3) | {"message": "success"} |
(1)
[
{
"id": 1,
"description": "레이블 전체 목록을 볼 수 있는게 어떨까요(수정)",
"createdAt": "2020-11-03T04:35:19.000Z",
"updatedAt": "2020-11-03T11:59:29.000Z",
"User":
{
"userName": "junsushin-dev",
"profile": "https://avatars3.githubusercontent.com/u/32405358?s=400&u=cbda272c344b4c9e35cc1ee452f0bc4eae7e34c3&v=4"
}
},
{
"id": 2,
"description": "긍정적인 기능이네요",
"createdAt": "2020-11-03T04:35:19.000Z",
"updatedAt": "2020-11-03T04:35:19.000Z",
"User":
{
"userName": "parkdit94",
"profile": "https://avatars1.githubusercontent.com/u/52442237?s=400&u=48c1ef65d9f5094f65f99e02dd1191656c57425f&v=4"
}
}
](2)
{
"description": "두번째 이슈입니다",
"issueId": 2
}(3)
{
"id": 1,
"description": "레이블 전체 목록을 볼 수 있는게 어떨까요(수정)"
}| 의도 | method | URL | query params | request(body) | response(body) |
|---|---|---|---|---|---|
| 전체조회 | GET | /api/users | - | - | (1) |
| 수정 | PUT | /api/users | - | (2) | {"message": "success"} |
| 삭제 | DELETE | /api/users | - | (3) | {"message": "success"} |
(1)
[
{
"userName": "junsushin-dev",
"profile": "https://avatars3.githubusercontent.com/u/32405358?s=400&u=cbda272c344b4c9e35cc1ee452f0bc4eae7e34c3&v=4",
},
{
"userName": "parkdit94",
"profile": "https://avatars1.githubusercontent.com/u/52442237?s=400&u=48c1ef65d9f5094f65f99e02dd1191656c57425f&v=4",
},
](2)
{
"id":2,
"userName":"parkdit944"
}(3)
{
"id":2,
}| 의도 | method | URL | query params | request(body) | response(body) |
|---|---|---|---|---|---|
| 전체조회 | GET | /api/labels | - | - | (1) |
| 추가 | POST | /api/labels | - | (2) | {"message": "success"} |
| 수정 | PUT | /api/labels | - | (3) | {"message": "success"} |
| 삭제 | DELETE | /api/labels | - | (4) | {"message": "success"} |
(1)
[
{
"id": 1,
"title": "enhancement",
"description": "New feature or request",
"color": "#000000",
"backgroundColor": "#a2eeef"
},
{
"id": 2,
"title": "bug",
"description": "Something isn't working",
"color": "#FFFFFF",
"backgroundColor": "#d73a4a"
},
{
"id": 3,
"title": "documentation",
"description": "Improvements or additions to documentation",
"color": "#FFFFFF",
"backgroundColor": "#0075ca"
}
](2)
{
"title": "BE",
"description": "Backend",
"color": "#000000",
"backgroundColor": "#05932e"
}(3)
{
"id": 1,
"title": "BE",
"description": "Backend",
"color": "#000000",
"backgroundColor": "#05932e"
}(4)
{
"id": 1,
}
| 의도 | method | URL | query params | request(body) | response(body) |
|---|---|---|---|---|---|
| 전체조회 | GET | /api/milestones | - | - | (1) |
| 추가 | POST | /api/milestones | - | (2) | {"message": "success"} |
| 수정 | PUT | /api/milestones | - | (3) | {"message": "success"} |
| 삭제 | DELETE | /api/milestones/{id} | - | - | {"message": "success"} |
(1)
[
{
"id": 1,
"title": "1주차 - Web",
"description": "1주차 Web Milestone",
"dueDate": "2020-10-30T00:00:00.000Z",
"isOpen": 1,
"allIssueCount": 4,
"closedIssueCount": 0
},
{
"id": 2,
"title": "1주차 - iOS",
"description": "1주차 iOS Milestone",
"dueDate": "2020-10-30T00:00:00.000Z",
"isOpen": 1,
"allIssueCount": 1,
"closedIssueCount": 0
}
](2)
{
"title": "2주차 - Web",
"description": "2주차 Web Milestone",
"dueDate": "2020-12-30T00:00:00.000Z",
}(3)
{
"id": 1,
"title": "2주차 - Web",
"description": "2주차 Web Milestone",
"dueDate": "2020-12-30T00:00:00.000Z",
"isOpen" : 0, // false
}