Deze referentie is alleen in het Engels. Naar het Nederlandse REST API-overzicht

Diese Referenz gibt es nur auf Englisch. Zur deutschen REST-API-Übersicht

Cette référence existe uniquement en anglais. Aller à la présentation de l'API REST en français

Esta referencia solo está en inglés. Ir a la introducción de la API REST en español

Comment

Comment

A comment on a work item or on a drive item: the rich-text body one user posted to a thread, with its author and its timestamps.

View as Markdown
Summary view
CommentList, 11 fields. What a list returns by default.
Detail view
Comment, 11 fields. The default for a single read and for every write.

Comments are reached through their parent (GET work-items/{work_item}/comments) or by id on the flat item path, and the parent is named by the commentable_type / commentable_id pair rather than by an expandable relation. Editing and deleting are author-only.

Used by

GETRead a comment/comments/{comment}Comment
PATCHEdit a comment/comments/{comment}Comment
GETList a drive item's comments/drive-items/{drive_item}/commentsCommentList
POSTPost a comment on a drive item/drive-items/{drive_item}/commentsComment
GETList a work item's comments/work-items/{work_item}/commentsCommentList
POSTPost a comment on a work item/work-items/{work_item}/commentsComment

Fields

Detail only
Only in the detail view.
Only with include
Only when you ask for it with include.
Server-assigned
Set by plnnrly, never by a request.
idinteger

Unique identifier.

bodyhtml

Comment body as rich text. HTML from the plnnrly editor, sanitised on the way out, so what you read back can differ from the bytes you sent. Mention spans (<span data-type="mention" data-id="3">) survive untouched and may be posted back verbatim; constructing a new mention is not supported in v2.0.

author_typestring

The kind of record author points at; it says which branch of author applies.

user

New values may be added.

author_idinteger

The id of the record author points at.

authorRef or UserSummary

Who wrote the comment. Renders as {"id": N} unless ?include=author expands it, which additionally requires the users prefix's read grant and a token covering it.

Which form you get depends on author_type.

commentable_typestring

The kind of record commentable points at; it says which branch of commentable applies.

work_itemdrive_item

New values may be added.

commentable_idinteger

The id of the record commentable points at.

commentableRef

The record the comment hangs off, as a reference. Look it up from commentable_type and commentable_id with GET /api/v2/work-items/{id} or GET /api/v2/drive-items/{id}. It is not expandable: ?include=commentable is a 400.

Which form you get depends on commentable_type.

work_item
Ref
drive_item
Ref
created_attimestamp (YYYY-MM-DDThh:mm:ssZ)

When the comment was posted.

updated_attimestamp (YYYY-MM-DDThh:mm:ssZ)

Last-write timestamp; use for incremental sync, and as the revision the strong ETag is derived from.

Variants

CommentList 11 fields

What a collection returns, and what ?view=summary returns on a single record.

The same fields as the detail object.

CommentSummary 5 fields

The embedded form: what you get when another resource carries this one and you did not include it.

Leaves out: body, commentable_type, commentable_id, commentable, updated_at, links

Polymorphic fields

authorWhich form you get depends on author_type.
commentableWhich form you get depends on commentable_type.