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": "c7ff67d9-2af3-4507-889b-12e5c202d47f",
      "CommentBody": "sample string 2",
      "CommentAuthor": {
        "LinkToProfile": "sample string 1",
        "PictureUrl": "sample string 2",
        "ContactKey": "5ed10a43-71b3-41e5-9f3c-e11f0191e2f3",
        "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-19T23:45:05.4838019Z",
        "UpdatedByContactKey": "83a01a4e-f45b-4243-96b7-16c03b7b161e",
        "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-19T23:45:05.4838019Z"
      },
      "IsOfficial": true,
      "ItemKey": "a5670a37-29e3-43c1-a706-b79fee251688",
      "CreatedOn": "2024-04-19T23:45:05.4838019Z",
      "UpdatedOn": "2024-04-19T23:45:05.4838019Z"
    },
    {
      "CommentKey": "c7ff67d9-2af3-4507-889b-12e5c202d47f",
      "CommentBody": "sample string 2",
      "CommentAuthor": {
        "LinkToProfile": "sample string 1",
        "PictureUrl": "sample string 2",
        "ContactKey": "5ed10a43-71b3-41e5-9f3c-e11f0191e2f3",
        "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-19T23:45:05.4838019Z",
        "UpdatedByContactKey": "83a01a4e-f45b-4243-96b7-16c03b7b161e",
        "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-19T23:45:05.4838019Z"
      },
      "IsOfficial": true,
      "ItemKey": "a5670a37-29e3-43c1-a706-b79fee251688",
      "CreatedOn": "2024-04-19T23:45:05.4838019Z",
      "UpdatedOn": "2024-04-19T23:45:05.4838019Z"
    }
  ],
  "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" />