BASE_URL = 'http://localhost:3000' DEPLOY FIREBASE https://kanban-268212.firebaseapp.com/
JWT_SECRET= CLIENT_ID=
Returns json data.
-
URL
/register
-
Method:
POST
-
URL Params
Required:
None
-
Data Params
name=[string]
username=[string]
email=[string]
password=[string]
-
Success Response:
- Code: 200 OK
Content:{ "id": 3, "name": "Arif Rachman husen", "username": "arif", "email": "[email protected]", "password": "$2b$10$8l13KvSs1Sq19Vzk60HQOu74qG4PDjSTMTvtmhBX4Ntd7j5.zN3KC", "updatedAt": "2020-02-14T15:37:46.848Z", "createdAt": "2020-02-14T15:37:46.848Z" }
- Code: 200 OK
-
Error Response:
- Code: 400 Bad Request
Content:{ "message": [ "User.password cannot be null", "Validation notEmpty on email failed", "Validation notEmpty on name failed", "Validation notEmpty on username failed" ] }
OR
- Code: 409 Conflict
Content:{ "message": "Email already register" }
OR
- Code: 500 Server Error
Content:{ "message": "Internal Server Error" }
- Code: 400 Bad Request
-
Sample Call:
axios .post(`${process.env.BASE_URL}/register`,{ name:name ,username:username ,email:email ,password:password })
Returns json data.
-
URL
/login
-
Method:
POST
-
URL Params
Required:
None
-
Data Params
email=[string]
password=[string]
-
Success Response:
- Code: 200 OK
Content:{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhcmlmIiwiaWF0IjoxNTgxNjY0NTgzfQ.mRMIr1EyfdKXrj86mPrQogjY5XQiL6VvWR-xi8UEYdw" }
- Code: 200 OK
-
Error Response:
- Code: 401 Unauthorize
Content:{ "message": "Email or Password wrong" }
OR
- Code: 404 Not Found
Content:{ "message": "User Not Found" }
OR
- Code: 500 Internal Server Error
Content:{ "message": "Internal server Error" }
- Code: 401 Unauthorize
-
Sample Call:
axios .post(`${process.env.BASE_URL}/login`,{ email:email ,password:password })
Returns json data.
-
URL
/categories
-
Method:
GET
-
URL Params
Required:
token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhcmlmIiwiaWF0IjoxNTgxNjY0NTgzfQ.mRMIr1EyfdKXrj86mPrQogjY5XQiL6VvWR-xi8UEYdw'
-
Data Params
None
-
Success Response:
- Code: 200 OK
Content:[ { "id": 1, "name": "backlog", "createdAt": "2020-02-12T08:48:44.998Z", "updatedAt": "2020-02-12T08:48:44.998Z", "Tasks": [ { "id": 84, "title": "initial", "CategoryId": 1, "UserId": 1, "createdAt": "2020-02-12T19:19:06.402Z", "updatedAt": "2020-02-12T19:19:06.402Z" } ] }, ]
- Code: 200 OK
-
Error Response:
- Code: 404 Not Found
Content:{ "message": "Data Not Found" }
OR
- Code: 500 Internal Server Error
Content:{ "message": "Iternal Server Error" }
- Code: 404 Not Found
-
Sample Call:
axios .get(`${process.env.BASE_URL}/categories`)
Returns json data.
-
URL
/tasks
-
Method:
GET
-
URL Params
Required:
token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhcmlmIiwiaWF0IjoxNTgxNjY0NTgzfQ.mRMIr1EyfdKXrj86mPrQogjY5XQiL6VvWR-xi8UEYdw'
-
Data Params
None
-
Success Response:
- Code: 200 OK
Content:[ { "id": 84, "title": "initial", "CategoryId": 1, "UserId": 1, "createdAt": "2020-02-12T19:19:06.402Z", "updatedAt": "2020-02-12T19:19:06.402Z" } ]
- Code: 200 OK
-
Error Response:
- Code: 404 Not Found
Content:{ "message": "Data Not Found" }
OR
- Code: 500 Internal Server Error
Content:{ "message": "Internal Server Error" }
- Code: 404 Not Found
-
Sample Call:
axios .get(`${process.env.BASE_URL}/tasks`)
Returns json data.
-
URL
/tasks
-
Method:
GET
-
URL Params
Required:
token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhcmlmIiwiaWF0IjoxNTgxNjY0NTgzfQ.mRMIr1EyfdKXrj86mPrQogjY5XQiL6VvWR-xi8UEYdw'
And
`id=[integer]`
-
Data Params
None
-
Success Response:
- Code: 200 OK
Content:{ "id": 84, "title": "initial", "CategoryId": 1, "UserId": 1, "createdAt": "2020-02-12T19:19:06.402Z", "updatedAt": "2020-02-12T19:19:06.402Z" }
- Code: 200 OK
-
Error Response:
- Code: 404 Not Found
Content:{ "message": "Data Not Found" }
OR
- Code: 500 Internal Server Error
Content:{ "message": "Internal Server Error" }
- Code: 404 Not Found
-
Sample Call:
axios .get(`${process.env.BASE_URL}/tasks/id`)
Returns json data.
-
URL
/tasks
-
Method:
POST
-
URL Params
Required:
token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhcmlmIiwiaWF0IjoxNTgxNjY0NTgzfQ.mRMIr1EyfdKXrj86mPrQogjY5XQiL6VvWR-xi8UEYdw'
And
id=[integer]
-
Data Params
`title=[string]` `CategoryId=[integer]` `UserId=[integer]`
-
Success Response:
- Code: 200 OK
Content:{ "id": 84, "title": "initial", "CategoryId": 1, "UserId": 1, "createdAt": "2020-02-12T19:19:06.402Z", "updatedAt": "2020-02-12T19:19:06.402Z" }
- Code: 200 OK
-
Error Response:
-
Code: 400 Bad Request
Content:{ "message": [ "Validation notEmpty on title failed", "Validation notEmpty on CategoryId failed" ] }
OR
-
Code: 500 Internal Server Error
Content:{ "message": "Internal Server Error" }
-
Sample Call:
axios .post(`${process.env.BASE_URL}/tasks`)
Returns json data.
-
URL
/tasks/id
-
Method:
PUT
-
URL Params
Required:
token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhcmlmIiwiaWF0IjoxNTgxNjY0NTgzfQ.mRMIr1EyfdKXrj86mPrQogjY5XQiL6VvWR-xi8UEYdw'
And
`id=[integer]`
-
Data Params
None
-
Success Response:
- Code: 200 OK
Content:{ "id": 84, "title": "initial", "CategoryId": 1, "UserId": 1, "createdAt": "2020-02-12T19:19:06.402Z", "updatedAt": "2020-02-12T19:19:06.402Z" }
- Code: 200 OK
-
Error Response:
- Code: 404 Not Found
Content:{ "message": "Data Not Found" }
OR
- Code: 401 Unauthorize
Content:{ "message": "Not aceppted" }
OR
- Code: 500 Internal Server Error
Content:{ "message": "Internal Server Error" }
- Code: 404 Not Found
-
Sample Call:
axios .put(`${process.env.BASE_URL}/tasks/id`)
Returns json data.
-
URL
/tasks/id
-
Method:
Delete
-
URL Params
Required:
token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhcmlmIiwiaWF0IjoxNTgxNjY0NTgzfQ.mRMIr1EyfdKXrj86mPrQogjY5XQiL6VvWR-xi8UEYdw'
And
`id=[integer]`
-
Data Params
None
-
Success Response:
- Code: 200 OK
Content:{ "id": 84, "title": "initial", "CategoryId": 1, "UserId": 1, "createdAt": "2020-02-12T19:19:06.402Z", "updatedAt": "2020-02-12T19:19:06.402Z" }
- Code: 200 OK
-
Error Response:
- Code: 404 Not Found
Content:{ "message": "Data Not Found" }
OR
- Code: 401 Unauthorize
Content:{ "message": "Not aceppted" }
OR
- Code: 500 Internal Server Error
Content:{ "message": "Internal Server Error" }
- Code: 404 Not Found
-
Sample Call:
axios .delete(`${process.env.BASE_URL}/tasks/id`)