---
name: "getDevProperty"
mode: "api"
versionRequirements:
  - { name: "@ray-js/ray", version: "1.5.2" }
title: "getDevProperty - Get Custom Device Property Data"
---

## getDevProperty

> [VERSION] @ray-js/ray >= 1.5.2

### Description

Retrieve device property data set via custom settings; write it with saveDevProperty

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `params` | `IGetDevProperty` | Yes | Request parameters |

### Return Value

Type: `Promise<IGetDevPropertyResponse>`

Array of device property data

### Referenced Types

##### `interface` IGetDevProperty

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `devId` | `string` | Yes | Device ID |
| `bizType` | `number` | Yes | Business type (custom) |
| `code` | `string` | Yes | Device custom attribute key |

##### `type` IGetDevPropertyResponse

```typescript
IDevPropertyItem[]
```


### Examples

#### Basic usage

```ts
import { getDevProperty } from '@ray-js/ray';

getDevProperty({
  devId: 'your_device_id',
  bizType: 0,
  code: 'hello',
}).then((response) => {
  console.log('Device property:', response);
}).catch((err) => {
  console.error(err);
});
```
