Skip to content

37 Comment

Преподобный Ален edited this page Feb 18, 2026 · 1 revision

Comment

A comment is a text message created by a user under an object in the system. Comments support hierarchical threading through a parent reference, allowing users to reply to previously created comments.

API

Set

POST /api/v1/comment/set

Adds a new comment or updates an existing one.

Request parameters:

Name Type Value Description
id UUID Required only for the Update action. Comment identifier.
parent UUID Optional. Parent comment identifier. Specified when replying to a previously created comment (threading).
object UUID Required. Object identifier.
priority INTEGER Recommended. Comment priority. Default is 0.
text STRING Required. Comment text.
data JSON Optional. Data in arbitrary format.

NOTE: If the id key is not specified or is null, the action is treated as Add; otherwise it is treated as Update.

NOTE: Values of unspecified keys are treated as null.

NOTE: For the Update action, you do not need to pass all keys -- only the ones that need to be changed.

NOTE: The response to this request will contain the data from the Get action.

Get

POST /api/v1/comment/get

Returns a comment.

Request parameters:

Name Type Value Description
id UUID Required. Comment identifier.

Response format:

Field Type Description
id UUID * Comment identifier.
parent UUID Parent comment identifier. Specified when replying to a previously created comment.
object UUID * Object identifier.
entity UUID * Entity identifier.
entitycode STRING * Entity code.
entityname STRING * Entity name.
class UUID * Class identifier.
classcode STRING * Class code.
classlabel STRING * Class label.
type UUID * Type identifier.
typecode STRING * Type code.
typename STRING * Type name.
typedescription STRING * Type description.
label STRING Object label.
owner UUID * User account identifier (comment author).
username STRING * User account name.
name STRING * User display name.
given_name STRING User's first name.
family_name STRING User's last name.
patronymic_name STRING User's patronymic name.
email STRING User's email address.
email_verified BOOLEAN Whether the user's email is verified.
phone STRING User's phone number.
phone_verified BOOLEAN Whether the user's phone is verified.
priority INTEGER * Comment priority. Default is 0.
created TIMESTAMP * Date and time the comment was created.
updated TIMESTAMP * Date and time the comment was last updated.
text STRING * Comment text.
data JSON Data in arbitrary format.

* -- Cannot be empty.

Count

POST /api/v1/comment/count

Returns the number of comments, with optional data filtering.

Request parameters: Common list query parameters

List

POST /api/v1/comment/list

Returns comments as a list.

Request parameters: Common list query parameters

Threading

Comments support hierarchical threading. To create a reply to an existing comment, specify the parent field with the identifier of the comment being replied to. This allows building arbitrarily deep comment trees:

Comment A (parent: null)
  ├── Reply B (parent: A)
  │     └── Reply D (parent: B)
  └── Reply C (parent: A)

Related

Clone this wiki locally