2.4、Real-Time Snapshot

Taking a snapshot is asynchronous. After processing succeeds, the snapshot is sent to the developer server as an event.

POSTProduction: https://open.eye4cloud.com/{{open_id}}/open/v1/realtime/getImage
Request Data
Field Name Required Type Description
device_id Yes string Device ID
timestamp Yes int64 Timestamp in seconds
nonce Yes string Random string, 8-20 characters
sign Yes string See "Sign Generation Examples" for the implementation details
password No string Device password; if omitted, the password registered for the device on the Open Platform is used
uuid No string Request ID returned after a snapshot or recording, mainly for asynchronous request and response correlation
async No bool Whether the request is asynchronous; a callback is used only when true
JSON
{
  "uuid": "请求id",
  "list": [
    {
      "file": "http://127.0.0.1/aaa.jpg",
      "filename": "文件名",
      "file_type":0, // 0图片,1视频
    }
  ]
}
callback_urls No array Used for asynchronous requests; up to 3 callback URLs are supported
data No string Device DATA; an empty string can be passed
imei No string Device IMEI; an empty string can be passed
CURL Request Example
CURL
curl 'https://open.eye4cloud.com/{{open_id}}/open/v1/realtime/getImage' \
  -H 'Content-Type: application/json' \
  --data-raw '{
    "device_id": "DEMO_DEVICE_001",
    "timestamp": 1758867195,
    "nonce": "",
    "sign": "",
    "imei": "",
    "data": "",
    "password": "",
    "uuid": "u1u1",
    "async": false,
    "callback_urls": []
}'
Response Data
Field Name Type Description
error_code int Status code: 0 indicates success; other values indicate an error
error_message string Error message; success indicates a normal response
data object Result for synchronous requests
uuid string Request ID
list array Result List
file string Image/Video Base64 Data
filename string File Name
file_type int File type: 0 for image, 1 for video

Example:

JSON
{
    "error_code": 0,
    "error_message": "success",
    "error_tips": "",
    "data": {
        "uuid": "",
        "list": [
            {
                "file": "文件base64数据",
                "filename": "文件名",
                "file_type": 0
            }
        ]
    }
}