1. API List
Contains the APIs about device information search.
See the following list:
No. | Function | Description |
---|---|---|
1 | Get device list | Get the device list of the current account. |
2 | Get single device information | Get the specified device information. |
3 | Get camera list | Get the camera list of the current account. |
4 | Search captured picture by UUID | Search captured picture by UUID (for Linktom device) |
5 | Get device status information | Get the specified device status information |
6 | Get device channel information | Get the information of device channel by device serial |
1.1 Get Device List
API Function
Search the device basic information list
Request Address
{areaDomain}/api/lapp/device/list
Request Type
POST
- Request Parameters
Parameter | Type | Description | Required |
---|---|---|---|
accessToken | String | The access_token during authentication. | Y |
pageStart | int | Start page,from 0 |
N |
pageSize | int | Paging size,the default size is 10, the maximum size is 50. |
N |
HTTP Request Message
POST /api/lapp/device/list HTTP/1.1 Host: isgpopen.ezvizlife.com Content-Type: application/x-www-form-urlencoded accessToken=at.dunwhxt2azk02hcn7phqygsybbw0wv6p&pageStart=0&pageSize=2
Return Data
{ "page": {
"total": 2, "page": 0, "size": 2
}, "data": [
{ "deviceSerial": "427734000", "deviceName": "xiaoge device", "deviceType": "C1", "status": 1, "defence": 1, "deviceVersion": "V4.2.5 build 151223", "updateTime": "2017-09-01 15:30:45" }, { "deviceSerial": "519266666", "deviceName": "Test", "deviceType": "UNKNOWN", "status": 0, "defence": 0, "deviceVersion": "V5.3.0 build 150824", "updateTime": "2017-09-01 15:30:45" }
], "code": "200", "msg": "Operating succeeded!" } </pre>
Request Parameters
Parameter | Type | Description | Required |
---|---|---|---|
deviceSerial | String | Device serial No. | |
deviceName | String | Device Name | |
deviceType | String | Device Type | |
status | int | Online status:0-Offline, 1-Online |
|
isEncrypt | int | Enable encryption or not:0-No, 1-Yes |
|
defence | int | Arming and disarming status of A1 device :0-Sleep, 8-Home, 16-Away. ,Arming and disarming status of non-A1 device :0 -Disarm, 1-Arm |
|
deviceVersion | int | Device version No. |
- Returned Code
Returned Code | Returned Message | Description |
---|---|---|
200 | Operation succeeded. | Requesting succeeded. |
10001 | Parameters error. | Parameter is empty or the format is incorrect. |
10002 | accessToken exception or expired. | Get accessToken again. |
10005 | appKey exception. | appKey is frozen. |
49999 | Data exception. | Calling the API exception. |
1.2 Get Single Device Information
API Function
Search the basic information of specified device
Request Address:
{areaDomain}/api/lapp/device/info
Request Type
POST
- Request Parameters
Parameter | Type | Description | Required |
---|---|---|---|
accessToken | String | The access_token during authentication. | Y |
deviceSerial | String | The device serial No.. | Y |
HTTP Request Message
POST /api/lapp/device/info HTTP/1.1 Host: isgpopen.ezvizlife.com Content-Type: application/x-www-form-urlencoded accessToken=at.dunwhxt2azk02hcn7phqygsybbw0wv6p&deviceSerial=427734168
Return Data
{ "data": {
"deviceSerial": "427734168", "deviceName": "niuxiaoge device", "model": "CS-C1-11WPFR", "status": 0, "defence": 1, "isEncrypt": 0
}, "code": "200", "msg": "Operating succeeded!" } </pre>
Request Parameters
Parameter | Type | Description | Required |
---|---|---|---|
deviceSerial | String | Device serial No. | |
deviceName | String | Device Name | |
model | String | Device model. Example: CS-C2S-21WPFR-WX | |
status | int | Online status:0 -Online, 1- Online |
|
defence | int | Arming and disarming status of A1 device :0-Sleep, 8-Home, 16-Away. ,Arming and disarming status of non-A1 device :0 -Disarm, 1-Arm |
|
isEncrypt | int | Enable encryption or not:0-No, 1-Yes |
- Returned Code
Returned Code | Returned Message | Description |
---|---|---|
200 | Operation succeeded. | Requesting succeeded. |
10001 | Parameters error. | Parameter is empty or the format is incorrect. |
10002 | accessToken exception or expired. | Get accessToken again. |
10005 | appKey exception. | appKey is frozen. |
20002 | The device does not exist. | |
20014 | Illegal deviceSerial | |
20018 | The channel does not exist. | The channel does not exist. |
49999 | Data exception. | Calling the API exception. |
1.3 Get Camera List
API Function
Get camera list
Request Address
{areaDomain}/api/lapp/camera/list
Request Type
POST
Request Parameters
Parameter | Type | Description | Required |
---|---|---|---|
accessToken | String | The access_token during authentication. | Y |
pageStart | int | Start page,from 0 |
N |
pageSize | int | aging size,he default size is 10, the maximum size is 50. |
N |
HTTP Request Message
POST /api/lapp/camera/list HTTP/1.1 Host: isgpopen.ezvizlife.com Content-Type: application/x-www-form-urlencoded accessToken=at.20h863523v1zfck75qgmwhoy7vl2teqp&pageStart=0&pageSize=2
HTTP Request Message
{ "page": {
"total": 2, "page": 0, "size": 10
}, "data": [
{ "deviceSerial": "427734444", "channelNo": 1, "channelName": "C1(427734444)", "status": 1, "isShared": "1", "picUrl": "http://img.ys7.com/group1/M00/02/B4/CmGCA1dRGyuAdJ_RAABJBCB_Re4796.jpg", "isEncrypt": 1, "videoLevel": 2 }, { "deviceSerial": "519544444", "channelNo": 1, "channelName": "C2C(519544444)", "status": 0, "isShared": "2", "picUrl": "https://i.ys7.com/assets/imgs/public/homeDevice.jpeg", "isEncrypt": 0, "videoLevel": 2 }
], "code": "200", "msg": "Operating succeeded!" } </pre>
Request Parameters
Parameter | Type | Description | Required |
---|---|---|---|
deviceSerial | String | Device serial No. | |
channelNo | String | Channel No. | |
channelName | String | Channel name | |
status | int | Online status:0 -Online, 1- Online |
|
isShared | String | Sharing status:1-Share by, 0-Unshared, 2-Share to |
|
picUrl | String | Picture address (large icon).If the perface is set in the EZVIZ client, return perface picture. Otherwise, return default picture. |
|
isEncrypt | int | Enable encryption or not:0-No, 1-Yes |
|
videoLevel | int | Video quality:0 -Fluent, 1-Equalization, 2-HD, 3-Super Definition |
- Returned Code
Returned Code | Returned Message | Description |
---|---|---|
200 | Operation succeeded. | Requesting succeeded. |
10001 | Parameters error. | Parameter is empty or the format is incorrect. |
10002 | accessToken exception or expired. | Get accessToken again. |
10005 | appKey exception. | appKey is frozen. |
20002 | The device does not exist. | |
20014 | Illegal deviceSerial | |
20018 | The channel does not exist. | The channel does not exist. |
49999 | Data exception. | Calling the API exception. |
1.4 Search Captured Picture by UUID (for Linktom Device)(Device connectivity is used)
API Function
This API is used for Linktom device to search the captured picture by UUID.
Request Address
`{areaDomain}/api/lapp/device/uuid/picture`
Request Type
`POST`
Request Parameters
Parameter | Type | Description | Required |
---|---|---|---|
accessToken | String | The access_token during authentication. | Y |
uuid | String | The UUUID returned during the device SDK capture. | Y |
size | int | Picture size, ranging from 0 to 1280 | Y |
HTTP Request Message
POST /api/lapp/device/uuid/picture HTTP/1.1 Host: isgpopen.ezvizlife.com Content-Type: application/x-www-form-urlencoded accessToken=at.9mqitppidgce4y8n54ranvyqc9fjtsrl&uuid=09076e76501644989b63ba0016ec5776&size=100
Return Data
{ "data": {
"picUrl": "https://wuhancloudpictest.ys7.com:8083/HIK_1468308471_AF28AE8DD5A0e83e_FA163E0CE33A150000797?isEncrypted=0&isCloudStored=0&x=1280&session=hik%24shipin7%231%23USK%23"
}, "code": "200", "msg": "Operating succeeded!" } </pre>
Return Field
Field Name | Type | Description |
---|---|---|
picUrl | String | Picture path |
- Returned Code
Returned Code | Returned Message | Description |
---|---|---|
200 | Operation succeeded. | Requesting succeeded. |
10001 | Parameters error. | Parameter is empty or the format is incorrect. |
10002 | accessToken exception or expired. | Get accessToken again. |
10005 | appKey exception. | appKey is frozen. |
20301 | The device does not exist. | |
20302 | Illegal deviceSerial | |
20303 | The channel does not exist. | The channel does not exist. |
49999 | Data exception. | API call exception. |
1.5 Get the device status information
API Function:
This API is used for Link device serial to search the device status.
Request Address:
{areaDomain}/api/lapp/device/status/get
Request Type
POST
Sub token Request minimum permission
"Permission":"Get"
"Resource":"dev:serial"
Request Parameter
Parameter | Type | Description | Required |
---|---|---|---|
accessToken | String | The access_token during authentication | Y |
deviceSerial | String | Device serial No | Y |
channel | int | channel number,default is 1 | N |
- HTTP Request Message
POST /api/lapp/device/status/get HTTP/1.1
Host: isgpopen.ezvizlife.com
Content-Type: application/x-www-form-urlencoded
accessToken=at.20h863523v1zfck75qgmwhoy7vl2teqp&deviceSerial=427734168&channel=1
- Return Data
{
"data": {
"privacyStatus": 0,
"pirStatus": -2,
"alarmSoundMode": 2,
"battryStatus": -1,
"lockSignal": -1,
"diskNum": 1,
"diskState": "0---------------",
"cloudType": 0,
"cloudStatus": 2,
"nvrDiskNum": 1,
"nvrDiskState": "0---------------"
},
"code": "200",
"msg": "Operating succeeded!"
}
- Return Field:
Field Name | Type | Description |
---|---|---|
privacyStatus | int | Privacy state: 0:close privacy state ;1:open privacy state;-1:initial value;2:-not support ,C1 dedicated,-2:device not report or device not support status |
pirStatus | int | infrared state,1:open infrared,0:close infrared,-1:initial value,2:not support ,-2:device not report or device not support status |
alarmSoundMode | int | Audio Alarm mode ,0:short voice ,1:long voice,2:mute,3:custom voice,-1:device not report or device not support status |
battryStatus | int | battryStatus,1 to 100(%),-1:device not report or device not support status |
lockSignal | int | Locks and gateway between the wireless signal,more than 10 percent difference value will report ,-1:device not report or device not support status |
diskNum | int | Mount the sd drive number,-1:device not report or device not support status |
diskState | String | sd drive status:0:normal; 1:wrong storage medium; 2:unformatted; 3:formatting;return type:one disk"0---------------",two disks "00--------------",by parity of reasoning;-1:device not report or device not support status |
cloudStatus | int | cloud storage status: -2:device not support; -1: not available; 0: not activated; 1: activated; 2: past due |
nvrDiskNum | int | NVR mount disk number: -1:device not report or device not support; -2:not link,Similar to the NVR type of superior equipment |
nvrDiskState | String | NVRmount disk status:0:normal; 1:wrong storage medium; 2:unformatted; 3:formatting;return type:one disk"0---------------",two disks "00--------------",by parity of reasoning;-1:device not report or device not support status; -2:not link,Similar to the NVR type of superior equipment |
- Returned Code
Returned Code | Returned Message | Description |
---|---|---|
200 | Operation succeeded. | Requesting succeeded. |
10001 | Parameters error | Parameter is empty or the format is incorrect |
10002 | accessToken exception or expired. | Get accessToken again. |
10005 | appKey exception. | appKey is frozen. |
20002 | Device does not exist. | |
20014 | Illegal deviceSerial | |
20018 | The user doesn't own the device. | |
49999 | Data error | API call exception. |
1.6 Get device channel information
API Function:
This API is used for get the channel information of device which is selected
Request Address:
{areaDomain}/api/lapp/device/camera/list
Request Type
POST
Request Parameters:
Parameter | Type | Description | Required |
---|---|---|---|
accessToken | String | The access_token during authentication. | Y |
deviceSerial | String | Device serial No. | Y |
- HTTP Request Message
POST /api/lapp/device/camera/list HTTP/1.1
Host: isgpopen.ezvizlife.com
Content-Type: application/x-www-form-urlencoded
accessToken=at.20h863523v1zfck75qgmwhoy7vl2teqp&deviceSerial=427734222
</pre>
- Return Data
{
"data": [
{
"deviceSerial": "427734222",
"ipcSerial": "427734222",
"channelNo": 1,
"deviceName": "My(427734222)427734222",
"channelName": "My(427734222)427734222",
"status": 1,
"isShared": "0",
"picUrl": "https://portal.ys7.com/assets/imgs/public/homeDevice.jpeg",
"isEncrypt": 0,
"videoLevel": 2,
"relatedIpc": false
}
],
"code": "200",
"msg": "Operating succeeded!"
}
- Return Field:
Field Name | Type | Description |
---|---|---|
deviceSerial | String | Device serial No. |
ipcSerial | String | IPC serial No. |
channelNo | int | Channel No |
deviceName | String | Device name |
channelName | String | Dhannel name |
status | int | Online status:0-offline,1-online,-1-device not report |
isShared | String | share status : 1-share to other,0-not share to other,2-is shared(this camera is shared by others) |
picUrl | String | picture url(big picture ),If user has set front picture,it will get front,or it will return default picture |
isEncrypt | int | Is encrypt:0:not encrypt,1:encrypt |
videoLevel | int | Video Level:0-smooth,1-BD,2-HD, 3-FHD |
relatedIpc | boolean | This channel is related with IPC:true,false. Device in this channel is not reported or this channel has no device related will return false |
TIPS:Get the channel information . If the NVR automaticly reports the information of IPC which has been related ,it will returns IPC's information . If the NVR never report the IPC's information .it will get nothing.
- Returned Code
Returned Code | Returned Message | Description |
---|---|---|
200 | Operation succeeded. | Requesting succeeded. |
10001 | Parameters error. | Parameter is empty or the format is incorrect. |
10002 | accessToken exception or expired. | Get accessToken again. |
10005 | appKey exception. | appKey is frozen. |
20002 | Device does not exist. | |
20014 | Illegal deviceSerial | |
20018 | The user doesn't own the device. | |
30001 | The user doesn't exist | |
49999 | Data error | API call exception. |