getStatisticsConfig
获取统计配置,获取开通智能计量的 dp 点及配置。
请求参数
参数 | 数据类型 | 说明 | 是否必填 |
---|---|---|---|
devId | string | 设备 ID | 是 |
返回值
Array<{
algorithmType: 'sum' | 'avg' | 'minux' | 'max' | 'min' | 'count';
dpId: number;
productId: string;
statisticInterval: number;
storageDuration: number;
}>
参数 | 数据类型 | 说明 |
---|---|---|
algorithmType | string | 统计类型,'sum' | 'avg' | 'minux' | 'max' | 'min' | 'count';默认 sum |
dpId | number | dp id |
productId | string | 产品 id |
statisticInterval | number | 统计间隔,数据保存天数,1(天)、2(小时)、4(月)、16(15 分钟) |
storageDuration | number | 数据保存天数 |
请求示例
// @ray-js/ray^1.2.12
import { getStatisticsConfig } from '@ray-js/ray';
getStatisticsConfig({
devId: 'vdevo166789063330437',
})
.then((respo