---
name: "SmartGroupModel.getGroupInfo"
mode: "api"
versionRequirements:
  - { name: "@ray-js/panel-sdk", version: "1.5.0" }
title: "getGroupInfo"
---

## SmartGroupModel.getGroupInfo

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

> 💡 This method is specific to SmartGroupModel and unavailable on SmartDeviceModel.

### Description

Get smart group information

### Parameters

None


### Return Value

Type: `GroupInfo`

Group information object containing groupId, name, deviceList, schema, dps, etc.

**`type` GroupInfo**

```typescript
export type GroupInfo = ty.device.GroupInfo & {
  /**
   * dp id 与 dp code 的映射
   */
  idCodes: Record<string, string>;
  /**
   * dp code 与 dp id 的映射
   */
  codeIds: Record<string, string>;
};
```

### Referenced Types

##### `type` GroupInfo

Group information

| Property | Type | Description |
| --- | --- | --- |
| `idCodes` | `Record<string, string>` | Mapping from dp id to dp code |
| `codeIds` | `Record<string, string>` | Mapping from dp code to dp id |


### Examples

#### Example

```typescript
const groupInfo = group.getGroupInfo();
console.log(groupInfo.name);        // Group name
console.log(groupInfo.deviceList);  // Sub-device list in the group
```
