Update Historical Record
Request Address (Choose One)
URL1:
[Host Server]/api/v2/box/{boxId}/hdataitems
URL2:
[Host Server]/api/v2/hdataitems/?boxNo={boxNo}
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 boxNo string Serial number of the FGate Method
POST
Header
Field Type Description Authorization string "Bearer " + access_token obtained from login interface Body
Multiple-channel history record collection, with properties as follows:Field Type Description uid long History record entry Id name string Name of the history record entry period int Sampling period in seconds, range: 1-86400 channels Array Channel collection, individual attributes see table below hasctrl bool Whether to use enable, if used, enable configuration needs to be set ctrl object Enable configuration properties Individual attributes for channels:
Field Type Description name string Channel name unit string Channel unit desc string Channel description intDigits int Integer digits of the channel fracDigits int Fractional digits of the channel devAlias string Device driver alias station int PLC communication station No dataType int Data type, details in Appendix Two, not supporting binary, hexadecimal, string types regId int Register Id, combined with ioWidth, uniquely determines the register ioWidth int Register bit width, combined with regId, uniquely determines the register regName string Register name, can uniquely determine the register, choose one of the above two parameters addr int PLC main address subAddr int PLC sub-address addrBlk int PLC DB block address valueTransform jobject Numeric operation settings executeOnEdge boolean Whether to enable edge computing, must be configured for numeric operation to be enabled Detailed table for numeric operation settings:
Field Type Description maxValue int Maximum value minValue int Minimum value scaleMaxValue int Maximum scale value scaleMinValue int Minimum scale value gain int Gain offset int Offset type int 1: Proportional conversion, 2: Scaling Enable configuration properties:
Field Type Description ctrlType int Enable item, 0: Disable, 1: Enable devAlias string PLC alias (device alias in remote download) station int Station No dataType int Data type, details in Appendix Two regId int Register Id, combined with ioWidth, uniquely determines the register ioWidth int Register bit width, combined with regId, uniquely determines the register regName string Register name, can uniquely determine the register, choose one of the above two parameters addr int PLC main address subAddr int PLC sub-address addrBlk int PLC DB block address Successful Response
NULL
Response Codes
Code Description 200 Execution successful. 401 Access token expired. 400 Error message in HTTP Header [X-FBox-Code], details in Appendix Three. 429 Access the interface so frequent. See 429 Status code