---
name: "resetStatistics"
mode: "kit"
versionRequirements:
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.5" }
---

## resetStatistics

> [VERSION] @tuya-miniapp/cloud-api >= 1.0.5

> 💡 该接口为云能力，需开通授权后使用，关于云能力可[查看文档](/cn/miniapp/common/desc/tech-stack/api)。
> 注意：目前云能力在「开发者工具」环境无法使用，需要打包后或真机调试使用。
> 注意：该方法会清空统计数据，请注意使用方式（见 minituya 文档）。

### 描述

重置设备的统计数据。

### 参数

`Params`

| 参数 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `data` | `IDevId` | 是 | - | 请求体 |

### 引用对象

##### `type` IDevId

仅含设备 ID 的请求体（如 `getStatisticsConfig`、`resetStatistics`）。

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `devId` | `string` | 设备 ID |


### 示例代码

#### 请求示例

```typescript
import { resetStatistics } from '@tuya-miniapp/cloud-api';

resetStatistics({
  devId: 'vdevo161733425146241',
})
  .then((response) => {
    console.log(response);
  })
  .catch();
```

#### 返回示例

```json
true
```
