---
name: "SmartStorageAbility.getAll"
mode: "api"
versionRequirements:
  - { name: "@ray-js/panel-sdk", version: "1.0.0" }
title: "getAll"
---

## SmartStorageAbility.getAll

> [VERSION] @ray-js/panel-sdk >= 1.0.0

### Description

Read all stored data under the current device/group

### Parameters

`(callback: Function)`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `callback` | `(cacheData: object) => void` | No | Optional callback invoked after the data is read |

### Return Value

Type: `Promise<{ [key: string]: TReturnRes<T> }>`

Result containing all stored key-value pairs

### Referenced Types

##### `type` TReturnRes

| Property | Type | Description |
| --- | --- | --- |
| `__isEqual__` | `boolean` | Whether the values are equal, used to determine whether the cloud matches the local data; if equal, do not update |
| `data` | `Object` | Returned value and type |
| `time` | `timeStamp` | Timestamp of the generated design, used to determine which side is the latest (local or cloud data) |

##### `type` TReturnRes.data

| Property | Type | Description |
| --- | --- | --- |
| `value` | `T` | Returned value |
| `type` | `string` | Returned type |


### Examples

#### Example

```typescript
const allData = await sdm.storage.getAll();
console.log('All stored data:', allData);
```
