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
Name | Description | Type | Additional 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
PaginatedCommentsName | Description | Type | Additional 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
{ "Comments": [ { "CommentKey": "be3e2f67-1946-430d-9779-0e10b116d309", "CommentBody": "sample string 2", "CommentAuthor": { "LinkToProfile": "sample string 1", "PictureUrl": "sample string 2", "ContactKey": "9e01a445-1d32-4692-9317-955cb6f52d89", "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-26T13:09:22.6752561Z", "UpdatedByContactKey": "b5172301-988c-46df-8809-b5fea33c11dc", "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-26T13:09:22.6752561Z" }, "IsOfficial": true, "ItemKey": "9e5abd67-c268-4d21-9494-69ab1171528a", "CreatedOn": "2024-12-26T13:09:22.6752561Z", "UpdatedOn": "2024-12-26T13:09:22.6752561Z" }, { "CommentKey": "be3e2f67-1946-430d-9779-0e10b116d309", "CommentBody": "sample string 2", "CommentAuthor": { "LinkToProfile": "sample string 1", "PictureUrl": "sample string 2", "ContactKey": "9e01a445-1d32-4692-9317-955cb6f52d89", "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-26T13:09:22.6752561Z", "UpdatedByContactKey": "b5172301-988c-46df-8809-b5fea33c11dc", "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-26T13:09:22.6752561Z" }, "IsOfficial": true, "ItemKey": "9e5abd67-c268-4d21-9494-69ab1171528a", "CreatedOn": "2024-12-26T13:09:22.6752561Z", "UpdatedOn": "2024-12-26T13:09:22.6752561Z" } ], "HasMoreComments": true, "Next": "sample string 2", "Previous": "sample string 3" }
application/xml, text/xml
<PaginatedComments xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise.Comments" />