From 07f715eac9d5d59a636bd91610f55e11da47c896 Mon Sep 17 00:00:00 2001 From: dorian Date: Tue, 30 Jul 2019 13:08:00 +0200 Subject: [PATCH] added new maxVals spec --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c666811..062b2b4 100755 --- a/README.md +++ b/README.md @@ -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 - from - 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 values + - 'oldest': will return the oldest values + - 'avg' : sub avarages will be calculated ### Tags - 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 ### Request - 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[ sensorId, 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) only set if status is 901 +## \ No newline at end of file