Skip to content

Task API

Zin0_0 edited this page Dec 9, 2020 · 30 revisions

Task CRUD

Method url description
GET /api/task ์ „์ฒด task ์กฐํšŒ
GET /api/task/:taskId task ๊ฐœ๋ณ„ ์กฐํšŒ
POST /api/project/:projectId/section/:sectionId/task task ์ƒ์„ฑ
PATCH /api/task/:taskId task ์ˆ˜์ •
DELETE /api/task/:taskId task ์‚ญ์ œ

Alarm CRUD

Method url description
POST /api/task/:taskId/alarm ๊ฐœ๋ณ„ task ์•Œ๋žŒ ์ถ”๊ฐ€
PUT /api/task/:taskId/alarm ๊ฐœ๋ณ„ task ์•Œ๋žŒ ๋ณ€๊ฒฝ
DELETE /api/task/:taskId/alarm ๊ฐœ๋ณ„ task ์•Œ๋žŒ ์‚ญ์ œ

Comment CRUD

Method URL Description
GET /api/task/:taskId/comment task์— ๋‹ฌ๋ฆฐ ๋ชจ๋“  comment ์กฐํšŒ
POST /api/task/:taskId/comment task์— comment ์ƒ์„ฑ
PUT /api/task/:taskId/comment/:commentId task์— ๋‹ฌ๋ฆฐ comment ์ˆ˜์ •
DELETE /api/task/:taskId/comment/:commentId task์— ๋‹ฌ๋ฆฐ comment ์‚ญ์ œ

Bookmark CRUD

Method URL Description
GET /api/task/:taskId/bookmark bookmark ์ „์ฒด ์กฐํšŒ
POST /api/task/:taskId/bookmark bookmark ์ƒ์„ฑ
PUT /api/task/:taskId/bookmark/:bookmarkId bookmark ์ˆ˜์ •
DELETE /api/task/:taskId/bookmark/:bookmarkId bookmark ์‚ญ์ œ

Task GET API (์ „์ฒด ์ž‘์—…)

URL

GET /api/task

Response Description

Name Type Description
tasks ARRAY ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ ์ผ์น˜ํ•˜๋Š” task ๋ฐฐ์—ด
id STRING task UUID
title STRING task title

Response Example

{
    tasks: [
        {
            id : 'UUID',
            title: '์ž‘์—…์ž‘์—…',
        },
    ]
}

Failed Response

Code Common Message Return Message Description
401 Unauthorized Unauthorized ์œ ํšจํ•œ ํ† ํฐ์„ header์— ํฌํ•จํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
500 Internal Server Error Internal Server Error ์„œ๋ฒ„์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

Task GET API (์ž‘์—… ์ƒ์„ธ)

URL

GET /api/task/:taskId

Response Description

Name Type Description
title STRING taskId์— ํ•ด๋‹นํ•˜๋Š” ์ž‘์—…์˜ ์ œ๋ชฉ.
labels ARRAY ์ž‘์—…์— ํ• ๋‹น๋œ ๋ผ๋ฒจ(id: number, title: string) ๋ฆฌ์ŠคํŠธ. ๋ผ๋ฒจ์ด ์—†์œผ๋ฉด ๋นˆ ๋ฐฐ์—ด([])
priority OBJECT, NULL ์ž‘์—…์— ํ• ๋‹น๋œ ์šฐ์„ ์ˆœ์œ„(id: number, title: string) ์šฐ์„ ์ˆœ์œ„๊ฐ€ ์—†์œผ๋ฉด null
alarm OBJECT, NULL ์ž‘์—…์— ํ• ๋‹น๋œ ์•Œ๋žŒ(id: number) ์•Œ๋žŒ์ด ์—†์œผ๋ฉด null
dueDate DATE ์ž‘์—…์˜ ๋งˆ๊ฐ์ผ.
position NUMBER ํ™”๋ฉด์ƒ์—์„œ ์ž‘์—…์˜ ์œ„์น˜
isDone BOOLEAN ์ž‘์—… ์™„๋ฃŒ ์—ฌ๋ถ€
createdAt DATE ์ž‘์—…์˜ ์ƒ์„ฑ์‹œ๊ฐ„.
updatedAt DATE ์ž‘์—…์˜ ์ตœ์‹  ์—…๋ฐ์ดํŠธ ์‹œ๊ฐ„.
childTasks ARRAY ํ•˜์œ„ ์ž‘์—…์˜ ๋ฆฌ์ŠคํŠธ. ํ•˜๋‚˜์˜ ์ž‘์—… ๊ฐ์ฒด์™€ ๋™์ผํ•œ ๋ฐ์ดํ„ฐ๊ฐ€ ๋“ค์–ด๊ฐ. ํ•˜์œ„ ์ž‘์—…์ด ์—†์„์‹œ ๋นˆ ๋ฐฐ์—ด([]).

