summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorKristofer Hallin <kristofer@sunet.se>2021-10-18 15:17:10 +0200
committerKristofer Hallin <kristofer@sunet.se>2021-10-18 15:17:10 +0200
commit24fb5eb57531f20d1f394d145833cc31016e86ee (patch)
tree52ec028ff720000c480b1000c3db53021ff3fb60 /README.md
parent99f02077ed897b73fb9f452926e8f3f1fed72358 (diff)
parent34a353a539f71b6a87413b58ea483b36f94e3516 (diff)
Fixed merge conflicts.
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/README.md b/README.md
index 5876649..8ef8971 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
@@ -92,3 +93,11 @@ 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
+
+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