https://travel-journal-api.cyclic.app/
This is a REST Api which keeps track of your destinations travelled in a particular country along with your experience, the api is equipped with user authentication and one can create, read, update and delete (CRUD) the data
- /api/v1/auth/register
- /api/v1/auth/login
- /api/v1/destinations/
- /api/v1/destinations/:id
Email Validation Regex
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/image link Validation Regex
/^(http(s):\/\/.)[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/- call post method on route :- /api/v1/auth/register
- pass the details of user in following format:-
- eg. { "name":"abc", "email":"[email protected]", "password":"abcdefg" }
- call post method on route :- /api/v1/auth/login
- pass the details of user in following format:-
- eg. { "email":"[email protected]", "password":"abcdefg" }
- call post method on route :- /api/v1/destinations/
- pass the details in following format to store data:-
- eg. { "country":"India", "name":"Himachal", "img":"https://unsplash.com/photos/qIXdhJz7Rns", "rating":4, "description":"" }
- call get method on route :- /api/v1/destinations/
- call get method on route :- /api/v1/destinations/:id
- pass _id of object one wanted present in destinations array in parameter {id}
- call patch method on route :- /api/v1/destinations/:id
- pass _id of object one wanted present in destinations array in parameter {id}
- pass the details in following format to store data:-
- eg. { "name":"Himachal", "img":"https://unsplash.com/photos/XW9LTxbeS9Q", "rating":5, "description":"" }
- call delete method on route :- /api/v1/destinations/:id
- pass _id of object one wanted present in destinations array in parameter {id}
- helmet
- cors
- xss-clean
- express-rate-limit
Swagger UI
/destinations/{id}:
parameters:
- in: path
name: id
schema:
type: string
required: true
description: the destination id