alarm-comment-controller

Create or update Alarm Comment

Creates or Updates the Alarm Comment. When creating comment, platform generates Alarm Comment Id as time-based UUID. The newly created Alarm Comment id will be present in the response. Specify existing Alarm Comment id to update the alarm. Referencing non-existing Alarm Comment Id will cause 'Not Found' error.

To create new Alarm comment entity it is enough to specify 'comment' json element with 'text' node, for example: {"comment": { "text": "my comment"}}.

If comment type is not specified the default value 'OTHER' will be saved. If 'alarmId' or 'userId' specified in body it will be ignored.

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

post/api/alarm/{alarmId}/comment

Request

Path parameters

alarmIdstring required

A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'

Request body

type'SYSTEM' | 'OTHER'

Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user.

commentunknown
createdTimeinteger

Timestamp of the alarm comment creation, in milliseconds

namestring

representing comment text

Example request

{
  "alarmId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "ALARM"
  },
  "userId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "USER"
  },
  "type": "SYSTEM/OTHER",
  "comment": {},
  "id": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9"
  },
  "createdTime": 1634058704567,
  "name": "Please take a look"
}

Response

OK

type'SYSTEM' | 'OTHER'

Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user.

commentunknown
createdTimeinteger

Timestamp of the alarm comment creation, in milliseconds

namestring

representing comment text

Example response

{
  "alarmId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "ALARM"
  },
  "userId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "USER"
  },
  "type": "SYSTEM/OTHER",
  "comment": {},
  "id": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9"
  },
  "createdTime": 1634058704567,
  "name": "Please take a look"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.