Go to documentation repository
The requests described below are used when working with the HTTP-Server module.
The last event ID request
GET http://<IP-address>:<Port>/core/GetLastID
Request example
GET http://localhost:40000/core/GetLastID
Response example
{"lastId":"b686658c-764c-e911-8f42-001a7dda710e"}
The event request based on filter
The filter is configured on the settings panel of the HTTP-Server object — see Configuring the HTTP-Server object.
GET http://<IP-address>:<Port>/core/Events?keepAliveTime={keepAliveTime}&startingID={startingID}
Request parameters:
Parameter | Required | Description |
---|---|---|
keepAliveTime | No | The time interval in seconds, within which the server will send a json of the {"time":"2019-03-19T14:56:26.317"} form to the client, containing the server time in UTC. The default is 5 seconds. |
startingID | No | ID of the event starting from which it is necessary to receive events. |
Request example
GET http://localhost:40000/core/Events?keepAliveTime=5&startingID=8FFCDF07-5E4A-E911-95AE-F894C2A95BA4
Response example
{"module":"video.run","protocol_id":"2dc6dfcb-5351-e911-8832-534e57000000","SLAVE_id":"COMP1","src_action":"MD_STOP","src_objid":"2","src_objtype":"CAM","time":"2019-03-28T12:20:03.977"}