API List Comments of a Recording

From IVS Wiki
Jump to: navigation, search

This API call retrieves all comments associated with a specific recording.

Resource URL

http://valt.example.com/api/v3/comment/record/{recordId}

Replace {recordId} with the UUID of the record.

Resource Information

Method GET
Headers Content-Type: application/json
Response Type JSON
Authentication Required Yes

Parameters

Path Parameters

Parameter Description Example
recordId The UUID of the recording for which comments are to be retrieved. 7b931a86-2142-4121-a6f8-2e3197d4c5bf

Response

Code Reason
200 Success
400 Invalid Request (See Response for Specific Error)
401 Unauthorized
500 Internal Server Error

A successful response returns a JSON array of Comment objects. Each Comment object contains the following fields:

Comment Object Fields
Field Type Description
id int Unique identifier of the comment.
parentId int or null The ID of the parent comment, if applicable. Null if it has no parent.
message string or null The text content of the comment.
recordId string Unique identifier for the associated record.
recordTime string Seconds from the beginning of the associated record.
createdAt int Unix timestamp when the comment was created.
updatedAt int Unix timestamp when the comment was last updated.
author User object The author of the comment. Contains id, username, and displayName.
updatedBy User object or null The user who last updated the comment. Null if never updated.
audioId string or null Unique identifier for the associated audio, if applicable.
template Template object or null Template attachment, if applicable.
files array List of file attachments. Empty array if no files are attached. Each file contains id, name, and size (bytes).
color string Color name associated with the comment.
replies array Array of reply comments.
taggedUsers array Array of users tagged in the comment.
taggedUserGroups array Array of user groups tagged in the comment.

Examples

Request

https://ivstest1.ad.ipivs.com/api/v3/comment/record/7b931a86-2142-4121-a6f8-2e3197d4c5bf?access_token=e82632d19c523678fea3d1016c6df9e9

Successful Response

Sample response is shown with line breaks to make it more readable. Actual responses will not include line breaks.

[
  {
    "id": 1,
    "parentId": null,
    "message": "comment 1",
    "recordId": "7b931a86-2142-4121-a6f8-2e3197d4c5bf",
    "recordTime": 1,
    "audioId": null,
    "template": null,
    "author": {
      "id": 2,
      "displayName": "user without rights",
      "username": "no rights user"
    },
    "files": [],
    "updatedBy": null,
    "color": "red",
    "replies": [],
    "taggedUsers": [],
    "taggedUserGroups": [],
    "createdAt": 1737109634,
    "updatedAt": 1737111434
  },
  {
    "id": 2,
    "parentId": null,
    "message": "comment 2",
    "recordId": "7b931a86-2142-4121-a6f8-2e3197d4c5bf",
    "recordTime": 2,
    "audioId": null,
    "template": null,
    "author": {
      "id": 1,
      "displayName": null,
      "username": "admin"
    },
    "files": [],
    "updatedBy": null,
    "color": "red",
    "replies": [],
    "taggedUsers": [],
    "taggedUserGroups": [],
    "createdAt": 1737109634,
    "updatedAt": 1737111434
  }
]

Failure Response

Sample response is shown with line breaks to make it more readable. Actual responses will not include line breaks.

{
  "error": {
    "code": 500,
    "message": "Internal Server Error"
  }
}