admin_historic_get_tables.sh 477 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash

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

curl --location --request POST \
    "http://CRATE_HOST:4200/_sql" \
    --header "Fiware-Service: carouge" \
    --header "Fiware-ServicePath: /Watering" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data '{
        "stmt":"SHOW TABLES"
        }'