Authorization: Bearer ********************
// {
// "areaEnable": 0,
// "isEnable": 1,
// "isdel": 0,
// "ruleName": "144,设备,断电拆除/设备拔出预警",
// "ruleType": 31,
// "tenantId": "ding719b03ae7835ed5a35c2f4657eb6378f",
// "timeEnable": 0
// }
{
"areaEnable": 1,
// "areaId": 981, // 带区域ID时,忽略传输区域信息,不校验区域:areaId不为空时,shapeType、circles、areaPoints可不填
"circles": "119.461015,25.452319,0.12237603039430837",
"enableTimeFrom": "2022-01-01 00:00:00",
"enableTimeTo": "2023-12-31 00:00:00",
"isEnable": 1,
"isdel": 0,
"ruleName": "进出围栏",
"ruleType": 21,
"shapeType": 2,
"tenantId": "ding147f43fe2ab7311b35c2f4657eb6378f",
"timeEnable": 1
}
curl --location -g --request POST 'localhost:9000/api/rules?devices=12630152728' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '// {
// "areaEnable": 0,
// "isEnable": 1,
// "isdel": 0,
// "ruleName": "144,设备,断电拆除/设备拔出预警",
// "ruleType": 31,
// "tenantId": "ding719b03ae7835ed5a35c2f4657eb6378f",
// "timeEnable": 0
// }
{
"areaEnable": 1,
// "areaId": 981, // 带区域ID时,忽略传输区域信息,不校验区域:areaId不为空时,shapeType、circles、areaPoints可不填
"circles": "119.461015,25.452319,0.12237603039430837",
"enableTimeFrom": "2022-01-01 00:00:00",
"enableTimeTo": "2023-12-31 00:00:00",
"isEnable": 1,
"isdel": 0,
"ruleName": "进出围栏",
"ruleType": 21,
"shapeType": 2,
"tenantId": "ding147f43fe2ab7311b35c2f4657eb6378f",
"timeEnable": 1
}'
{
"code": 200,
"data": {
"areaEnable": 1,
"areaId": 1026,
"areaPoints": "[[119.462231,25.452318],[119.462216,25.452146],[119.462172,25.451977],[119.462099,25.451817],[119.461999,25.451669],[119.461875,25.451537],[119.46173,25.451425],[119.461567,25.451334],[119.46139,25.451268],[119.461205,25.451227],[119.461014,25.451214],[119.460824,25.451227],[119.460639,25.451268],[119.460462,25.451334],[119.460299,25.451425],[119.460154,25.451537],[119.46003,25.451669],[119.45993,25.451817],[119.459857,25.451977],[119.459813,25.452146],[119.459798,25.452318],[119.459813,25.452491],[119.459857,25.45266],[119.45993,25.45282],[119.46003,25.452968],[119.460154,25.4531],[119.460299,25.453212],[119.460462,25.453303],[119.460639,25.453369],[119.460824,25.45341],[119.461014,25.453423],[119.461205,25.45341],[119.46139,25.453369],[119.461567,25.453303],[119.46173,25.453212],[119.461875,25.4531],[119.461999,25.452968],[119.462099,25.45282],[119.462172,25.45266],[119.462216,25.452491]]",
"areaType": 0,
"circles": "119.461015,25.452319,0.12237603039430837",
"clientId": "yiqiyongche",
"createTime": "2022-05-12 11:19:34",
"enableTimeFrom": "2022-01-01 00:00:00",
"enableTimeTo": "2023-12-31 00:00:00",
"isEnable": 1,
"isdel": 0,
"ruleAreaHistoryId": 1127,
"ruleId": 1854,
"ruleName": "进出围栏",
"ruleType": 21,
"shapeType": 2,
"tenantId": "ding147f43fe2ab7311b35c2f4657eb6378f",
"threshold1": "",
"threshold2": "",
"threshold3": "",
"threshold4": "",
"threshold5": "",
"timeEnable": 1,
"updateTime": "2022-05-12 11:19:34"
},
"message": "",
"success": true
}