---
name: "getDevAlarmList"
mode: "api"
versionRequirements:
  - { name: "@ray-js/ray", version: "1.5.2" }
title: "getDevAlarmList - Get Device Alarm List"
---

## getDevAlarmList

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

### Description

Query the alarm list by device ID

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `devId` | `string` | Yes | Device ID |

### Return Value

Type: `Promise<AlarmList[]>`

Alarm rule list, including alarm ID, name, enabled status, binding info, etc.

### Examples

#### Basic usage

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

getDevAlarmList('vdevo169477319679442').then((res) => {
  console.log('Alarm list:', res);
}).catch((error) => {
  console.error(error);
});
```
