-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Proposed API description:
Purpose: Query sensor readings for a specific type of sensor, for all devices, for a specific readable time range.
Method: GET
URL: http://einstein.sv.cmu.edu/sensors_in_time_frame/<"start_time">/<"end_time">/<"sensor_type">/<"result_format">?dateformat=ISO8601
Semantics:
- start_time: Start readable time to retrieve the sensor readings.
- end_time: End readable time to retreive the sensor readings.
- sensor_type: Type of the sensor (e.g., temperature, CO2, etc.) to retrieve its readings.
- result_format: Either json or csv.
Sample Usages:
Sample csv request: http://einstein.sv.cmu.edu/sensors_in_time_frame/05-04-2013T12:00:00/05-05-2013T12:00:00/temp/csv?dateformat=ISO8601
Sample csv result: (device_id,timestamp,sensor_type,value)
10170102,05-04-2013T12:00:00,temp,517.0
...
10170102,05-05-2013T12:00:00,temp,518.0
Sample json request: http://einstein.sv.cmu.edu/sensors_in_time_frame/05-04-2013T12:00:00/05-05-2013T12:00:00/temp/json?dateformat=ISO8601
Sample json result:
[{"time":05-04-2013T12:00:00,"sensor_type":"temp","value":517,"device_id":"10170102"}, ...
{"time":05-05-2013T12:00:00,"sensor_type":"temp","value":518,"device_id":"10170102"}]