Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MethodDescriptionAccess
GET

Retrieve

the comment. No parameters.Any role, subject to thread group restriction

a list of child comments for a response

Query Parameters:

  • page_size (Integer, must be positive): Number of comments per page
  • page (Integer, must be non-negative): Page number to retrieve
Any role; comments will only be returned if thread group restriction allows
PATCHModify the comment. Parameters as per editability noted in model.Author or privileged role, subject to thread group restriction, thread closure, and blackouts
DELETEDelete the comment. No parameters.Author or privileged role

...

Code Block
languagejs
titleGET /api/discussion/v1/comments/5fe452161cc049dfb3e124c41732beaf/
[
	{
  		"id": "5fe452161cc049dfb3e124c41732beaf",
  		"parent_id": null"6w3452161cc049dfb3e124c41732bead",
  		"thread_id": "51dfd4e38d9f4f788a0e65c0e9311a55",
  		"author": "example-user",
  		"created_at": "2015-04-09T17:31:56Z",
  		"modified_at": "2015-04-10T14:24:43Z",
  		"raw_body": "**Example Comment Body**",
  		"rendered_body": "<b>Example Comment Body</b>",
  		"endorsed": truefalse,
  		"endorsed_by": "example-moderatornull,
  		"endorsed_at": null,
  		"flagged": false,
  		"voted": false,
  		"vote_count": 0,
  		"children": [],
  		"editable_fields": ["flagged", "voted"]
	},
	{
  		"id": "1w33erf67yh8kf3sf45km11k0987hj2n",
  		"parent_id": "6w3452161cc049dfb3e124c41732bead",
  		"thread_id": "51dfd4e38d9f4f788a0e65c0e9311a55",
  		"author": "example-user",
  		"created_at": "2015-04-09T17:31:56Z",
  		"modified_at": "2015-04-10T14:24:43Z",
  		"raw_body": "**Example Another Comment Body**",
  		"endorsedrendered_atbody": "<b>Example Another Comment "2015-04-10T14:24:43Z"Body</b>",
  		"endorsed": false,
  		"endorsed_by": null,
  		"endorsed_at": null,
  		"flagged": false,
  		"voted": false,
  		"vote_count": 180,
  		"children": [],
  		"editable_fields": ["flagged", "voted"]
	}
]
Code Block
languagejs
titlePATCH /api/discussion/v1/comments/5fe452161cc049dfb3e124c41732beaf/
// Request body
 
{"voted": true}
 
// Response body
 
{
  "id": "5fe452161cc049dfb3e124c41732beaf",
  "parent_id": null,
  "thread_id": "51dfd4e38d9f4f788a0e65c0e9311a55",
  "author": "example-user",
  "created_at": "2015-04-09T17:31:56Z",
  "modified_at": "2015-04-10T14:24:43Z",
  "raw_body": "**Example Comment Body**",
  "rendered_body": "<b>Example Comment Body</b>",
  "endorsed": true,
  "endorsed_by": "example-moderator",
  "endorsed_at": "2015-04-10T14:24:43Z",
  "flagged": false,
  "voted": true,
  "vote_count": 19,
  "children": [],
  "editable_fields": ["flagged", "voted"]
}