3.8 获取设备某一时间段内历史数据

1. 请求地址:

base_url/openapi/v3/openapi/device/his

2. 请求方式:

post

3. 请求参数:

参数 必选 类型 说明 示例
ids String[] 设备udid数组
devices_type_id Int 获取设备接口中返回的 devices_type_id
find_type Int 历史数据颗粒度 1:小时; 2:天
start_time_stamp Int 11位时间戳
end_time_stamp Int 11位时间戳

4. 返回示例:

{
    "json": "[{\"his\":[{\"current_cool\":0,\"current_heat\":62.37,\"time\":\"2023-05-25 23:59:00\"},{\"current_cool\":0,\"current_heat\":62.37,\"time\":\"2023-05-26 00:00:00\"},{\"current_cool\":0,\"current_heat\":62.37,\"time\":\"2023-05-26 23:59:00\"},{\"current_cool\":0,\"current_heat\":62.37,\"time\":\"2023-05-27 00:00:00\"},{\"current_cool\":0,\"current_heat\":62.37,\"time\":\"2023-05-27 23:59:00\"},{\"current_cool\":0,\"current_heat\":62.37,\"time\":\"2023-05-28 00:00:00\"},{\"current_cool\":0,\"current_heat\":62.37,\"time\":\"2023-05-28 23:59:00\"},{\"current_cool\":0,\"current_heat\":62.37,\"time\":\"2023-05-29 00:00:00\"},{\"current_cool\":0,\"current_heat\":62.37,\"time\":\"2023-05-29 23:59:00\"},{\"current_cool\":0,\"current_heat\":62.37,\"time\":\"2023-05-30 00:00:00\"}],\"udid\":\"99c6692025049ec7bfd3c4198156f23b\"},{\"his\":[{\"current_cool\":58654,\"current_heat\":58868,\"time\":\"2023-05-25 23:59:00\"},{\"current_cool\":58654,\"current_heat\":58868,\"time\":\"2023-05-26 00:00:00\"},{\"current_cool\":58654,\"current_heat\":58868,\"time\":\"2023-05-26 23:59:00\"},{\"current_cool\":58654,\"current_heat\":58868,\"time\":\"2023-05-27 00:00:00\"},{\"current_cool\":58654,\"current_heat\":58868,\"time\":\"2023-05-27 23:59:00\"},{\"current_cool\":58654,\"current_heat\":58868,\"time\":\"2023-05-28 00:00:00\"},{\"current_cool\":58654,\"current_heat\":58868,\"time\":\"2023-05-28 23:59:00\"},{\"current_cool\":58654,\"current_heat\":58868,\"time\":\"2023-05-29 00:00:00\"},{\"current_cool\":58654,\"current_heat\":58868,\"time\":\"2023-05-29 23:59:00\"},{\"current_cool\":58654,\"current_heat\":58868,\"time\":\"2023-05-30 00:00:00\"}],\"udid\":\"b34ce4975c63b21f9503d49483316e8e\"}]"
}