Video Comments

Get a thread

GET
https://peertube2.cpy.re/api/v1/videos/{id}/comment-threads/{threadId}

Since PeerTube 8.3 the returned tree is truncated: only the first replies of each comment are included, and only down to maxDepth nesting levels. Use GET /api/v1/videos/{id}/comments/{commentId}/replies to fetch the replies that are missing, comparing children and totalChildren of each node of the tree.

Parameters

idid | UUIDv4 | shortUUIDrequiredpath

The object id, uuid or short uuid

threadIdintegerrequiredpath

The thread id (root comment id)

maxDepthinteger[1, 10]5query

Number of nesting levels to include below the requested comment. Bounded by repliesPerLevel and count, see the note on repliesPerLevel

repliesPerLevelinteger[1, 30]10query

Number of direct replies to include for each comment of the tree. Does not apply to the first level of GET /api/v1/videos/{id}/comments/{commentId}/replies, which is paginated using start and count. A tree can make the server walk through count * (repliesPerLevel ^ maxDepth - 1) / (repliesPerLevel - 1) comments, which grows exponentially. Combinations above 2000000 are rejected A deep tree has to be narrow and a wide tree has to be shallow.

x-peertube-video-passwordstringheader

Required on password protected video

Response

successful operation

Response fields application/json
Show child attributes
idid>= 1
Example
42
urlurl<url>
texttext<html>

Text of the comment

Example
This video is wonderful!
threadIdid>= 1
Example
42
inReplyToCommentIdid | null
Show child attributes
id>= 1
Example
42
videoIdid

object id for the video

Show child attributes
id>= 1
Example
42
createdAtcreatedAt<date-time>
updatedAtupdatedAt<date-time>
deletedAtstring<date-time> | nullnull
isDeletedbooleanfalse
heldForReviewheldForReview
totalRepliesFromVideoAuthorinteger>= 0
totalRepliesinteger>= 0
Show child attributes
idid>= 1
Example
42

Same fields as comment.videoId

urlstring<url>
nameusername

immutable name of the actor, used to find or mention it

Show child attributes

immutable name of the user, used to find or mention its actor

username
Example
chocobozzz
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
hoststring<hostname>

server on which the actor is resident

hostRedundancyAllowedboolean | null

whether this actor's host allows redundancy of its videos

followingCountinteger>= 0

number of actors subscribed to by this actor, as seen by this instance

followersCountinteger>= 0

number of followers of this actor, as seen by this instance

createdAtstring<date-time>
updatedAtstring<date-time>
userIdid | null

object id for the user tied to this account

Show child attributes
id>= 1
Example
42
displayNamestring

editable name of the account, displayed in its representations

descriptionstring | null

text or bio displayed on the account's profile

Direct replies of comment. The server truncates the tree in depth (see the maxDepth parameter) and in width, so this array may contain less elements than totalChildren. Missing replies can be fetched using GET /api/v1/videos/{id}/comments/{commentId}/replies

Same fields as VideoCommentThreadTree

totalChildreninteger>= 0

Total number of direct replies of comment the current user can see