added new maxVals spec

This commit is contained in:
dorian 2019-07-30 13:08:00 +02:00
parent 9981696d91
commit 07f715eac9

View file

@ -63,7 +63,12 @@ triggered by setting GET parameter 'locId' to a vaild location id
- range: range of the data to display in unix time - range: range of the data to display in unix time
- from - from
- to - to
- max vals: maximum measvals to be transmitted; if more are present in the timespan, the avarage will be calculated - max vals:
- count: maximum measvals to be transmitted
- mode: can be:
- 'newest': will return the newest <maxVals> values
- 'oldest': will return the oldest <maxVals> values
- 'avg' : <maxVals> sub avarages will be calculated
### Tags ### Tags
- id - id
@ -101,7 +106,7 @@ triggered by setting GET parameter 'locId' to a vaild location id
triggered by setting POST parameter 'submitSensorData' to a JSON encoded string containing the request triggered by setting POST parameter 'submitSensorData' to a JSON encoded string containing the request
### Request ### Request
- identity: identity of the api token (given by webinterface) - identity: identity of the api token (given by webinterface)
- signature: SHA1 Hash of the JSON encoded string of 'data' rsa encrypted with the API Key as private key - signature: hash_hmac with SHA256 of 'data' string with an API-key as key
- data: JSON array[array[ - data: JSON array[array[
sensorId, sensorId,
measvalue, measvalue,
@ -120,3 +125,4 @@ triggered by setting POST parameter 'submitSensorData' to a JSON encoded string
- data: Array[Array[sensorId, errorCode]] sensors which were ignored due to some error (401: user doesn't own sensor; 404: senso wasn't found) - data: Array[Array[sensorId, errorCode]] sensors which were ignored due to some error (401: user doesn't own sensor; 404: senso wasn't found)
only set if status is 901 only set if status is 901
##