Response Example

task: {
    id : 1,
    title: '์ž‘์—…1',
    labels: [{id: 1, title: 'FE'},],
    priority: {id: 1, title: '์šฐ์„ ์ˆœ์œ„1'},
    alarm: { ... },
    dueDate: '2020-11-18',
    position: 1,
    isDone: true,
    createdAt: '2020-11-18T07:12:41.000Z',
    updatedAt: '2020-11-18T07:12:41.000Z'
    childTasks: [{id: 2, title: ...},{}, ...],
}

Failed Response

Code Common Message Return Message Description
400 Bad Request id๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š์Šต๋‹ˆ๋‹ค ์ž‘์—… ID๊ฐ€ String ํƒ€์ž…์ด ์•„๋‹ˆ๊ฑฐ๋‚˜ UUID4 ๊ฐ’์ด ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
401 Unauthorized Unauthorized ์œ ํšจํ•œ ํ† ํฐ์„ header์— ํฌํ•จํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
403 Forbidden Forbidden ํ•ด๋‹น ์œ ์ €์˜ ์ž‘์—…์ด ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
404 Not Found ํ•ด๋‹น ์ž‘์—…์ด ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์กด์žฌํ•˜์ง€ ์•Š๋Š” ์ž‘์—… id์ธ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
500 Internal Server Error Internal Server Error ์„œ๋ฒ„์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

Task Post API

URL

POST /api/project/:projectId/section/:sectionId/task

Request Description

Name Required Type Description
title REQUIRED STRING ์ž‘์—…์˜ ์ œ๋ชฉ
projectId REQUIRED NUMBER ์ž‘์—…์ด ํ• ๋‹น๋œ ํ”„๋กœ์ ํŠธ ๊ณ ์œ  ๋ฒˆํ˜ธ. default๋Š” '๊ด€๋ฆฌํ•จ'์˜ ๊ณ ์œ ๋ฒˆํ˜ธ
sectionId REQUIRED NUMBER ์ž‘์—…์ด ํ• ๋‹น๋œ ์„น์…˜ ๊ณ ์œ  ๋ฒˆํ˜ธ.
labelIdList CONDITIONAL ARRAY ์ž‘์—…์— ํ• ๋‹นํ•  ๋ผ๋ฒจ ๊ณ ์œ  ๋ฒˆํ˜ธ์˜ ๋ฆฌ์ŠคํŠธ. ์—†์„ ๊ฒฝ์šฐ ๋นˆ ๋ฐฐ์—ด
priorityId CONDITIONAL NUMBER ์ž‘์—…์— ํ• ๋‹นํ•  ์šฐ์„ ์ˆœ์œ„์˜ ๊ณ ์œ ๋ฒˆํ˜ธ
alarmId CONDITIONAL NUMBER ์ž‘์—…์— ํ• ๋‹นํ•  ์•Œ๋žŒ์˜ ๊ณ ์œ ๋ฒˆํ˜ธ
dueDate REQUIRED DATE ์ž‘์—…์— ํ• ๋‹นํ•  ๋งˆ๊ฐ์ผ
parentId CONDITIONAL NUMBER ์ƒ์œ„์ž‘์—…์˜ ๊ณ ์œ ๋ฒˆํ˜ธ. ํ•˜์œ„์ž‘์—…์ผ ๊ฒฝ์šฐ๋งŒ ํ• ๋‹น
position REQUIRED NUMBER ํ™”๋ฉด ์ƒ์—์„œ ์ž‘์—…์˜ ์œ„์น˜.

