GET api/v2.0/Comments/GetComments?afterCommentKey={afterCommentKey}&beforeCommentKey={beforeCommentKey}&limit={limit}

This will retrieve a paginated set of comments based on the commentKey provided. Using the afterCommentKey is recommended when continuing the default order of comments provided by the Get endpoint or other various endpoints. Either the afterCommentKey or the beforeCommentKey must be provided. If both keys are put in the request, the afterAnswerKey will take precedence.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
afterCommentKey

The unique identifier for the comment that you would like to use as a starting point to retrieve comments, the result will not include this comment.

globally unique identifier

None.

beforeCommentKey

The unique identifier for the comment that you would like to use as a starting point to retrieve comments prior to the specified comment, the result will not include this comment.

globally unique identifier

None.

limit

The number of comments to return. Default is 10, max is 50.

integer

Default value is 10

Body Parameters

None.

Response Information

Resource Description

The set of comments will always return in order starting with the official comment (if one exists), then by most recent to least recent. Using the afterCommentKey will return a specified number of comments after the specified comment, beforeCommentKey will return a specified number of comments before the comment in that sort order

PaginatedComments
NameDescriptionTypeAdditional information
Comments

The set of paginated comments

Collection of Comment

None.

HasMoreComments

Whether or not additional comments exist after the last comment in the set

boolean

None.

Next

a relative path to retrieve the next set of comments if additional comments exist

string

None.

Previous

a relative path to retrieve the previous set of comments if previous comments exist

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Comments": [
    {
      "CommentKey": "65e84c8e-a1da-4395-a5ca-2bdba8fb059b",
      "CommentBody": "sample string 2",
      "CommentAuthor": {
        "LinkToProfile": "sample string 1",
        "PictureUrl": "sample string 2",
        "ContactKey": "1e7bf5cd-e5e5-4590-80c8-c7790fa28a2b",
        "FirstName": "sample string 4",
        "LastName": "sample string 5",
        "DisplayName": "sample string 6",
        "EmailAddress": "sample string 7",
        "ContactStatusCode": "sample string 8",
        "PrefixCode": "sample string 9",
        "UpdatedOn": "2024-12-06T02:45:11.1278145Z",
        "UpdatedByContactKey": "af7cef1f-d8f6-4f8e-9f32-173e737a1ae3",
        "CompanyName": "sample string 12",
        "CompanyTitle": "sample string 13",
        "SuffixCode": "sample string 14",
        "Designation": "sample string 15",
        "LegacyContactKey": "sample string 16",
        "InformalName": "sample string 17",
        "MiddleName": "sample string 18",
        "IsCompany": true,
        "CompanyLegacyContactKey": "sample string 20",
        "AMSDirectoryOptOut": true,
        "HLDirectoryOptOut": true,
        "HLContactMeOptOut": true,
        "LargePictureUrl": "sample string 24",
        "AgreedToTermsDateTime": "2024-12-06T02:45:11.1278145Z"
      },
      "IsOfficial": true,
      "ItemKey": "5677bf8c-2d1a-46c1-b4e7-99cfffdd7b5e",
      "CreatedOn": "2024-12-06T02:45:11.1278145Z",
      "UpdatedOn": "2024-12-06T02:45:11.1278145Z"
    },
    {
      "CommentKey": "65e84c8e-a1da-4395-a5ca-2bdba8fb059b",
      "CommentBody": "sample string 2",
      "CommentAuthor": {
        "LinkToProfile": "sample string 1",
        "PictureUrl": "sample string 2",
        "ContactKey": "1e7bf5cd-e5e5-4590-80c8-c7790fa28a2b",
        "FirstName": "sample string 4",
        "LastName": "sample string 5",
        "DisplayName": "sample string 6",
        "EmailAddress": "sample string 7",
        "ContactStatusCode": "sample string 8",
        "PrefixCode": "sample string 9",
        "UpdatedOn": "2024-12-06T02:45:11.1278145Z",
        "UpdatedByContactKey": "af7cef1f-d8f6-4f8e-9f32-173e737a1ae3",
        "CompanyName": "sample string 12",
        "CompanyTitle": "sample string 13",
        "SuffixCode": "sample string 14",
        "Designation": "sample string 15",
        "LegacyContactKey": "sample string 16",
        "InformalName": "sample string 17",
        "MiddleName": "sample string 18",
        "IsCompany": true,
        "CompanyLegacyContactKey": "sample string 20",
        "AMSDirectoryOptOut": true,
        "HLDirectoryOptOut": true,
        "HLContactMeOptOut": true,
        "LargePictureUrl": "sample string 24",
        "AgreedToTermsDateTime": "2024-12-06T02:45:11.1278145Z"
      },
      "IsOfficial": true,
      "ItemKey": "5677bf8c-2d1a-46c1-b4e7-99cfffdd7b5e",
      "CreatedOn": "2024-12-06T02:45:11.1278145Z",
      "UpdatedOn": "2024-12-06T02:45:11.1278145Z"
    }
  ],
  "HasMoreComments": true,
  "Next": "sample string 2",
  "Previous": "sample string 3"
}

application/xml, text/xml

Sample:
<PaginatedComments xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise.Comments" />