GET/{resource}/{resourceId}/comments.json

Retrieving Recent Comments

Resource:

Options for resource are: links, milestones, files, notebooks or tasks

Resource_id:

Id of the links, milestones, files, notebooks or tasks

Notes

Passing in "page" and "pageSize": eg. GET /tasks/7/comments.json?page=2&pageSize=50.

The following headers are returned:

  • X-Records - The total number of replies
  • X-Pages - The total number of pages
  • X-Page - The page you requested

Important Note:

When returned comments on a file, the returned commentable_type field is file but the commentable-id field relates to the File Version ID


Path Params

  • Name
    resource
    Type
    string
    required
    Description
  • Name
    resourceId
    Type
    string
    required
    Description

Responses

  • Code
    200
    Type
    object
    Schema
    Description
    200 Response

Examples

200 Response

application/json
{
  "comments": [
    {
      "project-id": "999",
      "attachments_count": "0",
      "author-lastname": "User",
      "commentable-id": "999",
      "commentable_type": "todo_items",
      "emailed-from": "",
      "isRead": "1",
      "private": "0",
      "lockdown-id": "",
      "datetime": "2014-03-31T13:03:29Z",
      "author-avatar-url": "https://s3.amazonaws.com/TWFiles/2/users/999.avatar",
      "author_id": "999",
      "id": "999",
      "company-name": "Demo 1 Company",
      "last-changed-on": "",
      "content-type": "HTML",
      "nr-notified-people": "0",
      "type": "task",
      "item-name": "Test Task",
      "attachments-count": "0",
      "_author_id": {
        "deprecated": true
      },
      "company-id": "999",
      "html-body": "A test comment",
      "project-name": "demo",
      "body": "A test comment",
      "commentNo": "1",
      "attachments": [],
      "author-firstname": "Demo",
      "comment-link": "tasks/436523?c=93",
      "author-id": "999"
    }
  ],
  "STATUS": "OK"
}