---
title: "Get Alarm comments (getAlarmComments)"
method: GET
path: "/api/alarm/{alarmId}/comment"
tags: ["alarm-comment-controller"]
---

# Get Alarm comments (getAlarmComments)

`GET /api/alarm/{alarmId}/comment`

Returns a page of alarm comments for specified alarm. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. 

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

## Path parameters

- `alarmId` string, required

## Query parameters

- `pageSize` integer, required
- `page` integer, required
- `sortProperty` 'createdTime' | 'id'
- `sortOrder` 'ASC' | 'DESC'

## Response `200`

OK

- PageDataAlarmCommentInfo
  - `data` AlarmCommentInfo[] — Array of the entities
    - `id` AlarmCommentId
      - `id` string, uuid, required — string
    - `createdTime` integer — Timestamp of the alarm comment creation, in milliseconds
    - `alarmId` AlarmId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'ALARM', required — string
    - `userId` UserId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'USER', required — string
    - `type` 'SYSTEM' | 'OTHER' — Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user.
    - `comment` unknown
    - `firstName` string — User first name
    - `lastName` string — User last name
    - `email` string — User email address
    - `name` string — representing comment text
  - `totalPages` integer — Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria
  - `totalElements` integer — Total number of elements in all available pages
  - `hasNext` boolean — 'false' value indicates the end of the result set

---

[API](https://skmtc.net/thingsboard/apis/thingsboard-rest-api.md) · [All operations](https://skmtc.net/thingsboard/apis/thingsboard-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thingsboard/thingsboard-rest-api/revisions/40169ccdec5c/schema)
