security_02_request_without_token.sh 516 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#!/usr/bin/env bash

# reference doc: https://fiware-tutorials.readthedocs.io/en/latest/pep-proxy/index.html

[[ -z "$FIWARE_PROXY_HOST" ]] && echo "Please set FIWARE_PROXY_HOST env var. E.g. export FIWARE_PROXY_HOST=127.0.0.1" && exit
echo "Querying Fiware entrypoint (PEP_PROXY) at: ${FIWARE_PROXY_HOST}"

curl -X GET \
  "http://$FIWARE_PROXY_HOST:1027/v2/entities/urn:ngsi-ld:FlowerBed:FlowerBed-345/attrs/soilMoistureVwc/value"\
  --header "Fiware-Service: carouge" \
  --header "Fiware-ServicePath: /watering"