client demo: https://k-a-n-b-a-n.web.app
server link: https://k-a-n-b-a-n.herokuapp.com
-
URL
/task
-
Method:
GET
-
URL Params
<None>
-
Data Params
<None>
-
Success Response:
- Code: 200 OK
Content:[ { "id": 5, "title": "1234", "description": "ok", "category": "done", "UserId": 1, "createdAt": "2020-11-04T16:00:00.000Z", "updatedAt": "2020-11-07T14:59:57.818Z", }, { "id": 6, "title": "1234", "description": "ok", "category": "done", "UserId": 1, "createdAt": "2020-11-04T16:00:00.000Z", "updatedAt": "2020-11-06T06:54:13.111Z", } ]
- Code: 200 OK
-
Error Response:
- Code: 500 Internal Server Error
Content:{ error: 'Internal Server Error' }
- Code: 500 Internal Server Error
-
Notes:
This path showing all list of kanbans of all users
-
URL
/task
-
Method:
POST
-
URL Params
<None>
-
Data Params
<None>
-
Request Body
- Content:
{ "title": "string", "description": "string", "category": "string" }
- Content:
-
Success Response:
- Code: 201 Created
Content:{ "id": 36, "title": "Mau bikin final project bulan depan", "description": "semoga saja cepat lulus", "category": "backlog", "UserId": 1, "updatedAt": "2020-11-20T04:19:51.936Z", "createdAt": "2020-11-20T04:19:51.936Z" }
- Code: 201 Created
-
Error Response:
If error from the server
-
Code: 500 Internal Server Error
Content:{ error: 'Internal Server Error' }
If error from the validate data input
-
Code: 400 Bad Request
Content:{ "error": "Title cannot be blank,Description cannot be blank, category cannot be blank" }
-
-
Notes:
This path to add a Kanban and can do some validates
-
URL
/task/:id
-
Method:
POST
-
URL Params
<require params id>
-
Data Params
<None>
-
Request Body <None>
-
Success Response:
- Code: 200 OK
Content:{ "id": 36, "title": "Mau bikin final project bulan depan", "description": "semoga saja cepat lulus", "category": "backlog", "UserId": 1, "updatedAt": "2020-11-20T04:19:51.936Z", "createdAt": "2020-11-20T04:19:51.936Z" }
- Code: 200 OK
-
Error Response:
If error from the server
- Code: 500 Internal Server Error
Content:{ error: 'Internal Server Error' }
- Code: 500 Internal Server Error
-
Notes:
This path get kanban by id
-
URL
/task/:id
-
Method:
PUT
-
URL Params
<Require id>
-
Data Params
<None>
-
Request Body
- Content:
{ "title": "string", "description": "string", "category": "string" }
- Content:
-
Success Response:
- Code: 200 OK
Content:{ "id": 36, "title": "Mau bikin final project bulan depan", "description": "semoga saja cepat lulus", "category": "done", "UserId": 1, "updatedAt": "2020-11-20T04:19:51.936Z", "createdAt": "2020-12-20T04:19:51.936Z" }
- Code: 200 OK
-
Error Response:
If error from the server
-
Code: 500 Internal Server Error
Content:{ error: 'Internal Server Error' }
If error from the validate data input
-
Code: 400 Bad Request
Content:{ "error": "Title cannot be blank,Description cannot be blank, category cannot be blank" }
-
-
Notes:
This path to edit Kanban and can do some validates
Edit Data Kanban's Category
-
URL
/task/:id
-
Method:
PATCH
-
URL Params
<Require id>
-
Data Params
<None>
-
Request Body
- Content:
{ "category": "string" }
- Content:
-
Success Response:
- Code: 200 OK
Content:{ "id": 36, "title": "Mau bikin final project bulan depan", "description": "semoga saja cepat lulus", "category": "done", "UserId": 1, "updatedAt": "2020-11-20T04:19:51.936Z", "createdAt": "2020-12-20T04:19:51.936Z" }
- Code: 200 OK
-
Error Response:
If error from the server
-
Code: 500 Internal Server Error
Content:{ error: 'Internal Server Error' }
If error from the validate data input
-
Code: 400 Bad Request
Content:{ "error": "category cannot be blank" }
-
-
Notes:
This path to edit Kanban's category and can do some validates
-
URL
/task/:id
-
Method:
DELETE
-
URL Params
<Require id>
-
Data Params
<None>
-
Request Body
-
Content:
<None>
-
-
Success Response:
- Code: 200 OK
Content:{ "msg": "Task Deleted!" }
- Code: 200 OK
-
Error Response:
If error from the server
-
Code: 500 Internal Server Error
Content:{ error: 'Internal Server Error' }
If error from the validate data input
-
Code: 400 Bad Request
Content:{ "error": "Task not found!" }
-
-
Notes:
This path to delete a kanban