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

## resetStatistics

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

> 💡 This API is a cloud capability and requires authorization before use. For details on cloud capabilities, see the [documentation](/cn/miniapp/common/desc/tech-stack/api).
> Note: Currently, cloud capabilities are not available in the Developer Tools environment; you must package the app or debug on a real device.
> Note: This method clears statistical data. Use with caution (see the minituya documentation).

### Description

Reset the device’s statistical data.

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `IDevId` | Yes | Request body |

### Return Value

Type: `Promise<boolean>`

The docs show a response of true; this function returns Promise<any>, subject to the actual wrapper

### Referenced Types

##### `type` IDevId

Request body containing only the device ID (e.g., `getStatisticsConfig`, `resetStatistics`).

| Property | Type | Description |
| --- | --- | --- |
| `devId` | `string` | Device ID |


### Examples

#### Request example

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

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

#### Response example

```json
true
```
