setDeviceSnapEnhanced: Device snapshot
setDeviceSnapEnhanced: Device snapshot
Function details
Upgraded version of capturing the current screen image function of the camera, and supports the capture frequency of 1 time per second.
The client request interval must be greater than or equal to 1s. If the client request interval is less than 1s, the last snapshot will be returned by default. In the returned result, the URL for the snapshot access (url) is valid within 7 days.
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/setDeviceSnapEnhanced
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":"52ddffc171940f637c340da8bcf9d959",
"time":1603369692,
"nonce":"63e74c29-a30d-4827-b8e1-691faec14e2b"
},
"id":"ad9a278f-bedd-4c06-ad4a-ea0a971836d1",
"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/956fe604722b45fba0e098ba6eae3178.jpg?Expires=1603974760&OSSAccessKeyId=LTAIP4igXeEjYBoG&Signature=gtfNjV7MJI%2BC%2By6cciWYXiDv4LI%3D"
}
},
"id":"ad9a278f-bedd-4c06-ad4a-ea0a971836d1"
}
