diff options
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 |