Repository navigation
API 명세
Sol edited this page Apr 13, 2022
·
3 revisions
| 기능명 | Method | URL |
|---|---|---|
| 모든 카드 조회 | GET | /api/cards |
| 카드 생성 | POST | /api/cards |
| 카드 조회 | GET | /api/cards/{id} |
| 카드 삭제 | DELETE | /api/cards/{id} |
| 카드 수정 | PATCH | /api/cards/{id} |
| 카드 이동 | PATCH | /api/cards/move/{movingCardId} |
| 세션 & 카드 조회 | GET | /api/cards/section/{sectionId} |
| Name | Type | Description |
|---|---|---|
| id | Long | unique identifier |
| author | String | 제목 |
| sectionId | Integer | 일의 상태값(Todo, In progress, Done) |
| subject | String | /api/cards/{id} |
| contents | String | /api/cards/{id} |
| createdAt | DateTime | 생성시간 |
| updatedAt | DateTime | 수정시간 |
모든 카드 조회
[
{
"section": {
"id": 1,
"name": "to do"
},
"cards": [
{
"id": 1,
"author": "iOS",
"sectionId": 1,
"subject": "제목1-1",
"contents": "본문1-1",
"createdAt": [2022,4,13,0,41,42]
}
]
},
{
"section": {
"id": 2,
"name": "in progress"
},
"cards": [
{
"id": 2,
"author": "iOS",
"sectionId": 2,
"subject": "제목2-1",
"contents": "본문2-1",
"createdAt": [2022,4,13,0,42,55]
}
]
},
{
"section": {
"id": 3,
"name": "done"
},
"cards": [
{
"id": 16,
"author": "iOS",
"sectionId": 3,
"subject": "제목3-1",
"contents": "본문3-1",
"createdAt": [2022,4,13,0,43,4]
}
]
}
]카드 생성
{
"author": "iOS",
"contents": "본문1-1",
"sectionId": 1,
"subject": "제목1-1"
}{
"id": 1,
"author": "iOS",
"sectionId": 1,
"subject": "제목1-1",
"contents": "본문1-1",
"createdAt": [2022,4,13,0,43,4,71149000]
}카드 조회
{
"id": 1
}{
"id": 1,
"author": "iOS",
"sectionId": 1,
"subject": "제목1-1",
"contents": "본문1-1",
"createdAt": [2022,4,13,0,43,4]
}카드 수정(**수정필요**)
{
"author": "iOS", // author는 카드 생성 경우에만 보내드릴 걸로 수정
"contents": "본문변경1-1",
"id": 1, // 해당 부분도 URL에 포함될 것이라 포함 안되는 걸로 수정
"sectionId": 1, // 안넘겨드려도 괜찮은 걸로 수정!
"subject": "제목1-1"
}{
"id": 1,
"author": "iOS",
"sectionId": 1,
"subject": "제목1-1",
"contents": "본문변경1-1",
"createdAt": [2022,4,13,1,20,25,889066000]
}세션 & 카드 조회
{
"section": {
"id": 2,
"name": "in progress"
},
"cards": [
{
"id": 3,
"author": "iOS",
"sectionId": 2,
"subject": "제목1-1",
"contents": "본문변경1-1",
"createdAt": [2022,4,13,0,41,42]
},
{
"id": 2,
"author": "iOS",
"sectionId": 2,
"subject": "제목2-1",
"contents": "본문2-1",
"createdAt": [2022,4,13,0,42,55]
}
]
}