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.
- 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
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.
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.
The kind of record commentable points at; it says which branch of commentable applies.
work_itemdrive_item
New values may be added.
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_itemRefdrive_itemRef
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
CommentLinks 1 field
The links object on this resource.
Keys: self
Polymorphic fields
authorWhich form you get depends on author_type.commentableWhich form you get depends on commentable_type.Something wrong or missing on this page? Tell us