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

## getPanelAgentMemorySwitch

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

> 💡 This API requires cloud capabilities. Configure authorization under Development Settings - Cloud Capabilities in the [Mini App Developer Platform](https://platform.tuya.com/miniapp/).

### Description

Query memory switch status.

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `params` | `GetPanelAgentMemorySwitchParams` | Yes | Request body |

### Return Value

Type: `Promise<GetPanelAgentMemorySwitchResult>`

GetPanelAgentMemorySwitchResult (See type definitions and minituya return parameters for field meanings)

##### GetPanelAgentMemorySwitchResult

| Property | Type | Description |
| --- | --- | --- |
| `summaryOpen` | `boolean` | Summary switch |
| `memoryOpen` | `boolean` | Memory switch |

### Referenced Types

##### `interface` GetPanelAgentMemorySwitchParams

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


### Examples

#### Request example

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

const params = {
  devId: 'your_device_id',
};

getPanelAgentMemorySwitch(params)
  .then(result => {
    console.log('Memory switch status:', result);
  })
  .catch(error => {
    console.error('Failed to get memory switch status:', error);
  });
```

#### Response example

```json
{
  "summaryOpen": true,
  "memoryOpen": true
}
```
