*getHistoricalImage
Configuration Article | CA-20220907-TP-46 VDG Sense | API | Functions | Media |
This command is used to obtain the historical image. Parameter time is used to reference the image timestamp. Parameter type is used to tell the system what image to obtain. If this parameter is omitted or as an undefined value, the system assumes the image at the specified time is requested. If the image is not found, an error result is returned.
Request
command=getHistoricalImage&serverid=[UID]&cameraid=[UID]&time=[timestamp]&type=[type] |
parameter | type | remarks |
---|---|---|
serverid | [UID] | unique server id. |
cameraid / deviceid | [UID] | unique camera id |
time | [timestamp] | UTCÂ timestamp of image to look for (format:Â yyyy-mm-dd hh:nn:ss.zzz) |
type | [type] | functionality of time parameters: |
 | before | returns the first image before the time given. |
 | atorbefore | returns the image at or the first image before the time given. |
 | at | (default) returns the image exactly at the time given. |
 | atorafter | returns the image at or the first image before the time given. |
 | after | returns the first image after the time given. |
 | keyframe | returns the corresponding keyframe (requires 2.5.4 or higher) |
Response
jpeg image (or result in case of error) |
error code | description | remarks |
---|---|---|
0 | Ok | Ok, no error |
-2 | No device | No device found for the supplied cameraid/deviceid. |
-3 | Retrieved image does not correspond to timestamp | Usually occurs when the ‘types’ parameter is set to ‘at’. Use atorbefore of atorafter. |
-4 | Invalid timestamp | Invalid datetime format. See Timestamp format |
-11 | No image | There is no image found to return. |
See also
Â
Changelog
2.1.2 – Fixed leap year bug, which returned a historical image one day in the future (which results in no image if an image of the current day was requested).
2.1.1 – Added serverid.
1.12.3 – Documented if timestamps are local or UTC timestamps.
1.11.3 – Strict checking on starttime and endtime parameter format. Returns -4 on error (see Result Codes).
1.3.6 – Added