Skip to content

LABEL API

shkilo edited this page Nov 5, 2020 · 1 revision

Label API 개요

METHOD URL DESCRIPITION
GET /api/label label list 가져오기
POST /api/label label 생성
PATCH /api/label/:labelId label 수정
DELETE /api/label/:labelId label 삭제

Label Get API

request

URL

GET /api/label

response

[
    {
        "id": 1,
        "title": "iOS",
        "description": null,
        "color": "red",
        "createdAt": "2020-11-02T16:40:56.000Z",
        "updatedAt": "2020-11-02T16:40:56.000Z"
    },
    {
        "id": 2,
        "title": "web",
        "description": null,
        "color": "blue",
        "createdAt": "2020-11-02T16:40:56.000Z",
        "updatedAt": "2020-11-02T16:40:56.000Z"
    }    
]

Label create API

request

URL

POST /api/label

Body

NAME TYPE DESCRIPITION REQUIRED
title String 라벨 제목 O
description String 라벨 설명 X
color String 라벨 색깔 O

JSON example

{
    "title": "title goes here",
    "description": "description goes here",
    "color": "color goes here"
}

response

{
    "id": 6,
    "title": "title goes here",
    "description": "description goes here",
    "color": "color goes here",
    "updatedAt": "2020-11-02T14:38:40.127Z",
    "createdAt": "2020-11-02T14:38:40.127Z"
}

Label update API

request

URL

PATCH /api/label/:labelId

Body

NAME TYPE DESCRIPITION REQUIRED
title String 라벨 제목 X
description String 라벨 설명 X
color String 라벨 색깔 X

JSON example

{
	"title": "updated"
}

response

{
    "numOfaffectedRows": 1
}

Label delete API

request

URL

DELETE /api/label/:labelId

response

{
    "numOfaffectedRows": 1
}

Clone this wiki locally