ksmandersen / ITU-Strathmore

Repository for Global Software Development collaboration project between ITU and Strathmore University
0 stars 0 forks source link

Web Server, communication with Pi #8

Open anitsirc opened 11 years ago

anitsirc commented 11 years ago
anitsirc commented 11 years ago

Example of request with multiple observations.

 
POST http://localhost:8888/_ah/api/occupancyPredictionAPI/v1/add_observations
Content-Type:  application/json
X-JavaScript-User-Agent:  Google APIs Explorer

{
 "observationList": [
  {
   "camera": "CAM-02",
   "captureDate": "2012-03-03",
   "occupancy": true
  },
  {
   "camera": "CAM-03",
   "captureDate": "2012-03-04",
   "occupancy": false
  },
  {
   "camera": "CAM-02",
   "captureDate": "2012-03-04",
   "occupancy": false
  }
 ]
}
anitsirc commented 11 years ago

For a single observation.


POST https://itu-strath-occupancy.appspot.com/_ah/api/occupancyPredictionAPI/v1/observation
Content-Type:  application/json
X-JavaScript-User-Agent:  Google APIs Explorer

{
 "camera": "CAM-02",
 "captureDate": "2011-02-02T12:13:33",
 "occupancy": false
}