Comments

The Comments API provides a range of actions for manipulating comments within Unet.


Basic information

Scopes

  • inherited
  • comments_write

Base URI

Endpoints

RESOURCE_URI — URI is obtained from token exchange point.
PARENT_RESOURCE_URI — URI that contains a parent endpoint (e.g. RESOURCE_URIentries/ID).

Prefix Endpoint Description
PARENT_RESOURCE_URI comments/ Getting a list of comments
PARENT_RESOURCE_URI comments/add/ Adding a comment
RESOURCE_URI comments/ID Retrieving comment details
RESOURCE_URI comments/ID/edit/ Editing a comment
RESOURCE_URI comments/ID/delete/ Deleting a comment
RESOURCE_URI comments/ID/rating/ Getting a list of comment ratings

+Getting a list of comments

Endpoint

Scopes

  • inherited

Request

Response


+Retrieving comment details

Endpoint

Scopes

  • inherited

Request

  • No specific request params

Response


+Adding a comment

Endpoint

Scopes

  • comments_write

Request

Response


+Editing a comment

Endpoint

Scopes

  • comments_write

Request

Response


+Deleting a comment

Endpoint

Scopes

  • comments_write

Request

  • No specific request params

Response

  • No specific responce params

Definitions

CommentsListRequest

Name Description

limit (o)
unsigned integer

Number of items expected in response.

cursor (o)
string

The value of the next_cursor / prev_cursor parameter from the responce.
Should be empty to get the first set (page) of elements.

tree_structure (o)
boolean

CommentsListResponse

Name Description

items[]
object

@CommentsItemResponse

limit
unsigned integer

Number of returned items (items per page).

next_cursor
string

URL for the next portion of items (next page).
Empty if there is no items for the next portion.

prev_cursor
string

URL for the previous portion of items (previous page).
Empty if there is no items for the previous portion.

total_count
unsigned integer

Total number of items.

CommentsItemResponse

Name Description

id
unsigned integer

parent_id
unsigned integer

ID of the parent comment.
Present if a tree structure is requested.
Exceeded for a single comment request.

nesting_level
unsigned integer

Present if a tree structure is requested.
Exceeded for a single comment request.

index_number
unsigned integer

Present if a tree structure is not requested.
Exceeded for a single comment request.

author_uid
unsigned integer

created_time
timestamp

edits[]
object

@ItemEdits

message
string

The comment text.

can_edit
boolean

can_delete
boolean

can_reply
boolean

rating
object

RatingModel

attachments
object

AttachmentStructure

CommentsAddRequest

Name Description

parent_id
unsigned integer

ID of the parent comment (for posting a reply).
The comment text.

message (r)
string

attachments[]
object

AttachmentsConfiguration

ItemEdits

Name Description

uid
unsigned integer

ID of a user who edited the comment.

time
timestamp

Time when the comment was edited.