Request Example

{
    title : 'ํ• ์ผ',
    projectId: 1,
    sectionId: 1,
    labelIdList: [1,2,3],
    priorityId: 1,
    alarmId: 1,
    dueDate: '2020-11-18',
    parentId: 3,
    position: 1
}

Response Description

Name Required Type Description
message REQUIRED STRING ์š”์ฒญ์ด ์„ฑ๊ณตํ–ˆ์„ ๋•Œ ์ „๋‹ฌํ•˜๋Š” ๋ฉ”์‹œ์ง€. 'ok'

Response Example

{
    message: 'ok'
}

Failed Response

Code Common Message Return Message Description
400 Bad Request title๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š์Šต๋‹ˆ๋‹ค ํƒ€์ดํ‹€์ด String ํƒ€์ž…์ด ์•„๋‹ˆ๊ฑฐ๋‚˜ ๋นˆ ๋ฌธ์ž์—ด์ธ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
duedate๋Š” ์˜ค๋Š˜ ๋‚ ์งœ ์ด์ „์œผ๋กœ ์„ค์ •ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค dueDate๊ฐ€ ํ˜„์žฌ ์‹œ์ ๋ณด๋‹ค ์ด์ „์ธ ๊ฒฝ์šฐ ํ˜น์€ ์š”์ฒญ์ด ์ž˜๋ชป๋œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
parentId๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š์Šต๋‹ˆ๋‹ค ํ•˜์œ„ ์ž‘์—… ์ƒ์„ฑ ์‹œ, parentId ๊ฐ’์ด String ํƒ€์ž…์ด ์•„๋‹ˆ๊ฑฐ๋‚˜ UUID4๊ฐ€ ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
๋ถˆํ•„์š”ํ•œ ๊ฐ’์ด ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. => id ์ž‘์—… ์ƒ์„ฑ ์‹œ, id๋ฅผ ์ง€์ •ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
๋ถˆํ•„์š”ํ•œ ๊ฐ’์ด ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. => projectId ์ž‘์—… ์ƒ์„ฑ ์‹œ, request body์— projectId๋ฅผ ์ง€์ •ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
๋ถˆํ•„์š”ํ•œ ๊ฐ’์ด ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. => sectionId ์ž‘์—… ์ƒ์„ฑ ์‹œ, request body์— sectionId๋ฅผ ์ง€์ •ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
์ž˜๋ชป๋œ ์ž…๋ ฅ์ž…๋‹ˆ๋‹ค. => projectId, sectionId ์ž‘์—… ์ƒ์„ฑ ์‹œ, ๋‹ค๋ฅธ ํ”„๋กœ์ ํŠธ์˜ ์„น์…˜ id๊ฐ€ ์ž…๋ ฅ๋œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
401 Unauthorized Unauthorized ์œ ํšจํ•œ ํ† ํฐ์„ header์— ํฌํ•จํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
403 Forbidden Forbidden ํ•ด๋‹น ์œ ์ €์˜ ํ”„๋กœ์ ํŠธ๊ฐ€ ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
ํ•ด๋‹น ์œ ์ €์˜ ์„น์…˜์ด ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
404 Not Found ์กด์žฌํ•˜์ง€ ์•Š๋Š” ์„น์…˜์ž…๋‹ˆ๋‹ค. ์กด์žฌํ•˜์ง€ ์•Š๋Š” ์„น์…˜ id์ธ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค
์กด์žฌํ•˜์ง€ ์•Š๋Š” ํ”„๋กœ์ ํŠธ์ž…๋‹ˆ๋‹ค. ์กด์žฌํ•˜์ง€ ์•Š๋Š” ํ”„๋กœ์ ํŠธ id์ธ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค
500 Internal Server Error Internal Server Error ์„œ๋ฒ„์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

Task Patch API

URL

PATCH /api/task/:taskId

Request Description

