External Monitor Script

#!/bin/bash TOKEN=curl -s -k https://portal.lab.intelligent-home.jp/icoauth/oauth2/token -d ‘grant_type=client_credentials&client_id=as-client&client_secret=02875f01-6add-48fc-8c4f-d1693ba0695e&principal_attribute_extRef=exr999999’ | sed ‘s/.access_token":“//g’ | sed 's/”.//g’` curl -k -w “%{http_code}” -s -H “Authorization: Bearer ${TOKEN}” -H “Content-Type: application/json” -X POST -d ‘{ “service”: “sgs”, “siteId”: “123.4”, “data”: {“customerAccount”: “140601002”, “contactIds”: [ “140601002” ] } }’ https://ias.lab.intelligent-home.jp/alarm/icontrol