From 7d863da9bcaca49805afad23868b36c82b8602d0 Mon Sep 17 00:00:00 2001 From: Ernst Widerberg Date: Fri, 8 Oct 2021 15:57:59 +0200 Subject: Edit README: Add env var --- README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'README.md') diff --git a/README.md b/README.md index 5876649..d4af5c0 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ Start CouchDB and the collector. Make sure to give it a username and password: export COUCHDB_USER=couchdb export COUCHDB_PASSWORD=insecure export COUCHDB_NAME=test + export COUCHDB_HOSTNAME=couchdb docker-compose up Now the database and the API server should be running, now we can try -- cgit v1.1 From c3330191348b19be264eabf5e0acd5fb97f0568d Mon Sep 17 00:00:00 2001 From: Kristofer Hallin Date: Wed, 13 Oct 2021 08:57:25 +0200 Subject: Updated readme. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index d4af5c0..4348660 100644 --- a/README.md +++ b/README.md @@ -93,3 +93,7 @@ Try retreiving all observations for a user with read access to 'sunet.se': We might also filter the data: curl -s -u user1:pw1 http://localhost:80/sc/v0/get?port=111 | json_pp -json_opt utf8,pretty + +Believe it or not, but we can also get a single observation by looking up its key: + + curl -s -u user1:pw1 http://localhost:80/sc/v0/get/1633633714355 | json_pp -json_opt utf8,pretty -- cgit v1.1 From 583542443adb2d66208dacb71581bc2936c59201 Mon Sep 17 00:00:00 2001 From: Kristofer Hallin Date: Thu, 14 Oct 2021 09:48:17 +0200 Subject: Find, now with pagination! Use limit and skip to get the results you want. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 4348660..8ef8971 100644 --- a/README.md +++ b/README.md @@ -97,3 +97,7 @@ We might also filter the data: Believe it or not, but we can also get a single observation by looking up its key: curl -s -u user1:pw1 http://localhost:80/sc/v0/get/1633633714355 | json_pp -json_opt utf8,pretty + +We can also limit the number of results and skip N results forward with the parameters limit and skip: + + curl -s -u user1:pw1 http://localhost:80/sc/v0/get?limit=5&skip=2 | json_pp -json_opt utf8,pretty -- cgit v1.1