Base URL = https://notesdb-server.herokuapp.com
All API must use this authentication
Request:
- Header :
- X-Api-Key : "your secret api key"
Request :
- Method : POST
- Endpoint :
/v1/users/register
- Header :
- Content-Type: application/json
- Body :
{
"name":"Ujang Burka",
"email":"[email protected]",
"password":"qwert"
}
Response :
{
"success": "true",
"message": "{jwt token}"
}
Request :
- Method : POST
- Endpoint :
/v1/users/login
- Header :
- Content-Type: application/json
- Body :
{
"email":"[email protected]",
"password":"qwerty"
}
Response :
{
"success": "true",
"message": "{jwt token}"
}
Request :
- Method : GET
- Endpoint :
/v1/notes
- Header :
- Content-Type: application/json
- Authorization : Bearer Token
Response :
{
"id":"1",
"noteTitle":"First Note",
"description":"This is description",
"date":"121221"
}
Request :
- Method : POST
- Endpoint :
/v1/notes/create
- Header :
- Content-Type: application/json
- Authorization : Bearer Token
- Body :
{
"id":"1",
"noteTitle":"First Note",
"description":"This is description",
"date":"121221"
}
Response :
{
"success": "true",
"message": "Note Added Successfully!"
}
Request :
- Method : POST
- Endpoint :
/v1/notes/update
- Header :
- Content-Type: application/json
- Authorization : Bearer Token
- Body :
{
"id":"1",
"noteTitle":"First Note",
"description":"This is description",
"date":"121221"
}
Response :
{
"success": "true",
"message": "Update Added Successfully!"
}
Request :
- Method : DELETE
- Endpoint :
/v1/notes/delete?id={id}
- Header :
- Content-Type: application/json
- Authorization : Bearer Token
- Query Param :
- id : string
Response :
{
"success": "true",
"message": "Delete Added Successfully!"
}