1. API List
This section introduces the cloud storage related APIs。
API List:
| No. | API Function | Description |
|---|---|---|
| 1 | Enable Cloud Storage for Device via Card Password | Enable the cloud storage for device via Cloud P2P storage card password. |
| 2 | Search Device Cloud Storage Information | Search the device cloud storage related information |
1.1 Enable Cloud Storage for Device via Card Password
Function: This API is used to enable the cloud storage function via Cloud P2P storage card password. (Buy Cloud Storage Card Passowrd)
Request Address
{areaDomain}/api/lapp/cloud/storage/openRequest Method
POSTRequest Parameters
| Parameters | Type | Description | Required |
|---|---|---|---|
| accessToken | String | The access_token obtained during authentication. | Y |
| deviceSerial | long | Enable the device serial No. for cloud storage user. | Y |
| cardPassword | String | Cloud Storage Card Password | Y |
| phone | String | (Optional) Enable the phone number for cloud storage user. | N |
| channelNo | int | (Optional) Not Empty - Enable the cloud storage for the specified channel; Empty - Enable the cloud storage for the device itself. The default value is 1. | N |
| isImmediately | int | Enable: 0-No (Default), 1-Yes Note: 0 means enabling the function not immediately. You can enable the function when the cloud storage service stopped; 1 means enabling the function immediately. If the cloud service exists and the service type is the same with the current one, you can renew the function on the current service, or the original service will be overlapped. | N |
HTTP Request Message
POST /api/lapp/cloud/storage/open HTTP/1.1 Host: isgpopen.ezvizlife.com Content-Type: application/x-www-form-urlencoded accessToken=at.4fal4i1y0er1bw476c5z53f63dsjkwrl&deviceSerial=596510666&channelNo=1&phone=18888888888&cardPassword=4326717075050976&isImmediately=0
Returned Value
{ "code":"200", "msg":"Operation succeeded!" }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. |
| 10004 | The user does not exist. | |
| 10005 | appKey exception. | appKey is frozen. |
| 20002 | Device does not exist. | |
| 20014 | Illegal deviceSerial | |
| 20018 | The user does not have this device. | The phone corresponding user does not have this device. |
| 20032 | The channel does not exist in this user. | The channel does not exist in this user. |
| 49999 | Data exception. | Calling the API exception. |
| 60012 | Unknown error. | |
| 60020 | The device does not support cloud storage. | The device does not support cloud storage or the current device version does not cloud storage. It can be supported after upgrading. |
| 60030 | No more incorrect card password attempts are allowed. Input again after 24 hours. | The incorrect card password attempts exceed the limit. |
| 60031 | Card password information does not exist. | Check whether the card password is correct. |
| 60032 | Card password status error. | The card password is not activated or is already used or is expired. |
| 60033 | The card password is not for sale. Only the binding device can be enabled. | Card password not for sale. |
| 60035 | Enabling the cloud storage service failed. | When the error code or the prompt of "enabling cloud storage parameters error" appears, you should send the information, such as phone number, device serial No., or card password, to open-team@ezvizlife.com. |
1.2 Search device cloud storage information
Function
This API is used to search the device cloud storage information.
Request Address
{areaDomain}/api/lapp/cloud/storage/device/infoRequest Method
POSTRequest Parameters
| Parameters | Type | Description | Required |
|---|---|---|---|
| accessToken | String | The access_token obtained during authentication. | Y |
| deviceSerial | long | Search the device serial No. for cloud storage user. | Y |
| phone | String | (Optional) Enable the phone number for cloud storage user. | N |
| channelNo | int | (Optional) Not Empty - Search the specified channel cloud storage information; Empty - Search the device itself cloud storage information. The default value is 1. | N |
HTTP Request Message
POST /api/lapp/cloud/storage/device/info HTTP/1.1 Host: isgpopen.ezvizlife.com Content-Type: application/x-www-form-urlencoded accessToken=at.4fal4i1y0er1bw476c5z53f63dsjkwrl&deviceSerial=596510666&channelNo=1&phone=18888888888
Returned Data
{ "data": {"userName": "ezviz", "deviceSerial": "596510666", "channelNo": 1, "totalDays": 7, "status": 1, "validDays": 280, "startTime": 1470370451000, "expireTime": 1603107852000, "serviceDetail": { "userName": "ezviz", "deviceSerial": "596510666", "channelNo": 1, "totalDays": 30, "startTime": 1539949152000, "expireTime": 1603107852000, "status": 0 }}, "code": "200", "msg": "Operation succeeded!" } </pre>
Returned Field:
| Field | Type | Description |
|---|---|---|
| userName | String | The user name for cloud storage service. |
| deviceSerial | String | Device serial No. |
| channelNo | int | Channel No. |
| totalDays | int | Cloud storage service recording period. |
| status | int | Cloud Storage Status, -2: The device does not support, -1: Cloud storage is disabled, 0: Not activated, 1: Activated, 2: Expired. |
| validDays | int | Valid Days |
| startTime | long | Cloud storage service start time, exactly on the second. |
| expireTime | long | Cloud storage service stop time, exactly on the second. |
| serviceDetail | Object | Different types of cloud storage service information. Only when the device has two types of the cloud storage service, the parameter will be valid. |
- 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. |
| 10004 | The user does not exist. | |
| 10005 | appKey exception. | appKey is frozen. |
| 20002 | Device does not exist. | |
| 20014 | Illegal deviceSerial | |
| 20018 | The user does not have this device. | The phone corresponding user does not have this device. |
| 49999 | Data exception. | Calling the API exception. |
| 60012 | Unknown error. |