Get Monitoring Value
(It is not recommended to use this URL to obtain real-time data!! It is recommended to use MQTT data push)
Description
This interface is used for users to retrieve monitoring point values. (There is a frequency limit. It is recommended not to exceed once per second. If the frequency exceeds a certain threshold, the IP will be blocked.) For obtaining real-time data, it is recommended to use SignalRDataPush
Request Address(Choose one)
URL1:
[Host Server]/api/v2/box/{boxId}/dmon/value/get
URL2:
[Host Server]/api/v2/dmon/value/get?boxNo={boxNo}
Address Parameter Description
Filed Type Description Host Server string See Explanation of terms boxId Long Find it in Get FGate list interface: boxRegs->box->id boxNo string The serial number of the FGate Method
POST
Headers
Field Type Description Authorization string Bearer + Space + Access Token obtained from the login interface Body
JSON Object
Field Type Description ids jarray Collection of monitoring point IDs, second choice with names. Use names if available, less than 100 characters. (Ids parameter is preferred) timeOut int Maximum read timeout. Null is server default value (6000ms). groupnames jarray Used for situations where different groups contain monitoring points with the same name. Used in conjunction with the collection of monitoring point names. names jarray Collection of monitoring point names, second choice with ids. Use names if available. Less than 100 elements. Successful Response
JSON ArrayField Type Description id string Monitoring point ID timestamp datetime Timestamp, required to determine whether the data is expired, UTC time dataType int Data type, see Appendix Two value string/int Value, type depends on the data type of returned value name string Monitoring point name boxId long FGate ID status int Monitoring point status: 0: Normal, 1: No data, 2: Timeout, 3: Error, 4: Socket Exception, 5: FDS Error, 16: Incomplete connState int Connection state: 0: Unknown, 1: Connected, 2: Timeout, 3: Disconnected connStateTimestamp datatime Time when box turns online Response Codes
Code Description 200 Successful execution 401 Access token expired 400 Error message in HTTP Header [X-FBox-Code], see details in Appendix Three 404 The interface does not exist, please check the URL 429 Access the interface so frequently, see 429 Status code Note:
If using monitoring point ids (ids) parameter to pass , and the returned data is null, please check if the parameters passed are monitoring points under this box, and whether they correspond to this box number or box boxid.
Postman example is as follows: