index.ts 430 Bytes
import { defHttp } from '/@/utils/http/axios';

// 获取设备配置
export const getDeviceProfile = () => {
  return defHttp.get({
    url: '/deviceProfile/me/list',
  });
};

export const getDeviceHistoryInfo = (params) => {
  return defHttp.get(
    {
      url: `/plugins/telemetry/DEVICE/${params.entityId}/values/timeseries`,
      params: { ...params, entityId: null },
    },
    {
      joinPrefix: false,
    }
  );
};