feat: all req script

This commit is contained in:
Andrey Egorov
2025-10-17 20:25:25 +03:00
parent 3450a97a03
commit 30279f4649
2 changed files with 40 additions and 2 deletions

12
req.sh
View File

@@ -1,7 +1,7 @@
#ADDR=api-fema.ekatgortrans.ru:39080
#ADDR=https://api.fema.krbl.ru
#ADDR=62.217.183.88:8080
ADDR=0.0.0.0:8080
ADDR=0.0.0.0:8080/api/v1
LOGIN=admin
PASSWORD=admin
#PASSWORD=IR7?BoouErjhXsxg
@@ -92,8 +92,16 @@ elif [[ $1 == "device-group" ]]; then
"$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 }" \
-d "{ \"device\": \"A56AF66F17D902B8\", \"group\": 3 }" \
"$ADDR/settings/deviceGroup" | jq
elif [[ $1 == "logs-amount" ]]; then
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $(cat tmp.token)" \
-d "{ \"devices\": [ \"A56AF66F17D902B8\" ] }" \
"$ADDR/data/logs/getLogsAmount" | jq
elif [[ $1 == "logs" ]]; then
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $(cat tmp.token)" \
-d "{ \"devices\": [ \"A56AF66F17D902B8\" ], \"page_number\": 1, \"page_size\": 1000, \"search\": \"test%\", \"order\": [ [\"time\", \"+\" ] ] }" \
"$ADDR/data/logs/getLogs" | 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\" }" \