GET /api/discussions/{DiscussionID}/comments

Returns the comments associated with a specified discussion.

Authorization Roles/Permissions: This operation applies to all users.

This topic includes the following sections:

HTTP Method


Back to top



Back to top

Sample Request

The example below shows a request for the comments on the specified discussion.

Request URL


Sample request headers

Accept: application/json

Sample request body


Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
DiscussionID Path string Required The unique ID for a specific discussion.
UserID Query string Required

The unique ID for a specific user.

ID of the user retrieving the comment.

start Query integer Optional The starting point for the comments to be returned, with 0 as the first comment. For example, if there are 73 comments and the start value is 50, comment number 50 is the first to be returned.
count Query integer Optional The number of comments to be returned, from the specified starting point. If not specified, all comments associated with the specified discussion are returned. For example, if there are 105 comments and start is 50 with count 50, comments 50-100 are returned.

Back to top


If successful, this operation returns HTTP status code 200, with the discussion comments in the form of a JSON object.

Back to top

Sample Response

The sample response below shows successful completion of this operation. Three results were returned.

Sample response headers

Status Code: 200 OK
Content-Type: application/json
Date: Mon, 22 Jul 2013 22:01:55 GMT

Sample response body

  "totalResults" : 3,
  "startIndex" : 0,
  "Comment" : [ {
    "CommentID" : "comment25801.acmepaymentscorp",
    "CommentSubjectID" : "discussion25800.acmepaymentscorp",
    "Content" : "Support for French would be my first choice.",
    "Created" : "2013-07-22T21:52:01Z",
    "Marks" : 3,
    "IsMarked" : true,
    "UserID" : "2d0bc425-49ec-4c04-b272-cc8f6f20e52b.acmepaymentscorp",
    "UserName" : "PhilipPirrip",
    "AvatarURL" : ""
  }, {
    "CommentID" : "comment25802.acmepaymentscorp",
    "CommentSubjectID" : "discussion25800.acmepaymentscorp",
    "Content" : "Just more of the same; what you have is great but we need more!",
    "Created" : "2013-07-22T21:52:44Z",
    "Marks" : 3,
    "IsMarked" : false,
    "UserID" : "957482b9-ck7f-0gk5-ae07-9flgok5djtus.acmepaymentscorp",
    "UserName" : "JonathanSwift",
    "AvatarURL" : ""
  }, {
    "CommentID" : "comment25803.acmepaymentscorp",
    "CommentSubjectID" : "discussion25800.acmepaymentscorp",
    "Content" : "Bug fix: if I don't close out, when the app times out it hangs my device.",
    "Created" : "2013-07-22T21:53:55Z",
    "Marks" : 2,
    "IsMarked" : false,
    "UserID" : "d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp",
    "UserName" : "JenniferMeadows",
    "AvatarURL" : ""
  } ]

Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json

Back to top

Response Body

Name Type Description
Comments Comments Contains information about one or more comments on a Board item.

Back to top

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
204 No content. You would get this response if there are no comments on the specified ticket.
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics