summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnst Widerberg <ernst@sunet.se>2022-03-01 14:21:14 +0100
committerErnst Widerberg <ernst@sunet.se>2022-03-01 14:21:14 +0100
commitb4d8068530b94b2cc7a0cbd397b029fc8d9fcd68 (patch)
treea4a34e587faf99610254beebdd8c330ca7829d10
parent39daeb344c3d2d885817041a97d2827ff8aa61fb (diff)
Update README, do-as for collector's new https location
-rw-r--r--README.md10
-rwxr-xr-xdo-as2
2 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index d39b006..c2f1325 100644
--- a/README.md
+++ b/README.md
@@ -63,23 +63,23 @@ adding some observations. First, get a JWT for the default user `usr`:
Then we use the JWT to add an observation (defined in `example_data.json`):
- curl -s --data-binary @example_data.json -H "Authorization: Bearer $JWT" http://localhost:80/sc/v0/add
+ curl -s --data-binary @example_data.json -H "Authorization: Bearer $JWT" https://localhost:1443/sc/v0/add
Try retreiving all observations permitted by our JWT:
- curl -s -H "Authorization: Bearer $JWT" http://localhost:80/sc/v0/get | json_pp -json_opt utf8,pretty
+ curl -s -H "Authorization: Bearer $JWT" https://localhost:1443/sc/v0/get | json_pp -json_opt utf8,pretty
We might also filter the data:
- curl -s -H "Authorization: Bearer $JWT" http://localhost:80/sc/v0/get?port=111 | json_pp -json_opt utf8,pretty
+ curl -s -H "Authorization: Bearer $JWT" https://localhost:1443/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 (_id):
- curl -s -H "Authorization: Bearer $JWT" http://localhost:80/sc/v0/get/1633633714355 | json_pp -json_opt utf8,pretty
+ curl -s -H "Authorization: Bearer $JWT" https://localhost:1443/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 -H "Authorization: Bearer $JWT" 'http://localhost:80/sc/v0/get?limit=5&skip=2' | json_pp -json_opt utf8,pretty
+ curl -s -H "Authorization: Bearer $JWT" 'https://localhost:1443/sc/v0/get?limit=5&skip=2' | json_pp -json_opt utf8,pretty
## Tips and tricks
diff --git a/do-as b/do-as
index 8d5cdaa..87c5a72 100755
--- a/do-as
+++ b/do-as
@@ -14,4 +14,4 @@ shift
shift
JWT=$(curl http://localhost:8000/api/v1.0/auth -X POST -p -u "$USER:pwd" | jq -r .access_token)
-curl -s -H "Authorization: Bearer $JWT" http://localhost:80/sc/v0/$CMD "$@"
+curl -s -H "Authorization: Bearer $JWT" https://localhost:1443/sc/v0/$CMD "$@"