Query the number of Device alarms TOP-X in all Plant

for example: http://api.shinemonitor.com/public/?sign=6cc358a966c7aa489b62bdf61dac6bf6bd22d632&salt=1531305034503&token=deaa44a1175e911a5947b66802abe8a1429d34d0bed0afca6bd008415a71984a&action=queryPlantsWarningCountRank&plantid=&pname=&province=&city=&county=&town=&top=5&level=0&source=0&_app_client_=android&_app_id_=com.demo.test&_app_version_=3.6.2.1

Parameter Description Required
action queryPlantsWarningCountRank True
level Alarm level, If this parameter is not passed, it indicates that you do not care False
top top-x, the top few in the ranking. If this parameter is not passed, it defaults to 10 False
plantid Plant id, query Plant(single query) False
pname Plant name(single query) False
province Plant province(single query) False
city Plant city(single query) False
county Plant county(single query) False
town Plant town(single query) False

response:

Parameter Description Required
rank[x].uid Plant owner id False
rank[x].usr Plant owner False
rank[x].pid Belong plant id False
rank[x].pn Datalogger number True
rank[x].devcode Device protocol encoding True
rank[x].devaddr Device address (485 bus) True
rank[x].sn Device serial number True
rank[x].count Number of alarms True
Those with more alarms are always higher
{
    "err":0,
    "desc":"ERR_NONE",
    "dat":{
        "rank":[
            {
                "usr":"安咀村村级扶贫电站",
                "uid":14319,
                "pid":23326,
                "pn":"A4817440344233",
                "devcode":712,
                "devaddr":1,
                "sn":"A481744034423302C801",
                "count":62228
            },
            {
                "usr":"苗杜村",
                "uid":15280,
                "pid":24803,
                "pn":"A4817440397028",
                "devcode":712,
                "devaddr":1,
                "sn":"A481744039702802C801",
                "count":61190
            },
            {
                "usr":"郭家坨",
                "uid":24828,
                "pid":39033,
                "pn":"A4817440191148",
                "devcode":712,
                "devaddr":1,
                "sn":"A481744019114802C801",
                "count":42759
            },
            {
                "usr":"佛堂岭村级扶贫电站",
                "uid":24810,
                "pid":39013,
                "pn":"A4818100011838",
                "devcode":712,
                "devaddr":1,
                "sn":"A481810001183802C801",
                "count":41354
            },
            {
                "usr":"佛堂岭村级扶贫电站",
                "uid":24810,
                "pid":39013,
                "pn":"A4817440261895",
                "devcode":712,
                "devaddr":2,
                "sn":"A481744026189502C802",
                "count":28774
            }
        ]
    }
}

Possible errors:

Response error code Description Details
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)
Copyright © eybond 2022 all right reserved,powered by Gitbook文档更新时间: 2023-07-18 10:26:52

results matching ""

    No results matching ""