GET api/v2.0/Comments/Get?itemKey={itemKey}&limit={limit}

This will return a collection of comments for a particular item on the site. The content types that can have comments associated to it are Blogs, Documents, and Events

Request Information

URI Parameters

NameDescriptionTypeAdditional information
itemKey

The unique identifier of a blog, document, or event whose comments you want to retrieve

globally unique identifier

Required

limit

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

integer

Default value is 10

Body Parameters

None.

Response Information

Resource Description

Returns the set of comments for the item in order from most recent to least recent based on the date each comment was created.

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": "83fdef2a-f091-4087-9f16-854a5b2fccc2",
      "CommentBody": "sample string 2",
      "CommentAuthor": {
        "LinkToProfile": "sample string 1",
        "PictureUrl": "sample string 2",
        "ContactKey": "b9824b8c-9219-4889-93ff-48e4fc3429c8",
        "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": "2021-05-18T00:02:04.4810395Z",
        "UpdatedByContactKey": "bd14ac86-6184-49e2-878f-8a3464b311cb",
        "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": "2021-05-18T00:02:04.4810395Z"
      },
      "IsOfficial": true,
      "CreatedOn": "2021-05-18T00:02:04.4810395Z",
      "UpdatedOn": "2021-05-18T00:02:04.4810395Z"
    },
    {
      "CommentKey": "83fdef2a-f091-4087-9f16-854a5b2fccc2",
      "CommentBody": "sample string 2",
      "CommentAuthor": {
        "LinkToProfile": "sample string 1",
        "PictureUrl": "sample string 2",
        "ContactKey": "b9824b8c-9219-4889-93ff-48e4fc3429c8",
        "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": "2021-05-18T00:02:04.4810395Z",
        "UpdatedByContactKey": "bd14ac86-6184-49e2-878f-8a3464b311cb",
        "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": "2021-05-18T00:02:04.4810395Z"
      },
      "IsOfficial": true,
      "CreatedOn": "2021-05-18T00:02:04.4810395Z",
      "UpdatedOn": "2021-05-18T00:02:04.4810395Z"
    }
  ],
  "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" />