diff --git a/req.sh b/req.sh index c2d3295..a3997b6 100755 --- a/req.sh +++ b/req.sh @@ -73,6 +73,31 @@ elif [[ $1 == "geo" ]]; then curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $(cat tmp.token)" \ -d "{ \"requests\": [ { \"type\": 2, \"mark\": \"$2\" } ] }" \ "$ADDR/data/geo/getSerial" | jq +elif [[ $1 == "argus" ]]; then + curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $(cat tmp.token)" \ + "$ADDR/settings/argusServerAddr?device=A56AF66F17D902B8" | jq +elif [[ $1 == "argus1" ]]; then + curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $(cat tmp.token)" \ + -d "{ \"device\": \"A56AF66F17D902B8\", \"addr\": \"test-addr1\" }" \ + "$ADDR/settings/argusServerAddr" | jq +elif [[ $1 == "argus2" ]]; then + curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $(cat tmp.token)" \ + "$ADDR/settings/argusSerial?device=A56AF66F17D902B8" | jq +elif [[ $1 == "argus3" ]]; then + curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $(cat tmp.token)" \ + -d "{ \"device\": \"A56AF66F17D902B8\", \"argusSerial\": \"argus-test-erial\" }" \ + "$ADDR/settings/argusSerial" | jq +elif [[ $1 == "device-group" ]]; then + curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $(cat tmp.token)" \ + "$ADDR/settings/deviceGroup?device=A56AF66F17D902B8" | jq +elif [[ $1 == "device-group1" ]]; then + curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $(cat tmp.token)" \ + -d "{ \"device\": \"A56AF66F17D902B8\", \"group\": 4 }" \ + "$ADDR/settings/deviceGroup" | jq +elif [[ $1 == "transport-group-create" ]]; then + curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $(cat tmp.token)" \ + -d "{ \"name\": \"test-group-1\" }" \ + "$ADDR/transport/createGroup" | jq elif [[ $1 == "sensor-data" ]]; then curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $(cat tmp.token)" \ -d "{ \"device\": \"2025082700003820\", \"sensor\": \"TEMPERATURE/PIIZI_TEMPERATURE_1\", \"start\": $(($(date +%s)-5000)), \"end\": $(date +%s), \"skip\": 1 }" \