Query Device alarms in all Plant
for example: http://api.shinemonitor.com/public/?sign=7f220b6f21d0b52d0452d9c66ffe1f4f84635b81&salt=2337424845041575962&token=91a6c87e89acbfb2fa482f3b02ee071ee58ea0293dd92f243a88ee51415f497f&action=queryPlantsWarning&level=0&i18n=zh_CN&page=0&pagesize=1&source=0&_app_client_=android&_app_id_=com.demo.test&_app_version_=3.6.2.1
Parameter |
Description |
Required |
action |
queryPlantsWarning |
True |
devtype |
Device type |
False |
search |
Datalogger number, Device serial number, fuzzy search |
False |
level |
alarm level, If you do not pass this parameter,If this parameter is not passed, it indicates that you do not care |
False |
handle |
Has it been processed, true? Processed: Not processed. If this parameter is not passed, it indicates that you do not care |
False |
plantid |
Plant id,query Plant (single query) |
False |
pname |
Plant name(single query) |
False |
province |
Query province(single query) |
False |
city |
Query city(single query) |
False |
county |
Query county(single query) |
False |
town |
Query town(single query) |
False |
sdate |
starting time(Zero time zone, as the time zone of each Plant may vary, is uniformly used as the standard here), format: yyyy-mm-dd hh:mi:ss, If you do not pass this parameter, it means that you do not care about it |
False |
edate |
ending time (Zero time zone), format: yyyy-mm-dd hh:mi:ss, If you do not pass this parameter to indicate that you do not care, use a semi open interval when querying, like sdate <= date < edate |
False |
i18n |
Internationalized language, refer to Multi-Language Support |
True |
page |
Paging processing, page number, starting from 0. If this parameter is not passed, it is defaulted to 0 |
False |
pagesize |
Paging processing, with alarms per page ranging from 1 to 50. If this parameter is not passed, it defaults to 1 |
False |
response:
Parameter |
Description |
Required |
total |
Number of alarms |
True |
page |
Page processing, which page |
True |
pagesize |
Page processing, number of alarms per page |
True |
warning[x] |
refer to Query alarms on Devices |
True |
{
"err":0,
"desc":"ERR_NONE",
"dat":{
"total":2,
"page":1,
"pagesize":15,
"warning":[
{
"id":"5b456d5e7e13f20b549b2c9d",
"uid":14319,
"pid":23326,
"pn":"A4817440344233",
"devcode":712,
"devaddr":1,
"alias":"A481744034423302C801",
"sn":"A481744034423302C801",
"status":false,
"level":0,
"code":"bit:9",
"desc":"第二路直流过流",
"handle":false,
"gts":"2018-07-11 10:37:15"
},
{
"id":"5b456d5e7e13f20b549b2c9c",
"uid":14319,
"pid":23326,
"pn":"A4817440344233",
"devcode":712,
"devaddr":1,
"alias":"A481744034423302C801",
"sn":"A481744034423302C801",
"status":false,
"level":0,
"code":"bit:4",
"desc":"直流电压欠压",
"handle":false,
"gts":"2018-07-11 10:37:15"
}
]
}
Possible errors:
Response error code |
Description |
Derails |
0x0006 |
ERR_FORMAT_ERROR |
Parameter error |
0x0104 |
ERR_NOT_FOUND_PLANT |
Unable to find Plant |
0x000C |
ERR_NO_RECORD |
No records (no data found or no data generated for that day) |