Skip to content
RyanBaxter999 edited this page Feb 25, 2015 · 16 revisions

Use this page to start creating an API of what end points the front end needs.

EX: URL "/tours/dailypage" JSON: {Tour:Boating Tour, Starttime:5:00pm}


  • URL: "/events"
  • TYPE: "get"
  • JSON: [{title: "Event 1", time: "1/1/2016 3:00:00", groupId: 2342342}, {title: "Event 2", time: "1/1/2016 5:00:00", groupId: 2342342}]


  • URL: "/resources"
  • TYPE: "get"
  • JSON: [{title: "Bus 1", events: [<array of upcoming events>], id: 2342342}, {title: "Bus 2", events: [<array of upcoming events>], id: 234sd342}]


  • URL: "/addTour" (if you prefer a different style than camel case just change it)
  • TYPE: "post"
  • To Server JSON: {owner: "Bob Smith", timeArrive: , timeLeave: , type: "Boat Plane Crab Overnight Tour", resources: {}}
  • JSON Response: {response: (true/false)} *Description: Add a tour.


  • URL: "/addNewTourType"
  • TYPE: "post"
  • To Server JSON: {type: "Boat Plane Crab Overnight Tour"}
  • JSON Response: {response: (true/false)} *Description: Add a new type of tour.


  • URL: "/getTourConflicts"
  • TYPE: "get"
  • JSON: [{title: "Bus 1", events: [<array of upcoming events>], id: 2342342}, {title: "Bus 2", events: [<array of upcoming events>], id: 234sd342}] *Description: This should return a list of paired tours


  • URL: "/getCruiseConflicts"
  • TYPE: "get"
  • JSON: [{title: "Bus 1", events: [<array of upcoming events>], id: 2342342}, {title: "Bus 2", events: [<array of upcoming events>], id: 234sd342}] *Description: This should return a list of tours that are no longer valid because of cruise changes


  • URL: "/getAvailableTourTimes"
  • TYPE: "get"
  • To Server JSON: {time: SinceEpochToDate}
  • JSON Response: [{title: "Boat and Crab Tour", resources: {<object with all the needed resources and their start and end times>}, id: 2342342}, {title: "Boat Tour", resources: {<object with all the needed resources and their start and end times>}, id: 234sd342}] *Description: Client sends a specific day to the server. Return a list of tours that fit between existing tours for that day.


  • URL: "/getCruiseShipSchedules"
  • TYPE: "get"
  • JSON Response: [{title: "Norwegian Dawn", timeArrive: <SinceEpochToDate>, timeLeave: <SinceEpochToDate>}, {title: "Norwegian Breakaway", timeArrive: <SinceEpochToDate>, timeLeave: <SinceEpochToDate>}] *Description: Get all cruise ship information for the entire calendar year.


  • URL: "/getMessages"
  • TYPE: "get"
  • JSON Response: [{author: "Bob Smith", timeAdded: <SinceEpochToDate>, message: "Hey everyone! lol.", id: 234sd342}, {author: "John Grey", timeAdded: <SinceEpochToDate>, message: "Bob, this is for important messages.", id: 234sd343}] *Description: Get all the messages added in the past week.


  • URL: "/addMessages"
  • TYPE: "post"
  • To Server JSON: {author: "Bob Smith", message: "Hey everyone! lol."}
  • JSON Response: {response: (true/false)} *Description: Add a message.

Login Request: POST Url: api/login JSON: {username, password}

Create User Request: POST Url: api/user JSON: {user}

Get User Request: GET Url: api/user/userid

Update User Request: PUT Url: api/user JSON: {user}

Delete User Request: DELETE Url: api/user/userid

Clone this wiki locally