host=”192.168.1.199″
post=”8888″
pre=”/api/v1″
url_pre=”http://${host}:${post}${pre}”
get_token=”curl –location –request GET ${url_pre}/token?access_id=admin&access_secret=123456&=”
echo $get_token
token=$($get_token)
echo $token
token=$(echo $token | jq “.data.token”)
token=${token:1:-1}
echo $token
curl –location –request POST ${url_pre}/device/runtime_data?token=${token} –header ‘Content-Type: application/json’ –data-raw ”
post=”8888″
pre=”/api/v1″
url_pre=”http://${host}:${post}${pre}”
get_token=”curl –location –request GET ${url_pre}/token?access_id=admin&access_secret=123456&=”
echo $get_token
token=$($get_token)
echo $token
token=$(echo $token | jq “.data.token”)
token=${token:1:-1}
echo $token
curl –location –request POST ${url_pre}/device/runtime_data?token=${token} –header ‘Content-Type: application/json’ –data-raw ”
© 版权声明
文章版权归作者所有,未经允许请勿转载。