Name Required Type Description
title CONDITIONAL STRING ์ž‘์—…์˜ ์ œ๋ชฉ
projectId CONDITIONAL NUMBER ์ž‘์—…์ด ํ• ๋‹น๋œ ํ”„๋กœ์ ํŠธ ๊ณ ์œ  ๋ฒˆํ˜ธ. default๋Š” '๊ด€๋ฆฌํ•จ'์˜ ๊ณ ์œ ๋ฒˆํ˜ธ
sectionId CONDITIONAL NUMBER ์ž‘์—…์ด ํ• ๋‹น๋œ ์„น์…˜ ๊ณ ์œ  ๋ฒˆํ˜ธ.
labelIdList CONDITIONAL ARRAY ์ž‘์—…์— ํ• ๋‹นํ•  ๋ผ๋ฒจ ๊ณ ์œ  ๋ฒˆํ˜ธ์˜ ๋ฆฌ์ŠคํŠธ. ์—†์„ ๊ฒฝ์šฐ ๋นˆ ๋ฐฐ์—ด
priorityId CONDITIONAL NUMBER ์ž‘์—…์— ํ• ๋‹นํ•  ์šฐ์„ ์ˆœ์œ„์˜ ๊ณ ์œ ๋ฒˆํ˜ธ
isDone CONDITIONAL BOOLEAN ์ž‘์—… ์™„๋ฃŒ ์—ฌ๋ถ€
alarmId CONDITIONAL NUMBER ์ž‘์—…์— ํ• ๋‹นํ•  ์•Œ๋žŒ์˜ ๊ณ ์œ ๋ฒˆํ˜ธ
dueDate CONDITIONAL DATE ์ž‘์—…์— ํ• ๋‹นํ•  ๋งˆ๊ฐ์ผ
parentId CONDITIONAL NUMBER ์ƒ์œ„์ž‘์—…์˜ ๊ณ ์œ ๋ฒˆํ˜ธ. ํ•˜์œ„์ž‘์—…์ผ ๊ฒฝ์šฐ๋งŒ ํ• ๋‹น
position CONDITIONAL NUMBER ํ™”๋ฉด ์ƒ์—์„œ ์ž‘์—…์˜ ์œ„์น˜.
{
    title : 'ํ• ์ผ ๋ณ€๊ฒฝ'
    dueDate: '2020-11-19'
    projectId: 1,
    isDone: true
    labelIds: [1, 2, 3]
    priority: 3
    parentId : 1
    sectionId : 1
}

Response Description

Name Required Type Description
message REQUIRED STRING ์š”์ฒญ์ด ์„ฑ๊ณตํ–ˆ์„ ๋•Œ ์ „๋‹ฌํ•˜๋Š” ๋ฉ”์‹œ์ง€. 'ok'

Response Example

{
    message: 'ok'
}

Failed Response

Code Common Message Return Message Description
400 Bad Request projectId๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š์Šต๋‹ˆ๋‹ค ํ”„๋กœ์ ํŠธ ID๊ฐ€ String ํƒ€์ž…์ด ์•„๋‹ˆ๊ฑฐ๋‚˜ UUID4 ๊ฐ’์ด ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
sectionId๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š์Šต๋‹ˆ๋‹ค ์„น์…˜ ID๊ฐ€ String ํƒ€์ž…์ด ์•„๋‹ˆ๊ฑฐ๋‚˜ UUID4 ๊ฐ’์ด ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
alarmId๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š์Šต๋‹ˆ๋‹ค ์„น์…˜ ID๊ฐ€ String ํƒ€์ž…์ด ์•„๋‹ˆ๊ฑฐ๋‚˜ UUID4 ๊ฐ’์ด ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
priorityId๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š์Šต๋‹ˆ๋‹ค ์„น์…˜ ID๊ฐ€ String ํƒ€์ž…์ด ์•„๋‹ˆ๊ฑฐ๋‚˜ UUID4 ๊ฐ’์ด ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
isDone๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š์Šต๋‹ˆ๋‹ค isDone์ด Boolean ํƒ€์ž…์ด ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
title๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š์Šต๋‹ˆ๋‹ค ํƒ€์ดํ‹€์ด String ํƒ€์ž…์ด ์•„๋‹ˆ๊ฑฐ๋‚˜ ๋นˆ ๋ฌธ์ž์—ด์ธ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
duedate๋Š” ์˜ค๋Š˜ ๋‚ ์งœ ์ด์ „์œผ๋กœ ์„ค์ •ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค dueDate๊ฐ€ ํ˜„์žฌ ์‹œ์ ๋ณด๋‹ค ์ด์ „์ธ ๊ฒฝ์šฐ ํ˜น์€ ์š”์ฒญ์ด ์ž˜๋ชป๋œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
parentId๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š์Šต๋‹ˆ๋‹ค ํ•˜์œ„ ์ž‘์—… ์ƒ์„ฑ ์‹œ, parentId ๊ฐ’์ด String ํƒ€์ž…์ด ์•„๋‹ˆ๊ฑฐ๋‚˜ UUID4๊ฐ€ ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
401 Unauthorized Unauthorized ์œ ํšจํ•œ ํ† ํฐ์„ header์— ํฌํ•จํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
403 Forbidden Forbidden ํ•ด๋‹น ์œ ์ €์˜ ์ž‘์—…์ด ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
404 Not Found ์กด์žฌํ•˜์ง€ ์•Š๋Š” ์ž‘์—…์ž…๋‹ˆ๋‹ค. ์กด์žฌํ•˜์ง€ ์•Š๋Š” ์ž‘์—… id์ธ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
500 Internal Server Error Internal Server Error ์„œ๋ฒ„์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

