setDeviceSnap: Device snapshot
setDeviceSnap: Device snapshot
Function details
Capture the current screen image of the camera, and supports the capture frequency of 1 time/3s.
The client request interval must be greater than or equal to 3s.
Remarks:
It is recommended that developers determine which device capture interface to use after measuring the interface based on the device performance:
If the device performance is good (it can process and return the snapshot picture every second), it is recommended that the developer call the setDeviceSnapEnhanced interface;
If the device performance is poor (mainly for devices listed before 2017), it is recommended that developers call the setDeviceSnap interface for device snapshots.
Request address
https://openapi-[DataCenter].easy4ip.com/openapi/setDeviceSnap
request format
Please refer to the Development Specification for the API request method and some authentication parameters such as sign calculation method
Minimum permissions required for sub-account token request
"Permission":"Capture" "Resource":"cam:serial number:channel number"
Incoming parameter description
| Parameter name | Parameter type | Required or not | Default value | Legal value | Parameter description |
|---|---|---|---|---|---|
| token | String | Yes | Administrator or sub-account accessToken | ||
| deviceId | String | Yes | Device serial number | ||
| channelId | String | Yes | Channel ID |
Sample input
{
"system":{
"ver":"1.0",
"appId":"lcdxxxxxxxxx",
"sign":"1f239a40a252ef1190fc8b1e61bb8b44",
"time":1603369597,
"nonce":"755263ee-7301-43c9-9d65-464f0febfc80"
},
"id":"c8dd3f09-554b-41dc-8616-76889952e24e",
"params":{
"deviceId":"TESTQWERXXXX",
"channelId":"0",
"token":"At_00000ad9e6e87f0142eb92e207aec46a"
}
}
Return data field description
| Field name | Field type | Field description | |
|---|---|---|---|
| url | String | Capture access address | |
Sample output
{
"result":{
"msg":"The operation was successful.",
"code":"0",
"data":{
"url":"https://lechangecloud.oss-cn-hangzhou.aliyuncs.com/lechange/TESTQWERXXXX_img/Alarm/0/7aa3f5dd3bf1436a87ca1828aad382c3.jpg?Expires=1603974670&OSSAccessKeyId=LTAIP4igXeEjYBoG&Signature=4f7U%2Bgbu3pZXUlL36K14MxFU0IA%3D"
}
},
"id":"c8dd3f09-554b-41dc-8616-76889952e24e"
}
