Get Historical Alarm
Description
Retrieve alarm records of FGate alarm (all or some code) within a certain period (with frequency limitation, not exceeding twice per second for each IP; exceeding a certain frequency will result in IP being blocked by the Ng proxy).
Request Address
URL:
[Host Server]/api/v2/box/{boxId}/alarm/data
Address Parameter Description
Field Type Description Host Server string See Explanation of terms boxId long Find it in Get FGate list interface: boxRegs->box->id Method
GET
Headers
Field Type Description Authorization string "Bearer " + Access Token obtained from the login interface Body (Request,QueryString)
Field Type Description beginTime long Start time (milliseconds), long type UTC timestamp unix epoch endTime long End time (milliseconds), long type UTC timestamp unix epoch name string Code of the alarm item, unnecessary if querying all limit int Limit on the number of records, recommended usage is 500. A negative value is to query alarm before the time period. Successful Response
Returns a collection of data within the time period, in a left-closed and right-open set
Field Type Description t string Timestamp, unix epoch i string Alarm item ID a int Type: 0 for none, 1 for triggered, 2 for confirmed, 3 for restored n string Alarm item code m string Alarm information v string Value Response Codes
Field Description 200 Execution successful 401 Access token expired 400 Error message in HTTP Header [X-FBox-Code],see Appendix Three for details 404 The interface does not exist, please check the URL Postman example is as follows:
- Please see the example in the following image.