historic_02_api_query.sh 478 Bytes
Newer Older
1 2 3 4 5 6
#!/usr/bin/env bash

[[ -z "$QUANTUM_HOST" ]] && echo "Please set QUANTUM_HOST env var. E.g. export QUANTUM_HOST=127.0.0.1" && exit
echo "Querying QuantumLeap API at: ${QUANTUM_HOST}"

curl --location --request GET \
7
    "http://$QUANTUM_HOST:8668/v2/entities/urn:ngsi-ld:FlowerBed:FlowerBed-1/attrs/soilMoisture/value?limit=100" \
8
    --header "Fiware-Service: carouge" \
9
    --header "Fiware-ServicePath: /" \
10 11
    --header "Accept: application/json"
    #| python -mjson.tool