• Document Up to Date
  • Updated On 4.0.0

Get Thread Comments

Returns all comments from the given thread.

Resource Information

This service uses the tomcat application on port 8080 by default.

The context for this API is /crafter-social, please prefix the API URLs with this context.

HTTP Verb
GET
URL
/api/3/threads/:id/comments
Response Formats
JSON

Parameters

Name
Type
Required
Description
context
String
The ID of the Social Context
id
String
The ID of the thread
recursive
Integer

Levels of comments to return
pageNumber
Integer

Page number to return
pageSize
Integer

Comments per page
childrenCount
Integer

Amount of children to return
sortBy
List

List of fields to order by
sortOrder
List

List of sort orders for each field

Example

Request

GET .../api/3/threads/Welcome/comments?context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9

Response

Status 200 OK

 1{
 2  "total": 1,
 3  "pageSize": 666,
 4  "pageNumber": 0,
 5  "watched": false,
 6  "comments": [
 7    {
 8      "ancestors": [],
 9      "targetId": "Welcome",
10      "subject": "",
11      "body": "This was the first comment in the site!",
12      "createdBy": "59667e8abd4787992596ba6b",
13      "lastModifiedBy": "59667e8abd4787992596ba6b",
14      "createdDate": "2017-07-13T09:09Z",
15      "lastModifiedDate": "2017-07-13T11:06Z",
16      "anonymousFlag": false,
17      "attributes": {},
18      "children": [],
19      "attachments": [
20        {
21          "md5": "c86b6b1607621afff04b6a9b9048e87b",
22          "fileId": "5967c9dd300426156e21df53",
23          "contentType": "image/png",
24          "fileSize": "144.5 KB",
25          "storeName": "/f5b143c2-f1c0-4a10-b56e-f485f00d3fe9/59678d3f300426156e21df50/person1.png",
26          "fileName": "person1.png",
27          "savedDate": "2017-07-13T13:28Z",
28          "fileSizeBytes": 147970,
29          "attributes": {
30            "owner": "59678d3f300426156e21df50"
31          }
32        }
33      ],
34      "moderationStatus": "UNMODERATED",
35      "votesUp": [],
36      "votesDown": [],
37      "flags": [],
38      "_id": "59678d3f300426156e21df50"
39    }
40  ]
41}

Responses

Status
Location
Response Body
200

See example above.
401

{ "message" : "User must be logged in" }
403







{ "message" : "Current subject does not have
permission to execute global action ..." }
500

{ "message" : "Internal server error" }