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": "b0eae625-c09f-4acd-b647-f9fcc6fad469",
      "CommentBody": "sample string 2",
      "CommentAuthor": {
        "LinkToProfile": "sample string 1",
        "PictureUrl": "sample string 2",
        "ContactKey": "7c003739-e1e4-4130-9373-c3595e46c25c",
        "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-04-19T06:05:44.5851483Z",
        "UpdatedByContactKey": "5cc5528f-4ce4-4894-acb4-8485e1d79187",
        "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-04-19T06:05:44.5851483Z"
      },
      "IsOfficial": true,
      "ItemKey": "fc5f418d-b723-4460-a368-76c25a525344",
      "CreatedOn": "2024-04-19T06:05:44.5851483Z",
      "UpdatedOn": "2024-04-19T06:05:44.5851483Z"
    },
    {
      "CommentKey": "b0eae625-c09f-4acd-b647-f9fcc6fad469",
      "CommentBody": "sample string 2",
      "CommentAuthor": {
        "LinkToProfile": "sample string 1",
        "PictureUrl": "sample string 2",
        "ContactKey": "7c003739-e1e4-4130-9373-c3595e46c25c",
        "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-04-19T06:05:44.5851483Z",
        "UpdatedByContactKey": "5cc5528f-4ce4-4894-acb4-8485e1d79187",
        "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-04-19T06:05:44.5851483Z"
      },
      "IsOfficial": true,
      "ItemKey": "fc5f418d-b723-4460-a368-76c25a525344",
      "CreatedOn": "2024-04-19T06:05:44.5851483Z",
      "UpdatedOn": "2024-04-19T06:05:44.5851483Z"
    }
  ],
  "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" />