Web service integration

Send Alarm

  • The recorder must use this method “Send Alarm” to send alarm data to WEB SERVICE with the following JSON format.
  • Request Format
                            [{
                                    
                                 “SiteNo”:“”,
                                 “IPAddress”:“192.168.10.100”,
                                 “MACAddress”:”00:AA:BB:CC:DD:EE”,
                                 “ChannelNo”:“11",
                                 “ChannelName”:“Main Entrance"
                                 “AlarmType”:“1",
                                 “AlarmDetails”:””,
                                 “RecorderName”:””,
                                 “HardDiskNo”:””,
                                 “DateTime”:“2019-01-08 13:10:10.123”,
                                 “Comments”:“”                           
                            }]
                            
Where,
  • Note:
  • Response Format
  • Success Acknowledgement
          If Success, Web Service will send response to recorder as
                   {
                      “Ack”:“success”
                   }
           [Server receives alarm or event successfully]
                              
  • Failure Acknowledgement
                            
          If Failure, Web Service will send response to recorder as
                   {
                      “Ack”:“failure”,
                      “Reason”: “Invalid MACAddress”
                   }
           [Server receives unformatted data, it can’t understand by server]
                               

Send HeartBeat

  • The recorder must use this method “Send HeartBeat” to send Heart Beat signal to WEBSERVICE with the following JSON format.
    Heartbeat need to send ALARM CENTER for regular interval. (Default 300 Seconds)
Request Format
                              [{
                                    “SiteNo”:“”,
                                    “IPAddress”:“192.168.10.100”,
                                    “MACAddress”:”00:AA:BB:CC:DD:EE”
                              }]
                                
Where,
  • Response Format
  • Success Acknowledgement
           If Success, Web Service will send response to recorder as
                           {
                              “Ack”:“success”
                           }
           [Server receives heartbeat successfully]
                               
  • Failure Acknowledgement
           If Failure, Web Service will send response to recorder as
                           {
                              “Ack”:“failure”,
                              “Reason”:“Invalid MACAddress”
                           }
           [Server receives unformatted data, it can’t understand by server]
                            

Get NTP Server Info

  • The recorder must use this method “Get NTP Server Info” to receive NTP Server details with the following JSON format.
  • Request Format
                                  [{
                                       “SiteNo”:“”,
                                       “IPAddress”:“192.168.10.100”,
                                       “MACAddress”:”00:AA:BB:CC:DD:EE”
                                  }]
                               
Where,
  • Response Format
  • Success Acknowledgement
           If Success, Web Service will send response to recorder as
                         {
                            “NTPServerIP”:“192.168.1.201”,
                            “NTPServerPort”:“123”,
                            “TimeZone”:“1”,
                            “UpdateInterval”:“1”
                         }
                   
Where,
  • Failure Acknowledgement
           If Failure, Web Service will send response to recorder as
                         {
                           “Ack”:“failure”,
                           "Reason”: “Invalid MACAddress”
                         }
           [Server receives unformatted data, it can’t understand by server] 
                            

Send Recorder Info

  • The recorder must use this method “Send Recorder Info” to send the Recorder Details with the following JSON format.
  • Request Format
                                    [{
                                          “SiteNo”:“”,
                                          “IPAddress”:“192.168.10.100”,
                                          “MACAddress”:”00:AA:BB:CC:DD:EE”,
                                          “SerialNo”:”3J06DA8PAZ1F053”
                                          “FirmwareVersion”:”3.203.000.0.R”,
                                          “ModelName”:”NVR”,
                                          “NoOfChannel”:”32”,
                                          “AlarmInputCount”:”2”,
                                          “AlarmOutputCount”:”2”,
                                          “AudioPortCount”:”4”
                                    }]
                                
Where,
  • Response Format
  • Success Acknowledgement
           If Success, Web Service will send response to recorder as
                            {
                               “Ack”:“success”
                            }
           [Server receives recorder information successfully]
                              
  • Failure Acknowledgement
           If Failure, Web Service will send response to recorder as
                            {
                               “Ack”:“failure”,
                               “Reason”: “Invalid MACAddress”
                            }
           [Server receives unformatted data, it can’t understand by server]