-
Notifications
You must be signed in to change notification settings - Fork 1
API 명세
woorimIT edited this page Jun 16, 2021
·
13 revisions
홈 화면에서 조회될 전체 데이터를 응답한다.
URL:/api/home
METHOD:GET
- Response
-
Status:
200 OK
-
Content-Type:
application/json
-
Status:
{
lists: [{
no: 13,
title: "ToDo",
cards: [{
no: 1,
content: "1일 1커밋"
}, {
no: 3,
content: "문서 정리"
}]
}, {
no: 21,
title: "InProgress",
cards: [{
no: 2,
content: "1일 1회화"
}, {
no: 3,
content: "API 명세 정리"
}]
}]
}
URL:
/api/list
METHOD:POST
- Request
-
Content-Type:
application/json
-
Content-Type:
{
title: "ToDo"
}
- Response
-
Status:
201 Created
-
Content-Type:
application/json
-
Status:
{
result: "success",
msg: "리스트가 성공적으로 추가되었습니다."
}
URL:
/api/card
METHOD:POST
- Request
-
Content-Type:
application/json
-
Content-Type:
{
content: "1일 1커밋"
}
- Response
-
Status:
201 Created
-
Content-Type:
application/json
-
Status:
{
result: "success"
}
URL:
/api/cards/:no
METHOD:PUT
- Request
-
Content-Type:
application/json
-
Content-Type:
{
content: "1일 1회화"
}
- Response
-
Status:
204 No Content
-
Status:
URL:
/api/cards/:no
METHOD:DELETE
- Response
-
Status:
204 No Content
-
Status:
(1) 존재하지 않는 URL에 접근했을 때
(2) 존재하지 않는 데이터에게 CRUD를 시도할 때 등
-
Status:
404 Not Found
-
Content-Type:
application/json
{
result: "error on client side"
msg: "존재하지 않는 리소스입니다."
}