diff options
author | Kristofer Hallin <kristofer@sunet.se> | 2021-10-18 15:17:10 +0200 |
---|---|---|
committer | Kristofer Hallin <kristofer@sunet.se> | 2021-10-18 15:17:10 +0200 |
commit | 24fb5eb57531f20d1f394d145833cc31016e86ee (patch) | |
tree | 52ec028ff720000c480b1000c3db53021ff3fb60 /README.md | |
parent | 99f02077ed897b73fb9f452926e8f3f1fed72358 (diff) | |
parent | 34a353a539f71b6a87413b58ea483b36f94e3516 (diff) |
Fixed merge conflicts.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 |