List a record's comment threads
Lists every thread on the record, open and resolved, with their comments, newest activity first. Threads on fields the user may not see are left out. Fails with 404 NOT_FOUND if the record does not exist or the user may not see it.
Request
GET https://www.activityinfo.org/resources/form/{formId}/record/{recordId}/comments
Successful response
application/json
| array[object] | |||
| thread | object | The thread itself. | required |
| formId | string | The id of the form of the record the thread is attached to. | required |
| recordId | string | The id of the record the thread is attached to. | required |
| fieldId | string | The id of the field the thread is about, or `_record` for a thread on the record as a whole. | required |
| threadId | string | The id of the thread, unique within the form. | required |
| databaseId | string | The id of the database the form belongs to. | required |
| startedBy | string | The id of the user who started the thread. | required |
| startTime | instant | When the thread was started. | required |
| resolved | boolean | True if the thread has been marked resolved. | required |
| resolvedBy | string | The id of the user who resolved the thread, if it is resolved. | optional |
| resolvedTime | instant | When the thread was resolved, if it is resolved. | optional |
| commentCount | integer | The number of entries in the thread, including resolution events and deleted comments. | required |
| lastActivityTime | instant | The time of the latest entry; threads are listed newest first by this time. | required |
| lastAuthorId | string | The id of the author of the latest entry. | optional |
| lastCommentPreview | string | The first 200 characters of the latest comment, for listing threads without their comments. | optional |
| subscriberIds | array[string] | The ids of the users who are notified of activity in this thread. | required |
| subscribed | boolean | True if the user is notified of activity in the thread. | required |
| unread | boolean | True if the thread has activity the user has not yet seen. | required |
| recordLabel | string | The record's label as the user sees it, or absent when the thread was listed without labels. | optional |
| comments | array[object] | The thread's entries in time order, or empty when the thread was listed without its comments. | required |
| formId | string | The id of the form of the record the thread is attached to. | required |
| recordId | string | The id of the record the thread is attached to. | required |
| threadId | string | The id of the thread this entry belongs to. | required |
| commentId | string | The id of this entry, unique within the thread. | required |
| authorId | string | The id of the user who wrote the comment, or who resolved or reopened the thread. | required |
| time | instant | When the entry was made. | required |
| type | string | Whether the entry is a comment, or records the thread being resolved or reopened. Values:
|
required |
| text | string | The comment's text, with mentions written as `@{userId}` tokens. Empty for resolution events and for deleted comments. | required |
| mentionIds | array[string] | The ids of the users mentioned in the text. | required |
| editTime | instant | When the author last edited the text. Absent if the comment was never edited. | optional |
| deleted | boolean | True if the comment was deleted. Its text is then empty, and it stays in the thread as a placeholder. | required |
| users | array[object] | The authors, subscribers and mentioned users referred to by this view, so that the client can show names without a lookup. | required |
| id | string | The user's id. | required |
| name | string | The user's full name. | required |
| string | The user's email address. | required | |
Error responses
| Status Code | Error Code | Description |
|---|---|---|
| 401 | AUTHENTICATION_ |
The request must be authenticated |
Example
curl -u anything:YOUR_API_TOKEN \
https://www.activityinfo.org/resources/form/ck8pu9ha07/record/ck34ujs6v8/comments