This is an API created by our cloud computing team. We built it using Node.js and Express and deployed it using the Google Cloud Platform service. The main feature of this API is to provide recommendations for tourist destinations based on rating, distance, and user input. Of course, this API still has some shortcomings and can be further developed in the future.
- Node JS
- Express
- Cloud Run
- App Engine
- Cloud Sql
- Cloud Storage
- login to GCP account
- make cloud storage
- make database in cloud sql
- git clone our ML API repo
- make docker image with dockerfile
- use image for running in cloud run
- git clone our CC API repo
- put link endpoint cloud run into CC API
- deploy CC code in app engine
- give end point to MD team
https://capstoneproject-387305.uc.r.appspot.com
- URL
/register
- Method
- POST
- Request Body
usernameasstringemailasstringpasswordasstringminimal 8 karakter
- Response
{
"error": false,
"message": "User Created"
}- URL
/login
- Method
- POST
- Request Body
emailasstringpasswordasstring
- Response
{
"error": false,
"message": "success",
"loginResult": {
"userId": 1,
"username": "Arif Faizin",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c2VyLXlqNXBjX0xBUkNfQWdLNjEiLCJpYXQiOjE2NDE3OTk5NDl9.flEMaQ7zsdYkxuyGbiXjEDXO8kuDTcI__3UjCwt6R_I"
}
}- URL
/changePassword/:id
- Method
- PUT
- Headers
Authorization:Bearer <token>
- Request Body
oldPasswordasstringnewPasswordasstring
- Response
{
"error": false,
"message": "Password is updated"
}- URL
/user/:id
- Method
- GET
- Headers
Authorization:Bearer <token>
- Response
{
"error": false,
"message": "User found",
"userData": {
"userId": 1,
"username": "Tono Ganteng",
"email": "ferrari@mail.com",
"img": "http://blablabal"
}
}- URL
/changePhoto/:id_user
- Method
- PUT
- Headers
Content-Type:multipart/form-dataAuthorization:Bearer <token>
- Request Body
photoasfile
- Response
{
"error": false,
"message": "Photo profile is updated",
"img": "https://halohalo"
}- URL
/destinasi
- Method
- GET
- Headers
Authorization:Bearer <token>
- Response
{
"error": false,
"message": "List Destinasi",
"ListDestinasi": [
{
"id": 1,
"name": "Gunung Salak",
"rating": 3.7,
"lat": 12.45654,
"lon": 10.23423,
"img": "https://halohalo",
"city": "Surabaya"
},
{
"id": 2,
"name": "Padang pasir",
"rating": 4.1,
"lat": 11.45054,
"lon": 10.23423,
"img": "https://testestes",
"city": "Magelang"
}
]
}- URL
/findDestinasi
- Method
- POST
- Headers
Authorization:Bearer <token>
- Request Body
descriptionasstring
- Response
{
"error": false,
"message": "List Destinasi",
"ListDestinasi": [
{
"id": 1,
"name": "Gunung Salak",
"rating": 3.7,
"lat": 12.45654,
"lon": 10.23423,
"img": "https://halohalo",
"city": "Surabaya"
},
{
"id": 2,
"name": "Padang pasir",
"rating": 4.1,
"lat": 11.45054,
"lon": 10.23423,
"img": "https://testestes",
"city": "Magelang"
}
]
}- URL
/detail/:id_destinasi
- Method
- GET
- Headers
Authorization:Bearer <token>
- Response
{
"error": false,
"message": "Detail Destinasi",
"detailDestinasi": {
"id": 1,
"name": "Gunung Salak",
"description": "lorem ipsum sit amet satu dua tiga",
"city": "Magelang",
"address": "Jl. Rumah kamu no 1",
"category": "Nature",
"rating": 3.7,
"lat": 12.45654,
"lon": 10.23423,
"img": "https://halohalo"
}
}- URL
/recomByDistance
- Method
- POST
- Headers
Authorization:Bearer <token>
- Request Body
latitudeasdoublelongitudeasdouble
- Response
{
"error": false,
"message": "List Destinasi",
"ListDestinasi": [
{
"id": 1,
"name": "Gunung Salak",
"rating": 3.7,
"lat": 12.45654,
"lon": 10.23423,
"img": "https://halohalo",
"city": "Surabaya"
},
{
"id": 2,
"name": "Padang pasir",
"rating": 4.1,
"lat": 11.45054,
"lon": 10.23423,
"img": "https://testestes",
"city": "Magelang"
}
]
}- URL
/listCity
- Method
- POST
- Headers
Authorization:Bearer <token>
- Request Body
cityasstring
- Response
{
"error": false,
"message": "List Destinasi",
"ListDestinasi": [
{
"id": 1,
"name": "Gunung Salak",
"rating": 3.7,
"lat": 12.45654,
"lon": 10.23423,
"img": "https://halohalo",
"city": "Surabaya"
},
{
"id": 2,
"name": "Padang pasir",
"rating": 4.1,
"lat": 11.45054,
"lon": 10.23423,
"img": "https://testestes",
"city": "Surabaya"
}
]
}