Task Position PATCH API

URL

PATCH /api/task/:taskId/position

Request Description

Name Required Type Description
orderedTasks REQUIRED ARRAY ํ™”๋ฉด์— ๋ณด์—ฌ์งˆ ์ˆœ์„œ๋Œ€๋กœ ์ •๋ ฌ๋œ ํ•˜์œ„ task id ๋ฐฐ์—ด

Request

{
    orderedTasks : [uuid1, uuid2, uuid3, ...]
}

Response

{
    message: 'ok'
}

Task Delete API

URL

DELETE /api/task/:taskId

Request Description

Name Required Type Description
taskId REQUIRED QUERY_STRING ์‚ญ์ œํ•  task์˜ UUID

Response Description

Name Type Description
message STRING ์ž‘์—… ์‚ญ์ œ์— ์„ฑ๊ณตํ–ˆ๋‹ค๋Š” 'ok' ๋ฉ”์‹œ์ง€
Response
{
    message: 'ok'
}

Task - Alarm Post API

URL

POST /api/task/:taskId/alarm

Request

Response

Task - Alarm Put API

URL

PUT /api/task/:taskId/alarm

Request

Response

Task - Alarm Delete API

URL

DELETE /api/task/:taskId/alarm

Response

Task - Comment Get API

URL

GET /api/task/:taskId/comment

Request Description

Name Required Type Description
taskId REQUIRED QUERY_STRING ์ž‘์—…์˜ ์ฝ”๋ฉ˜ํŠธ๋“ค์„ ์กฐํšŒํ•  task์˜ UUID

Response Description

Name Type Description
comments ARRAY ์ฝ”๋ฉ˜ํŠธ ๋ฐฐ์—ด
id STRING ์ฝ”๋ฉ˜ํŠธ UUID
content STRING content ๋‚ด์šฉ(์ผ๋ฐ˜ ํ‰๋ฌธ or URL or IMAGE_URL)

Response

{
    comments:
    [
        {
            id: 12qwro34-14isetuj-sreio42,
            content: 'https://...',
            isImage: true
        }
    ]
}

Failed Response

Code Common Message Return Message Description
401 Unauthorized Unauthorized ์œ ํšจํ•œ ํ† ํฐ์„ header์— ํฌํ•จํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
403 Forbidden Forbidden ํ•ด๋‹น ์œ ์ €์˜ ์ž‘์—…์ด ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
404 Not Found ํ•ด๋‹น ์ž‘์—…์ด ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์กด์žฌํ•˜์ง€ ์•Š๋Š” ์ž‘์—… id์ธ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
500 Internal Server Error Internal Server Error ์„œ๋ฒ„์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

Task - Comment Post API

URL

POST /api/task/:taskId/comment

Request Description

