TripPlanr RESTful Server Documentation - really-lazy-bone/TripPlanr-RESTful-Server GitHub Wiki

Welcome to the TripPlanr-RESTful-Server wiki!

• Currently you can access the server homepage at http://ec2-54-200-230-148.us-west-2.compute.amazonaws.com:8080/ (we will shortly open port http 80)

## • URI Patterns

Access for user
/user/
/user/{userID} example
/user/1
http://ec2-54-200-230-148.us-west-2.compute.amazonaws.com:8080/user/
create user:
http://ec2-54-200-230-148.us-west-2.compute.amazonaws.com:8080/user/signup

post:{"deviceId":""}
return:{"user":[]}

get user by id
http://ec2-54-200-230-148.us-west-2.compute.amazonaws.com:8080/user/1

get trips by user id
http://ec2-54-200-230-148.us-west-2.compute.amazonaws.com:8080/trip/list/1

create trip
trips/trip/create
post: trip json object
return: result
sample
trips/trip/create
post:{"userId":1,"trip":{"name":"MY TRIP2","startTime":"2014-06-30","routes":[{"fromLocation":{"address":"here11","name":"no name11","type":"WALKING","notes":"","lon":-31.132322,"lat":132.3123},"toLocation":{"address":"here22","name":"no name21","type":"DRIVING","notes":"","lon":-31.132321,"lat":122.3123},"travelMethod":"DRIVING"},{"fromLocation":{"address":"here23","name":"no name25","type":"","notes":"","lon":-31.1323443,"lat":21.3123},"toLocation":{"address":"here33","name":"no name33","type":"","notes":"","lon":-31.135222,"lat":132.3123},"travelMethod":"DRIVING"}],"defaultTravelMethod":"DRIVING"}}

delete trip
trips/trip/delete/{userId}/{tripName}
sample
trips/trip/delete/1/MY+TRIP2

get trips by user id
trips/trip/list/{userId}
sample
trips/trip/list/1

update trip trips/trip/update
post trip json object
sample
trips/trip/update
post:{"userId":1,"tripName":"MY TRIP2","trip":{"name":"MY TRIP3","startTime":"2014-06-30","routes":[{"fromLocation":{"address":"here111","name":"no name111","type":"WALKING","notes":"","lon":-31.132322,"lat":132.3123},"toLocation":{"address":"here222","name":"no name21","type":"DRIVING","notes":"","lon":-31.132321,"lat":122.3123},"travelMethod":"DRIVING"},{"fromLocation":{"address":"here232","name":"no name252","type":"","notes":"","lon":-31.1323443,"lat":21.3123},"toLocation":{"address":"here33","name":"no name33","type":"","notes":"","lon":-31.135222,"lat":132.3123},"travelMethod":"DRIVING"}],"defaultTravelMethod":"DRIVING"}}

CRUD
C
R
U
D

⚠️ **GitHub.com Fallback** ⚠️