Comments

Get all comments

Changed on

The Get All Comments API allows users to retrieve all comments within a specific conversation in a project using its unique conversationId. This endpoint returns a paginated response containing all comments associated with the conversation, along with metadata such as timestamps, author details, and status. This API is useful for applications that need to display conversation threads, track discussions, or analyze collaboration trends within a project.

get/1.0/comments

Request

Query parameters

pageSizenumber
Example:100

This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100.

pageTokenstring
Example:59c12a42-dd10-11ed-afa1-0242ac120002

Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created.

includeAllFieldsboolean
Example:true

This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned.

sortOrder'ASC' | 'DESC'

The sortOrder param can be used to specify the sorting order, which can be Ascending (ASC) or Descending (DESC). Descending is the default option.

match'all' | 'any'

You can use the match param to specify if we need to filter the entries using either AND(all) / OR(any). Defaults to AND.

createdBy.eqnumber
Example:5

You can use this param to specify the team member who created the comment in the conversation, and the responses will contain comment conversations that match the creator.

createdAt.gtinteger
Example:1625164800000

You can use this param to provide an epoch milli value and the responses will contain comment conversations where the created date of the comment is greater than the given date.

createdAt.eqinteger
Example:1625164800000

You can use this param to provide an epoch milli value and the responses will contain comment conversations that match the exact created date of the comment.

createdAt.ltinteger
Example:1625164800000

You can use this param to provide an epoch milli value and the responses will contain comment conversations where the created date of the comment is less than the given date.

createdAt.geinteger
Example:1625164800000

You can use this param to provide an epoch milli value and the responses will contain comment conversations where the created date of the comment is greater than or equal to the given date.

createdAt.leinteger
Example:1625164800000

You can use this param to provide an epoch milli value and the responses will contain comment conversations where the created date of the comment is less than or equal to the given date.

includeFieldsstring[]

Use this query parameter to opt in for fields to be returned in the response body. Use comma separated values to fetch the respective fields. If left blank, default properties are returned.

isPrivate.eqboolean
Example:true

Filter by private conversations

projectId.eqinteger
Example:1000000100940

Filter comments by the id of the project they belong to.

sourceType'TASK' | 'PROJECT_CONVERSATIONS'

Type of the source the comments belong to. Defaults to TASK.

Response

The requested action was successfully executed.

Example response

{
  "data": [
    {
      "commentId": 201,
      "content": "This is a sample comment",
      "createdAt": 1681319726000,
      "createdBy": {
        "emailId": "john.doe@rocketlane.com",
        "userId": 201,
        "firstName": "John",
        "lastName": "Doe"
      },
      "source": {
        "sourceId": 201,
        "sourceType": "PROJECT_CONVERSATIONS"
      },
      "attachments": [
        {
          "attachmentId": 201,
          "attachmentName": "test_upload.png",
          "createdAt": 1680616174929,
          "location": "https://rocketlane.com/attachments/0/db83eb19-0bbf-4a37-b4e2-cd1b96708c73/test_upload.png",
          "thumbLocation": "https://rocketlane.com/attachments/0/db83eb19-0bbf-4a37-b4e2-cd1b96708c73/thumb_test_upload.png"
        }
      ],
      "private": true
    }
  ],
  "pagination": {
    "pageSize": 100,
    "hasMore": true,
    "totalRecordCount": 10398,
    "nextPage": "https://api.rocketlane.com/api/1.0/projects/1/conversations?includeFields=category,minutes&billable.eq=false&sortBy=startDate&sortOrder=desc&pageToken=e4a3dd8e-e338-11ed-b5ea-0242ac120002&limit=100&assignee.any=1&startDate.gt=2022-01-02",
    "nextPageToken": "e4a3dd8e-e338-11ed-b5ea-0242ac120002"
  }
}

Changes