Query the alarm details of all items
| parameter | description | required |
|---|---|---|
| action | webQueryPlantsWarning | true |
| i18n | International language, seeMulti-language support | true |
| id | The alarm code is uniquely identified | false |
| pn | Data collector coding, fuzzy search | false |
| sn | Device serial number, fuzzy search | false |
| level | Alarm level, if you do not pass this parameter, ignore it | false |
| handle | Whether it has been processed, true ? Processed : Not processed, if you do not pass this parameter, ignore it | false |
| devtype | Device type | false |
| uname | Owner of the project, if you do not pass this parameter, ignore it | false |
| pname | Belongs to the project, if you do not pass this parameter, ignore it | false |
| plantid | Project ID, Query items (single query) | false |
| province | Province, query all alarm details below the province (single query) | false |
| city | City, query all alarm information under the city (single query) | false |
| county | District, query all alarm information under the district and county (single query) | false |
| town | Township, query all alarm information under the township (single query) | false |
| sdate | Start time (zero time zone, because the time zone of each project may be different, the criteria is zero time zone ), format: yyyy-mm-dd hh:mi:ss, if you do not pass this parameter, ignore it | false |
| edate | Deadline (zero time zone), format:yyyy-mm-dd hh:mi:ss, if you do not pass this parameter, ignore it,sdate and edates needs to exist at the same time, and the half-open interval is used when querying, 即 sdate <= date < edate | false |
| mode | strictThe mode is to filter the mode strictly according to the time interval, otherwise the default return rule is followed, and the rule description is returned at the bottom of the document | false |
| page | page processing, page number, start at 0, If you do not pass this parameter, it defaults to 0 | false |
| pagesize | page processing, The number of alerts per page, 1 ~ 50, If you do not pass this parameter, it defaults to 1 | false |
response:
| parameter | description | required |
|---|---|---|
| total | Total number of alarms | true |
| page | page processing, page number | true |
| pagesize | page processing, The number of alerts per page | true |
| warning[x].id | The alarm is uniquely identified | true |
| warning[x].uid | Project owner id, May be 0, the device does not belong to any project owner at the time of alarm | true |
| warning[x].pid | The device may not have been added to any items when an alarm occurred | false |
| warning[x].usr | Name of the project owner, The device does not belong to any project owner at the time of alarm | false |
| warning[x].plant | Project name, The device may not have been added to any items when an alarm occurred | false |
| warning[x].pn | Digital collector number | true |
| warning[x].devcode | Device protocol encoding | true |
| warning[x].devaddr | Device Address (485 bus) | true |
| warning[x].sn | Device serial number | true |
| warning[x].ratingPower | Equipment power rating | true |
| warning[x].alias | Device alias | true |
| warning[x].calias | Collector alias | true |
| warning[x].status | Whether it is based on alarm ofDevice operating status ? true : false | true |
| warning[x].level | Alarm level | true |
| warning[x].code | Alarm code | false |
| warning[x].desc | Description of the alarm | true |
| warning[x].handle | The alarm has been handled ? true : false | true |
| warning[x].gts | The time when the alarm was generated, fromat: yyyy-mm-dd hh:mi:ss, Device time zone | true |
| warning[x].cts | The time the alarm disappears, format: yyyy-mm-dd hh:mi:ss, Device time zone | false |
{
"err":0,
"desc":"ERR_NONE",
"dat":{
"total":39,
"page":0,
"pagesize":1,
"warning":[
{
"id":"597191a57044a472daff1eb8",
"uid":7638,
"pid":12463,
"plant":"Lu Xinghai 10kw",
"pn":"G0617263366500",
"devcode":608,
"devaddr":1,
"sn":"3804172500004",
"ratingPower":"60.0000",
"status":true,
"level":2,
"desc":"device status:failure",
"handle":true,
"gts":"2017-07-21 13:26:15",
"cts":"2017-08-13 07:30:53"
}
]
}
}
possible error:
| Returns an error code | description | detailed description |
|---|---|---|
| 0x0006 | ERR_FORMAT_ERROR | parameter error |
| 0x0007 | ERR_MISSING_PARAMETER | The necessary parameters are missing |
| 0x0104 | ERR_NOT_FOUND_PLANT | Project not found |
| 0x0105 | ERR_NOT_FOUND_USR | User not found |
| 0x0108 | ERR_NOT_FOUND_DEVICE_WARNING | Device alarm not found |
The default rule returned by this interface is:
- Cases where there are constraints on processing status: a.If you query the processed alarm, check it according to the normal query conditions b.If the query has unprocessed alarms and has a start time constraint, all previous unprocessed alarms are queried out
- For cases where the processing status is unconstrained: a.If there is a starting time constraint, all alarms within the time constraint are queried, and all unprocessed alarms outside the time constraint are also queried