aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2012-09-27 03:52:17 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2012-09-27 03:52:17 +0200
commit5592ec33660ddb56b2c95b52baf531bc6525c007 (patch)
tree9af1f0d157eccc554c30884b73e95c9ec88e1a8b
parent91e2d0a6fd6dfea0d9f937a3e7e0fd5d6272af3f (diff)
downloadnanocloudlogger-5592ec33660ddb56b2c95b52baf531bc6525c007.tar.gz
nanocloudlogger-5592ec33660ddb56b2c95b52baf531bc6525c007.zip
Update service and documentation.
-rw-r--r--README.md32
1 files changed, 28 insertions, 4 deletions
diff --git a/README.md b/README.md
index 4de53d3..7034480 100644
--- a/README.md
+++ b/README.md
@@ -46,15 +46,39 @@ Parameters
format Defines type of response output.
limit Limits number of output records.
-Examples of usage: http://localhost:8080/api/get?stream=my_sensor_stream http://localhost:8080/api/get?stream=my_sensor_stream&format=json http://localhost:8080/api/get?stream=my_sensor_stream&lastid=50&limit=5&format=csv
+Examples of usage:
-Examples of response: JSON [{ "input": "temperature", "data": "28", "id": 6, "datetime": "2012-09-27 00:54:00.441780" }, { "input": "photocell", "data": "897", "id": 5, "datetime": "2012-09-27 00:54:00.439565" }] CSV 6,2012-09-27 00:54:00.441780,temperature,28 5,2012-09-27 00:54:00.439565,photocell,897
+ http://localhost:8080/api/get?stream=my_sensor_stream
+ http://localhost:8080/api/get?stream=my_sensor_stream&format=json
+ http://localhost:8080/api/get?stream=my_sensor_stream&lastid=50&limit=5&format=csv
+
+Examples of response:
+
+ JSON
+ [{ "input": "temperature", "data": "28", "id": 6, "datetime": "2012-09-27 00:54:00.441780" },
+ {"input": "photocell", "data": "897", "id": 5, "datetime": "2012-09-27 00:54:00.439565" }]
+
+ CSV
+ 6,2012-09-27 00:54:00.441780,temperature,28
+ 5,2012-09-27 00:54:00.439565,photocell,897
Adding tool data stream
--------------------
Examples: http://localhost:8080/api/set?stream=my_sensor_stream
API url: /api/set
- Method: POST
+ Method: POST
Returns: status
-Examples of usage: http://localhost:8080/api/set?stream=my_sensor_stream POST varibles with this request: key value -------------------------------- temperature 28 photocell 755 ...
+
+Examples of usage:
+
+ http://localhost:8080/api/set?stream=my_sensor_stream
+
+ POST varibles with this request:
+ key value
+ --------------------------------
+ temperature 28
+ photocell 755
+ ...
+
+