设备
# 概述
设备API 可查询设备及设备相关(PLC...等)的信息, 也可进行远程重启/数据同步/恢复采集 修改设备GPS定位变量...等功能
类名
DeviceApi.java
成员方法
| 名称 | 方法 | Method | Path |
|---|---|---|---|
| 绑定/或更换设备序列号 | bindDevice | POST | /api-business/device/bindDevice |
| 3.5以上固件不会包含网络配置,3.5 以下固件包含网络配置数据同步 | dataSynchronization | POST | /api-business/device/dataSynchronization |
| 查询设备详细信息 | getDeviceInfoListUsingPOST1 | POST | /api-business/device/getDeviceInfoList |
| 查询设备列表 | getDeviceList | POST | /api-business/device/getDeviceList |
| 查询设备属性信息 根据序列号 | getDevicePropertiesBySnList | POST | /api-business/device/getDevicePropertiesBySnList |
| 查询设备状态信息 | getDeviceStatusInfoList | POST | /api-business/device/getDeviceStatusInfoList |
| 获取序列号的在线状态 | getOnLineStateList | POST | /api-business/device/getOnLineStateList |
| 查询设备列表 | getPlcList | POST | /api-business/device/getPlcList |
| 根据项目id | getSimCardFlowInfoListByProjectIds | POST | /api-business/device/getSimCardFlowInfoListByProjectIds |
| 远程重启 | remoteRestart | POST | /api-business/device/remoteRestart |
| 重置设备在线记录 | resetOnlineRecord | POST | /api-business/device/resetOnlineRecord |
| 重置PLC在线记录 | resetPlcOnlineRecord | POST | /api-business/device/resetPlcOnlineRecord |
| 恢复采集 | restoreCollect | POST | /api-business/device/restoreCollect |
| 恢复上传 | restoreUpload | POST | /api-business/device/restoreUpload |
| 停止采集 | stopCollect | POST | /api-business/device/stopCollect |
| 停止上传 | stopUpload | POST | /api-business/device/stopUpload |
| 解绑device | unbindDevice | POST | /api-business/device/unbindDevice |
# 绑定/或更换设备序列号
Result bindDevice(bindDeviceForm)
绑定/或更换设备序列号
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| bindDeviceForm | BindDeviceForm | bindDeviceForm |
# BindDeviceForm
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceId | String | 设备id | |
| serialNumber | String | device序列号 | - |
# 返回参数
Result
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | - | |
| data | Object | - | |
| msg | String | - | |
| time | OffsetDateTime | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
BindDeviceForm bindDeviceForm = new BindDeviceForm();
try {
Result result = apiInstance.bindDevice(bindDeviceForm);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.bindDevice异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/bindDevice |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"serialNumber":"",
"deviceId":""
}
2
3
4
# 3.5以上固件不会包含网络配置,3.5 以下固件包含网络配置数据同步
Result dataSynchronization(deviceId)
3.5以上固件不会包含网络配置,3.5 以下固件包含网络配置数据同步
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceId | String | 设备ID |
# 返回参数
Result
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | - | |
| data | Object | - | |
| msg | String | - | |
| time | OffsetDateTime | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
String deviceId = "deviceId_example";
try {
Result result = apiInstance.dataSynchronization(deviceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.dataSynchronization异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/dataSynchronization |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"deviceId":""
}
2
3
# 查询设备详细信息
ResultListDeviceInfoVo getDeviceInfoListUsingPOST1(deviceIds)
获取多个项目设备(不可查模板)的详细信息
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceIds | List<String> | 多个设备id |
# 返回参数
ResultListDeviceInfoVo
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | 响应码 | - |
| data | List<DeviceInfoVo> | 响应数据 | - |
| msg | String | 响应消息 | - |
| time | OffsetDateTime | 响应时间 | - |
DeviceInfoVo
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| cloudVersion | String | 配置版本号(云端) | - |
| configType | String | 是否为配置软件上传 | - |
| deviceProperties | Map<String, DevicePropertiesVo> | Device信息 key:字段,DevicePropertiesPojo: 详情 | - |
| id | String | Device的id | - |
| isGps | Boolean | 是否是GPS设备 | - |
| isThirdDevice | Boolean | 是否是第三方设备 | - |
| lastTime | String | 最新在线时间 | - |
| model | String | BOX型号版本号 | - |
| name | String | Device名称 | - |
| onLine | String | 在线率 | - |
| productId | String | - | |
| serialNumber | String | Device序列号 | - |
| showSync | Boolean | 新版本 | - |
| templateBox | Boolean | 是否为模板盒 | - |
| version | Double | 版本 | - |
DevicePropertiesVo
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| createdTime | OffsetDateTime | 创建时间 | - |
| name | String | 属性名称(如卡号/ip/版本等等) | - |
| serialNumber | Long | 设备序列号,12位数字 | - |
| updatedTime | OffsetDateTime | 更新时间 | - |
| value | String | 属性值 | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
List<String> deviceIds = Arrays.asList(new List<String>());
try {
ResultListDeviceInfoVo result = apiInstance.getDeviceInfoListUsingPOST1(deviceIds);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.getDeviceInfoListUsingPOST1异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/getDeviceInfoList |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"deviceIds":[]
}
2
3
# 查询设备列表
ResultListDeviceVo getDeviceList(queryDeviceListParam)
获取企业、用户、项目的采集器列表
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| queryDeviceListParam | QueryDeviceListParam | queryDeviceListParam |
# QueryDeviceListParam
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| resourceIds | List<String> | 项目或模板id的数组 | |
| resourceType | String | 查询类型,project:项目的device列表,template:模板的device列表 |
# 返回参数
ResultListDeviceVo
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | 响应码 | - |
| data | List<DeviceVo> | 响应数据 | - |
| msg | String | 响应消息 | - |
| time | OffsetDateTime | 响应时间 | - |
DeviceVo
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| id | String | 设备Id | - |
| name | String | 设备名称 | - |
| resourceId | String | 项目或模板id | - |
| serialNumber | String | 序列号 | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
QueryDeviceListParam queryDeviceListParam = new QueryDeviceListParam();
try {
ResultListDeviceVo result = apiInstance.getDeviceList(queryDeviceListParam);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.getDeviceList异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/getDeviceList |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"resourceType":""
}
2
3
# 查询设备属性信息 根据序列号
ResultMapLongMapStringString getDevicePropertiesBySnList(snList)
查询设备属性信息 根据序列号
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| snList | List<String> | 多个序列号 |
# 返回参数
ResultMapLongMapStringString
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | 响应码 | - |
| data | Map<String, Map<String, String>> | 响应数据 | - |
| msg | String | 响应消息 | - |
| time | OffsetDateTime | 响应时间 | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
List<String> snList = Arrays.asList(new List<String>());
try {
ResultMapLongMapStringString result = apiInstance.getDevicePropertiesBySnList(snList);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.getDevicePropertiesBySnList异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/getDevicePropertiesBySnList |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"snList":[]
}
2
3
# 查询设备状态信息
ResultListDeviceStatusInfoVo getDeviceStatusInfoList(deviceIds)
获取设备的状态信息,包裹plc的状态
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceIds | List<String> | 多个设备id |
# 返回参数
ResultListDeviceStatusInfoVo
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | 响应码 | - |
| data | List<DeviceStatusInfoVo> | 响应数据 | - |
| msg | String | 响应消息 | - |
| time | OffsetDateTime | 响应时间 | - |
DeviceStatusInfoVo
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| id | String | 设备id | - |
| name | String | 设备名称 | - |
| offLineCount | Integer | 离线次数 | - |
| offLineDuration | Long | 离线时长(秒) | - |
| onLineDuration | Long | 在线时长(秒) | - |
| onLineTime | String | 在线时间(天/时/分/秒) | - |
| onlineStatus | Boolean | 设备的在线状态,true:在线,false 离线 | - |
| plcList | List<PlcStatusVo> | plc的状态信息 | - |
PlcStatusVo
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceId | String | 设备id | - |
| name | String | plc名称 | - |
| onlineStatus | Boolean | plc的在线状态,true:在线,false 离线 | - |
| plcId | Integer | plcid | - |
| time | Long | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
List<String> deviceIds = Arrays.asList(new List<String>());
try {
ResultListDeviceStatusInfoVo result = apiInstance.getDeviceStatusInfoList(deviceIds);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.getDeviceStatusInfoList异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/getDeviceStatusInfoList |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"deviceIds":[]
}
2
3
# 获取序列号的在线状态
ResultMapStringBoolean getOnLineStateList(serialNumbers)
根据传入的N个序列号,返回对应序列号的在线状态
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| serialNumbers | List<String> | serialNumbers | - |
# 返回参数
ResultMapStringBoolean
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | 响应码 | - |
| data | Map<String, Boolean> | 响应数据 | - |
| msg | String | 响应消息 | - |
| time | OffsetDateTime | 响应时间 | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
List<String> serialNumbers = Arrays.asList(new List<String>());
try {
ResultMapStringBoolean result = apiInstance.getOnLineStateList(serialNumbers);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.getOnLineStateList异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/getOnLineStateList |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"serialNumbers":[]
}
2
3
# 查询设备列表
ResultListPlc getPlcList(param)
获取企业、用户、项目的采集器列表
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| param | QueryPlcListParam | param |
# QueryPlcListParam
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| resourceIds | List<String> | 项目或模板id的数组 | |
| resourceType | String | 查询类型,project:项目的device列表,template:模板的device列表 |
# 返回参数
ResultListPlc
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | 响应码 | - |
| data | List<Plc> | 响应数据 | - |
| msg | String | 响应消息 | - |
| time | OffsetDateTime | 响应时间 | - |
Plc
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceId | String | 虚拟设备id | - |
| name | String | PLC设备名称 | - |
| plcId | Integer | PLC设备ID | - |
| resourceId | String | 项目或模板id | - |
| sort | Integer | 排序号 | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
QueryPlcListParam param = new QueryPlcListParam();
try {
ResultListPlc result = apiInstance.getPlcList(param);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.getPlcList异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/getPlcList |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"resourceType":""
}
2
3
# 根据项目id
ResultListSim getSimCardFlowInfoListByProjectIds(projectIds, balanceFlow, current, keyword, status)
根据项目id
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| projectIds | List<String> | 项目id, 为空则获取有权限项目的所有sim | |
| balanceFlow | Double | balanceFlow | - |
| current | Boolean | current | - |
| keyword | String | keyword | - |
| status | String | 0:停机,1:正常,2:注销,3:其它 | - |
# 返回参数
ResultListSim
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | 响应码 | - |
| data | List<Sim> | 响应数据 | - |
| msg | String | 响应消息 | - |
| time | OffsetDateTime | 响应时间 | - |
Sim
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| balanceFlow | Double | 剩余流量 | - |
| deviceId | String | 设备Id | - |
| deviceName | String | 设备名称 | - |
| expirationTime | String | 过期时间 | - |
| expirationTimeTimestamp | Long | 过期时间-时间戳 | - |
| iccid | String | iccid | - |
| monthUse | Double | 当月用量 | - |
| operator | String | 运营商 | - |
| operatorId | String | 运营商分组 | - |
| projectId | String | 项目id | - |
| projectName | String | 项目名称 | - |
| rechargeStatus | String | 卡的充值状态0:不可充值,1:可充值 | - |
| serialNumber | String | 设备序列号 | - |
| status | String | 过滤状态,0:停机,1:正常,2:注销,3:其它 | - |
| statusDescription | String | 卡的状态描述信息 | - |
| totalFlow | Double | 总流量 | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
List<String> projectIds = Arrays.asList(new List<String>());
Double balanceFlow = 3.4D;
Boolean current = true;
String keyword = "keyword_example";
String status = "status_example";
try {
ResultListSim result = apiInstance.getSimCardFlowInfoListByProjectIds(projectIds, balanceFlow, current, keyword, status);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.getSimCardFlowInfoListByProjectIds异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/getSimCardFlowInfoListByProjectIds |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"projectIds":[],
"keyword":"",
"status":""
}
2
3
4
5
# 远程重启
Result remoteRestart(deviceId)
远程重启
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceId | String | 设备ID |
# 返回参数
Result
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | - | |
| data | Object | - | |
| msg | String | - | |
| time | OffsetDateTime | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
String deviceId = "deviceId_example";
try {
Result result = apiInstance.remoteRestart(deviceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.remoteRestart异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/remoteRestart |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"deviceId":""
}
2
3
# 重置设备在线记录
Result resetOnlineRecord(deviceId)
重置设备在线记录
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceId | String | 设备ID |
# 返回参数
Result
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | - | |
| data | Object | - | |
| msg | String | - | |
| time | OffsetDateTime | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
String deviceId = "deviceId_example";
try {
Result result = apiInstance.resetOnlineRecord(deviceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.resetOnlineRecord异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/resetOnlineRecord |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"deviceId":""
}
2
3
# 重置PLC在线记录
Result resetPlcOnlineRecord(deviceId, plcId)
重置PLC在线记录
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceId | String | 设备ID | |
| plcId | Integer | plcId | - |
# 返回参数
Result
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | - | |
| data | Object | - | |
| msg | String | - | |
| time | OffsetDateTime | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
String deviceId = "deviceId_example";
Integer plcId = 56;
try {
Result result = apiInstance.resetPlcOnlineRecord(deviceId, plcId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.resetPlcOnlineRecord异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
13
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/resetPlcOnlineRecord |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"deviceId":"",
"plcId":0
}
2
3
4
# 恢复采集
Result restoreCollect(deviceId)
恢复采集
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceId | String | 设备ID |
# 返回参数
Result
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | - | |
| data | Object | - | |
| msg | String | - | |
| time | OffsetDateTime | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
String deviceId = "deviceId_example";
try {
Result result = apiInstance.restoreCollect(deviceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.restoreCollect异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/restoreCollect |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"deviceId":""
}
2
3
# 恢复上传
Result restoreUpload(deviceId)
恢复上传
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceId | String | 设备ID |
# 返回参数
Result
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | - | |
| data | Object | - | |
| msg | String | - | |
| time | OffsetDateTime | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
String deviceId = "deviceId_example";
try {
Result result = apiInstance.restoreUpload(deviceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.restoreUpload异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/restoreUpload |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"deviceId":""
}
2
3
# 停止采集
Result stopCollect(deviceId)
停止采集
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceId | String | 设备ID |
# 返回参数
Result
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | - | |
| data | Object | - | |
| msg | String | - | |
| time | OffsetDateTime | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
String deviceId = "deviceId_example";
try {
Result result = apiInstance.stopCollect(deviceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.stopCollect异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/stopCollect |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"deviceId":""
}
2
3
# 停止上传
ResultObject stopUpload(deviceId)
停止上传
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceId | String | 设备ID |
# 返回参数
ResultObject
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | 响应码 | - |
| data | Object | 响应数据 | - |
| msg | String | 响应消息 | - |
| time | OffsetDateTime | 响应时间 | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
String deviceId = "deviceId_example";
try {
ResultObject result = apiInstance.stopUpload(deviceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.stopUpload异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/stopUpload |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"deviceId":""
}
2
3
# 解绑device
Result unbindDevice(deviceId)
解绑device
# 请求参数
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| deviceId | String | 设备ID |
# 返回参数
Result
| 名称 | 类型 | 描述 | 备注 |
|---|---|---|---|
| code | String | - | |
| data | Object | - | |
| msg | String | - | |
| time | OffsetDateTime | - |
# java-sdk 调用示例
//实例化api类,传入token
DeviceApi apiInstance = new DeviceApi(token);
//实例化请求参数
String deviceId = "deviceId_example";
try {
Result result = apiInstance.unbindDevice(deviceId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("调用DeviceApi.unbindDevice异常: " + e.getMessage());
e.printStackTrace();
}
2
3
4
5
6
7
8
9
10
11
12
# HTTP 调用示例
| 属性 | 名称 |
|---|---|
| HTTP请求地址 | http://[server]:[port]/api-business/device/unbindDevice |
| 请求方式 | POST |
| Content-Type | application/json |
| header:key | Authorization |
| header:value | Bearer YOUR_ACCESS_TOKEN |
请求参数:
{
"deviceId":""
}
2
3