Name Required Type Description
taskId REQUIRED QUERY_STRING ์ฝ”๋ฉ˜ํŠธ๋ฅผ ๋‚จ๊ธธ task์˜ UUID
content REQUIRED STRING ์ฝ”๋ฉ˜ํŠธ์˜ ๋‚ด์šฉ(ํ‰๋ฌธ
isImage Optional BOOLEAN image ํŒ๋ณ„ boolean

Request

{
    content : '[๋‚ด์ผ ๋ด์•ผํ•  ๊ฒƒ](https://www.naver.com) ๊ณต๋ถ€ํ•˜์ž!'
}

Response Description

Name Type Description
message STRING ์ฝ”๋ฉ˜ํŠธ ์ƒ์„ฑ์— ์„ฑ๊ณตํ–ˆ๋‹ค๋Š” 'ok' ๋ฉ”์‹œ์ง€

Response

{
    message: 'ok'
}

Failed Response

Code Common Message Return Message Description
400 Bad Request content๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š์Šต๋‹ˆ๋‹ค content ๊ฐ’์ด String์ด ์•„๋‹ˆ๊ฑฐ๋‚˜ ๋นˆ ๋ฌธ์ž์—ด์ธ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
๋ถˆํ•„์š”ํ•œ ๊ฐ’์ด ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. => id ๋Œ“๊ธ€ ์ƒ์„ฑ ์‹œ, id๋ฅผ ์ง€์ •ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
401 Unauthorized Unauthorized ์œ ํšจํ•œ ํ† ํฐ์„ header์— ํฌํ•จํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
403 Forbidden Forbidden ํ•ด๋‹น ์œ ์ €์˜ ์ž‘์—…์ด ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
404 Not Found ํ•ด๋‹น ์ž‘์—…์ด ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์กด์žฌํ•˜์ง€ ์•Š๋Š” ์ž‘์—… id์ธ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
500 Internal Server Error Internal Server Error ์„œ๋ฒ„์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

Task - Comment PUT API

URL

PUT /api/task/:taskId/comment/:commentId

Request Description

Name Required Type Description
taskId REQUIRED QUERY_STRING ์ฝ”๋ฉ˜ํŠธ๋ฅผ ์ˆ˜์ •ํ•  task์˜ UUID
commentId REQUIRED QUERY_STRING ์ˆ˜์ •ํ•  ์ฝ”๋ฉ˜ํŠธ์˜ UUID
content REQUIRED STRING ์ˆ˜์ •ํ•  ์ฝ”๋ฉ˜ํŠธ์˜ ๋‚ด์šฉ(ํ‰๋ฌธ
isImage REQUIRED BOOLEAN ์ด๋ฏธ์ง€์ธ์ง€ ์—ฌ๋ถ€๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” boolean

Request

{
    'content': '์ฝ”๋ฉ˜ํŠธ ์ˆ˜์ •',
    'isImage': 'false'
}

Response Description
| Name   |    Type |     Description  |
| :-------------  |:--------------|:--------------|
| **message** |   **STRING** |  ์ฝ”๋ฉ˜ํŠธ ์ˆ˜์ •์— ์„ฑ๊ณตํ–ˆ๋‹ค๋Š” 'ok' ๋ฉ”์‹œ์ง€ |

Response

{
    'message': 'ok'
}

Failed Response

Code Common Message Return Message Description
400 Bad Request content๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š์Šต๋‹ˆ๋‹ค content ๊ฐ’์ด String์ด ์•„๋‹ˆ๊ฑฐ๋‚˜ ๋นˆ ๋ฌธ์ž์—ด, ์—†๋Š” ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
isImage๊ฐ’์ด ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š์Šต๋‹ˆ๋‹ค isImage๊ฐ€ ์—†๊ฑฐ๋‚˜ boolean ํƒ€์ž…์ด ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
๋ถˆํ•„์š”ํ•œ ๊ฐ’์ด ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. => id id๋ฅผ ์ˆ˜์ •ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
401 Unauthorized Unauthorized ์œ ํšจํ•œ ํ† ํฐ์„ header์— ํฌํ•จํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
403 Forbidden Forbidden ํ•ด๋‹น ์œ ์ €์˜ ์ž‘์—…์ด ์•„๋‹ˆ๊ฑฐ๋‚˜ ๋Œ“๊ธ€์ด ์•„๋‹Œ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
404 Not Found ํ•ด๋‹น ์ž‘์—…์ด ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์กด์žฌํ•˜์ง€ ์•Š๋Š” ์ž‘์—… id์ธ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
ํ•ด๋‹น ๋Œ“๊ธ€์ด ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์กด์žฌํ•˜์ง€ ์•Š๋Š” ๋Œ“๊ธ€ id์ธ ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
500 Internal Server Error Internal Server Error ์„œ๋ฒ„์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด ๊ฒฝ์šฐ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

Task - Comment DELETE API

URL

DELETE /api/task/:taskId/comment/:commentId

Request Description

Name Required Type Description
taskId REQUIRED QUERY_STRING ์ฝ”๋ฉ˜ํŠธ๋ฅผ ์‚ญ์ œํ•  task์˜ UUID
commentId REQUIRED QUERY_STRING ์‚ญ์ œํ•  ์ฝ”๋ฉ˜ํŠธ์˜ UUID

Response Description

Name Type Description
message STRING ์ฝ”๋ฉ˜ํŠธ ์‚ญ์ œ์— ์„ฑ๊ณตํ–ˆ๋‹ค๋Š” 'ok' ๋ฉ”์‹œ์ง€

Response

{
    'message': 'ok'
}

Task - Bookmark Get API

URL

GET /api/task/:taskId/bookmark

Request Description

Name Required Type Description
taskId REQUIRED QUERY_STRING ์กฐํšŒํ•  task์˜ UUID

Response

{
    bookmarks:
    [
    	{
        	id: qwea123-w45sdf-14dgo45,
        	url: 'https://....'
    	},
    ]
}

Response Description

Name Type Description
bookmarks Array ๋ถ๋งˆํฌ ๋ฐฐ์—ด
id STRING ๋ถ๋งˆํฌ UUID
url STRING ๋ถ๋งˆํฌ URL ์ •๋ณด

Task - Bookmark Post API

URL

POST /api/task/:taskId/bookmark

Request Description

Name Required Type Description
taskId REQUIRED QUERY_STRING ๋ถ๋งˆํฌ๋ฅผ ์ƒ์„ฑํ•  task์˜ UUID
url REQUIRED STRING ๋ถ๋งˆํฌ๋ฅผ ์ƒ์„ฑํ•  url

Request

{
    url : 'https://...'
}

Response Description

Name Type Description
message STRING ์ƒ์„ฑ์— ์„ฑ๊ณตํ–ˆ๋‹ค๋Š” 'ok' ๋ฉ”์‹œ์ง€

Response

{
    message: 'ok'
}

Task - Bookmark PUT API

URL

PUT /api/task/:taskId/bookmark/:bookmarkId

Request Description

Name Required Type Description
taskId REQUIRED QUERY_STRING ๋ถ๋งˆํฌ๋ฅผ ์ˆ˜์ •ํ•  task์˜ UUID
bookmarkId REQUIRED QUERY_STRING ์ˆ˜์ •ํ•  bookmark์˜ UUID
url REQUIRED STRING ์ƒˆ๋กญ๊ฒŒ ์ˆ˜์ •ํ•  url

Request

{
    url : 'https://another...'
}

Response Description

Name Type Description
message STRING ์ˆ˜์ •์— ์„ฑ๊ณตํ–ˆ๋‹ค๋Š” 'ok' ๋ฉ”์‹œ์ง€

Response

{
    'message': 'ok'
}

Task - Bookmark DELETE API

URL

DELETE /api/task/:taskId/bookmark/:bookmarkId

Request Description

Name Required Type Description
taskId REQUIRED QUERY_STRING ๋ถ๋งˆํฌ๋ฅผ ์‚ญ์ œํ•  task์˜ UUID
bookmarkId REQUIRED QUERY_STRING ์‚ญ์ œํ•  bookmark์˜ UUID

Response Description

Name Type Description
message STRING ์‚ญ์ œ์— ์„ฑ๊ณตํ–ˆ๋‹ค๋Š” 'ok' ๋ฉ”์‹œ์ง€

Response

{
    'message': 'ok'
}
Clone this wiki locally