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": "d1188b0f-9882-49a9-96ad-ef481b39c398", "CommentBody": "sample string 2", "CommentAuthor": { "LinkToProfile": "sample string 1", "PictureUrl": "sample string 2", "ContactKey": "7836fe33-9e01-4956-a14d-57d42c57aeee", "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-09-08T01:02:06.8439328Z", "UpdatedByContactKey": "4cef2f8f-ee7d-49be-bd60-d17503181304", "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-09-08T01:02:06.8439328Z" }, "IsOfficial": true, "ItemKey": "566c30d6-ea29-4ecd-894f-acf3d3c8ef53", "CreatedOn": "2024-09-08T01:02:06.8439328Z", "UpdatedOn": "2024-09-08T01:02:06.8439328Z" }, { "CommentKey": "d1188b0f-9882-49a9-96ad-ef481b39c398", "CommentBody": "sample string 2", "CommentAuthor": { "LinkToProfile": "sample string 1", "PictureUrl": "sample string 2", "ContactKey": "7836fe33-9e01-4956-a14d-57d42c57aeee", "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-09-08T01:02:06.8439328Z", "UpdatedByContactKey": "4cef2f8f-ee7d-49be-bd60-d17503181304", "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-09-08T01:02:06.8439328Z" }, "IsOfficial": true, "ItemKey": "566c30d6-ea29-4ecd-894f-acf3d3c8ef53", "CreatedOn": "2024-09-08T01:02:06.8439328Z", "UpdatedOn": "2024-09-08T01:02:06.8439328Z" } ], "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" />