forked from ghojeong/issue-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
FE API 구성
ink-0 edited this page Jun 28, 2021
·
2 revisions
백엔드에게 필요한 API 를 요청하기 위해, 요구사항을 정리하는 문서
자신이 어떤 HTTP 요청으로, 어떤 응답을 받고 싶은지 적어주세요 조회(GET), 추가(POST), 수정(PUT), 삭제(DELETE)
🖨 쿼리 스트링 (이슈 검색 필터링 조건), 💥 조건은 꼭 기입하지 않아도 됩니다.💥
status: 이슈 상태(open, close, all) ✨ 조건이 없을 경우 기본 값은 all
입니다. ✨
milestone: 마일스톤 아이디, 닉네임? (정해야 함)
writer: 작성자 아이디, 닉네임?
created: 이슈 작성일
Json 예시
{
"issues": [
{
"issue_id": 2,
"milestone_info": {
"title": "마일스톤 제목1",
"description": "마일스톤 내용1",
"due_date": "2021-06-22T20:18:38.237"
},
"title": "열린 이슈 타이틀1",
"content": "열린 이슈 설명1",
"status": "OPEN",
"writer": {
"id": null,
"name": null,
"profile_image_url": null,
"emails": null
},
"created_date_time": "2021-06-22T20:18:38.237",
"assignees": [
{
"id": "noel",
"name": "노을",
"profile_image_url": "http://testProfile.image.url",
"emails": [
"[email protected]",
"[email protected]"
]
},
{
"id": "pyro",
"name": "파이로",
"profile_image_url": "http://testProfile.image.url",
"emails": [
"[email protected]",
"[email protected]"
]
}
],
"labels": [
{
"id": 1,
"title": "라벨 타이틀4",
"description": "라벨 설명1",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 2,
"title": "라벨 타이틀5",
"description": "라벨 설명2",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 3,
"title": "라벨 타이틀6",
"description": "라벨 설명3",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
}
]
},
{
"issue_id": 3,
"milestone_info": {
"title": "마일스톤 제목2",
"description": "마일스톤 내용2",
"due_date": "2021-06-22T20:18:38.237"
},
"title": "열린 이슈 타이틀2",
"content": "열린 이슈 설명2",
"status": "OPEN",
"writer": {
"id": null,
"name": null,
"profile_image_url": null,
"emails": null
},
"created_date_time": "2021-06-22T20:18:38.237",
"assignees": [
{
"id": "noel",
"name": "노을",
"profile_image_url": "http://testProfile.image.url",
"emails": [
"[email protected]",
"[email protected]"
]
},
{
"id": "pyro",
"name": "파이로",
"profile_image_url": "http://testProfile.image.url",
"emails": [
"[email protected]",
"[email protected]"
]
}
],
"labels": [
{
"id": 1,
"title": "라벨 타이틀4",
"description": "라벨 설명1",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 2,
"title": "라벨 타이틀5",
"description": "라벨 설명2",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 3,
"title": "라벨 타이틀6",
"description": "라벨 설명3",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
}
]
}
]
}
json 예시
{
"issue_id": 1,
"milestone_info": {
"title": "마일스톤 제목1",
"description": "마일스톤 내용1",
"due_date": "2021-06-18T01:47:06.705"
},
"title": "검색한 이슈 타이틀1",
"content": "닫힌 이슈 설명1",
"status": false,
"writer": {
"email": "[email protected]",
"name": "테스터",
"avatar_url": "http://testProfile.image.url"
},
"created_date_time": "2021-06-18T01:47:06.705",
"assignees": {
"users": [
{
"email": "[email protected]",
"name": "담당자",
"avatar_url": "http://testProfile.image.url"
},
{
"email": "[email protected]",
"name": "담당자2",
"avatar_url": "http://testProfile.image.url"
}
]
},
"labels": {
"labels": [
{
"id": 1,
"title": "라벨 타이틀1",
"description": "라벨 설명1",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 2,
"title": "라벨 타이틀2",
"description": "라벨 설명2",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 3,
"title": "라벨 타이틀3",
"description": "라벨 설명3",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
}
]
},
"comments": {
"comments": [
{
"id": 1,
"write": {
"email": "[email protected]",
"name": "테스터",
"avatar_url": "http://testProfile.image.url"
},
"content": "댓글내용1",
"date_time": "2021-06-18T01:47:06.717"
},
{
"id": 2,
"write": {
"email": "[email protected]",
"name": "테스터2",
"avatar_url": "http://testProfile.image.url"
},
"content": "댓글내용3",
"date_time": "2021-06-18T01:47:06.717"
},
{
"id": 3,
"write": {
"email": "[email protected]",
"name": "테스터2",
"avatar_url": "http://testProfile.image.url"
},
"content": "댓글내용4",
"date_time": "2021-06-18T01:47:06.717"
}
]
}
}
json 예시
{
"labels": [
{
"id": 1,
"title": "라벨 타이틀4",
"description": "라벨 설명1",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 2,
"title": "라벨 타이틀5",
"description": "라벨 설명2",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 3,
"title": "라벨 타이틀6",
"description": "라벨 설명3",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
}
],
"assignees": [
{
"id": "noel",
"name": "노을",
"profile_image_url": "http://testProfile.image.url",
"emails": [
"[email protected]",
"[email protected]"
]
},
{
"id": "pyro",
"name": "파이로",
"profile_image_url": "http://testProfile.image.url",
"emails": [
"[email protected]",
"[email protected]"
]
}
],
"milestones": [
{
"id": 1,
"title": "마일스톤 제목1",
"description": "마일스톤 내용1",
"due_date": "2021-06-22T20:14:44.65"
}
]
}
json 예시
{
"milestones": [
{
"id": 1,
"issues": {
"issues": [
{
"issue_id": 2,
"milestone_info": {
"title": "마일스톤 제목1",
"description": "마일스톤 내용1",
"due_date": "2021-06-18T01:42:07.905"
},
"title": "열린 이슈 타이틀1",
"content": "열린 이슈 설명1",
"status": true,
"writer": {
"email": "[email protected]",
"name": "네오",
"avatar_url": "http://testProfile.image.url"
},
"created_date_time": "2021-06-18T01:42:07.905",
"assignees": {
"users": [
{
"email": "[email protected]",
"name": "노을",
"avatar_url": "http://testProfile.image.url"
},
{
"email": "[email protected]",
"name": "파이로",
"avatar_url": "http://testProfile.image.url"
}
]
},
"labels": {
"labels": [
{
"id": 1,
"title": "라벨 타이틀4",
"description": "라벨 설명1",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 2,
"title": "라벨 타이틀5",
"description": "라벨 설명2",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 3,
"title": "라벨 타이틀6",
"description": "라벨 설명3",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
}
]
}
},
{
"issue_id": 5,
"milestone_info": {
"title": "마일스톤 제목1",
"description": "마일스톤 내용1",
"due_date": "2021-06-18T01:42:07.905"
},
"title": "열린 이슈 타이틀2",
"content": "열린 이슈 설명1",
"status": true,
"writer": {
"email": "[email protected]",
"name": "네오",
"avatar_url": "http://testProfile.image.url"
},
"created_date_time": "2021-06-18T01:42:07.905",
"assignees": {
"users": [
{
"email": "[email protected]",
"name": "노을",
"avatar_url": "http://testProfile.image.url"
},
{
"email": "[email protected]",
"name": "파이로",
"avatar_url": "http://testProfile.image.url"
}
]
},
"labels": {
"labels": [
{
"id": 1,
"title": "라벨 타이틀4",
"description": "라벨 설명1",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 2,
"title": "라벨 타이틀5",
"description": "라벨 설명2",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 3,
"title": "라벨 타이틀6",
"description": "라벨 설명3",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
}
]
}
},
{
"issue_id": 6,
"milestone_info": {
"title": "마일스톤 제목1",
"description": "마일스톤 내용1",
"due_date": "2021-06-18T01:42:07.905"
},
"title": "열린 이슈 타이틀3",
"content": "열린 이슈 설명1",
"status": true,
"writer": {
"email": "[email protected]",
"name": "네오",
"avatar_url": "http://testProfile.image.url"
},
"created_date_time": "2021-06-18T01:42:07.905",
"assignees": {
"users": [
{
"email": "[email protected]",
"name": "노을",
"avatar_url": "http://testProfile.image.url"
},
{
"email": "[email protected]",
"name": "파이로",
"avatar_url": "http://testProfile.image.url"
}
]
},
"labels": {
"labels": [
{
"id": 1,
"title": "라벨 타이틀4",
"description": "라벨 설명1",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 2,
"title": "라벨 타이틀5",
"description": "라벨 설명2",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 3,
"title": "라벨 타이틀6",
"description": "라벨 설명3",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
}
]
}
},
{
"issue_id": 7,
"milestone_info": {
"title": "마일스톤 제목2",
"description": "마일스톤 내용2",
"due_date": "2021-06-18T01:42:07.905"
},
"title": "열린 이슈 타이틀4",
"content": "열린 이슈 설명2",
"status": true,
"writer": {
"email": "[email protected]",
"name": "네오",
"avatar_url": "http://testProfile.image.url"
},
"created_date_time": "2021-06-18T01:42:07.905",
"assignees": {
"users": [
{
"email": "[email protected]",
"name": "노을",
"avatar_url": "http://testProfile.image.url"
},
{
"email": "[email protected]",
"name": "파이로",
"avatar_url": "http://testProfile.image.url"
}
]
},
"labels": {
"labels": [
{
"id": 1,
"title": "라벨 타이틀4",
"description": "라벨 설명1",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 2,
"title": "라벨 타이틀5",
"description": "라벨 설명2",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 3,
"title": "라벨 타이틀6",
"description": "라벨 설명3",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
}
]
}
}
]
},
"milestone_info": {
"title": "마일스톤 제목1",
"description": "마일스톤 내용1",
"due_date": "2021-06-18T01:42:07.905"
}
},
{
"id": 2,
"issues": {
"issues": [
{
"issue_id": 2,
"milestone_info": {
"title": "마일스톤 제목1",
"description": "마일스톤 내용1",
"due_date": "2021-06-18T01:42:07.905"
},
"title": "열린 이슈 타이틀1",
"content": "열린 이슈 설명1",
"status": true,
"writer": {
"email": "[email protected]",
"name": "네오",
"avatar_url": "http://testProfile.image.url"
},
"created_date_time": "2021-06-18T01:42:07.905",
"assignees": {
"users": [
{
"email": "[email protected]",
"name": "노을",
"avatar_url": "http://testProfile.image.url"
},
{
"email": "[email protected]",
"name": "파이로",
"avatar_url": "http://testProfile.image.url"
}
]
},
"labels": {
"labels": [
{
"id": 1,
"title": "라벨 타이틀4",
"description": "라벨 설명1",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 2,
"title": "라벨 타이틀5",
"description": "라벨 설명2",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 3,
"title": "라벨 타이틀6",
"description": "라벨 설명3",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
}
]
}
},
{
"issue_id": 5,
"milestone_info": {
"title": "마일스톤 제목1",
"description": "마일스톤 내용1",
"due_date": "2021-06-18T01:42:07.905"
},
"title": "열린 이슈 타이틀2",
"content": "열린 이슈 설명1",
"status": true,
"writer": {
"email": "[email protected]",
"name": "네오",
"avatar_url": "http://testProfile.image.url"
},
"created_date_time": "2021-06-18T01:42:07.905",
"assignees": {
"users": [
{
"email": "[email protected]",
"name": "노을",
"avatar_url": "http://testProfile.image.url"
},
{
"email": "[email protected]",
"name": "파이로",
"avatar_url": "http://testProfile.image.url"
}
]
},
"labels": {
"labels": [
{
"id": 1,
"title": "라벨 타이틀4",
"description": "라벨 설명1",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 2,
"title": "라벨 타이틀5",
"description": "라벨 설명2",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 3,
"title": "라벨 타이틀6",
"description": "라벨 설명3",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
}
]
}
},
{
"issue_id": 6,
"milestone_info": {
"title": "마일스톤 제목1",
"description": "마일스톤 내용1",
"due_date": "2021-06-18T01:42:07.905"
},
"title": "열린 이슈 타이틀3",
"content": "열린 이슈 설명1",
"status": true,
"writer": {
"email": "[email protected]",
"name": "네오",
"avatar_url": "http://testProfile.image.url"
},
"created_date_time": "2021-06-18T01:42:07.905",
"assignees": {
"users": [
{
"email": "[email protected]",
"name": "노을",
"avatar_url": "http://testProfile.image.url"
},
{
"email": "[email protected]",
"name": "파이로",
"avatar_url": "http://testProfile.image.url"
}
]
},
"labels": {
"labels": [
{
"id": 1,
"title": "라벨 타이틀4",
"description": "라벨 설명1",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 2,
"title": "라벨 타이틀5",
"description": "라벨 설명2",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 3,
"title": "라벨 타이틀6",
"description": "라벨 설명3",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
}
]
}
},
{
"issue_id": 7,
"milestone_info": {
"title": "마일스톤 제목2",
"description": "마일스톤 내용2",
"due_date": "2021-06-18T01:42:07.905"
},
"title": "열린 이슈 타이틀4",
"content": "열린 이슈 설명2",
"status": true,
"writer": {
"email": "[email protected]",
"name": "네오",
"avatar_url": "http://testProfile.image.url"
},
"created_date_time": "2021-06-18T01:42:07.905",
"assignees": {
"users": [
{
"email": "[email protected]",
"name": "노을",
"avatar_url": "http://testProfile.image.url"
},
{
"email": "[email protected]",
"name": "파이로",
"avatar_url": "http://testProfile.image.url"
}
]
},
"labels": {
"labels": [
{
"id": 1,
"title": "라벨 타이틀4",
"description": "라벨 설명1",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 2,
"title": "라벨 타이틀5",
"description": "라벨 설명2",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
},
{
"id": 3,
"title": "라벨 타이틀6",
"description": "라벨 설명3",
"background_color_hexa": "#FF0000",
"text_color_hexa": "#000000"
}
]
}
}
]
},
"milestone_info": {
"title": "마일스톤 제목2",
"description": "마일스톤 내용2",
"due_date": "2021-06-18T01:42:07.905"
}
}
]
}
json 예시
{
"comments": [
{
"id": 1,
"write": {
"email": "[email protected]",
"name": "테스터",
"avatar_url": "http://testProfile.image.url"
},
"content": "댓글내용1",
"date_time": "2021-06-17T22:08:28.213"
},
{
"id": 2,
"write": {
"email": "[email protected]",
"name": "테스터2",
"avatar_url": "http://testProfile.image.url"
},
"content": "댓글내용3",
"date_time": "2021-06-17T22:08:28.214"
},
{
"id": 3,
"write": {
"email": "[email protected]",
"name": "테스터2",
"avatar_url": "http://testProfile.image.url"
},
"content": "댓글내용4",
"date_time": "2021-06-17T22:08:28.214"
}
]
}
GitHub Authorization Code 를 클라이언트 서버에 전달해서, jwt 를 받아오는 API 를 원합니다!
POST /api/auth?code=""
{ code: "string" }
{ token: "jwt_token" }
IssueList page에 보여 줄 리스트
GET /api/issue?issueList=''
Autorization: "Bearer ${jwt}"
{ issueList: [{id: 1, title: 'title', content: 'content', ... }, {id: 2, title: 'title', content: 'content', ... }, ...] }
사용자가 이슈를 작성하고, 완료 버튼을 눌렀을 때
POST /api/issue?issueAdd=''
{ title: "title", content: "content", attachFile: '' }