WattDepot logo WattDepot3 HTTP API: Sensor Locations

GET /wattdepot/{group_id}/locations/

http://server.wattdepot.org/wattdepot/{group_id}/locations/ Response
		      
[
   {
      "description": "Hale Aloha Ilima residence hall 6th floor",
      "altitude": 30,
      "longitude": -157.812727,
      "latitude": 21.294642,
      "id": "ilima-6th"
   },
   {
      "description": "Hale Aloha Ilima residence hall 7th floor",
      "altitude": 35,
      "longitude": -157.812727,
      "latitude": 21.294642,
      "id": "ilima-7th"
   }
]
		      
		    

Get a full list of defined Locations for the given user group.

GET /wattdepot/{group_id}/location/{location_id}

http://server.wattdepot.org/wattdepot/{group_id}/location/ilima-6th Response
              
{
   "description": "Hale Aloha Ilima residence hall 6th floor",
   "altitude": 30,
   "longitude": -157.812727,
   "latitude": 21.294642,
   "id": "ilima-6th"
}
              
            

Get the Location with the given location_id for the given user group.

PUT /wattdepot/{group_id}/location/

curl -X PUT -H "ContentType: application/json" -d '{"description":"Hale Aloha Ilima residence hall 6th floor","altitude":30,"longitude":-157.812727,"latitude":21.294642,"id":"ilima-6th"}' http://server.wattdepot.org/wattdepot/{group_id}/location/
              
              
            

Add the Location for the given user group. Will return the HTTP status. Error status if duplicate unique id.

DEL /wattdepot/{group_id}/location/{location_id}

curl -X DELETE http://server.wattdepot.org/wattdepot/{group_id}/location/ilima-6th
              
              
            

Deletes the Location with the given location_id for the given user group. Will return the HTTP status. Error status if the location_id is not defined.