Skip to content

Discussion Reply

Replies are comments made to discussion threads.

Field Name Description Type
uid User Id The Schoology user id of the user who created the comment. integer
comment* Comment The comment/reply text. string
created Created timestamp The Unix timestamp when the comment was created. integer
parent_id Parent Id If this comment is in reply to another comment, specify it here. To reply to the discussion thread instead of a specific comment, set the parent to 0. integer
status Comment status Whether or not the comment was deleted. Only available for course admins with manage discussion permission. integer

* = Required

GET {realm}/discussions/{post id}/comments

Section titled “GET {realm}/discussions/{post id}/comments”

View a list of comments (paged)

Return A list of comments

{
"comment": [
{
"id": 3570315,
"uid": 45552,
"comment": "SOAP vs REST",
"created": 1388169292,
"parent_id": 0,
"status": 1,
"likes": 0,
"user_like_action": false,
"links": {
"self": "http:\/\/...\/comments\/3570315"
}
},
{
"id": 3570317,
"uid": 45552,
"comment": "RESTful vs SOAP",
"created": 1388169354,
"parent_id": 0,
"status": 1,
"likes": 0,
"user_like_action": false,
"links": {
"self": "http:\/\/...\/comments\/3570317"
}
}
]
}

GET {realm}/discussions/{post id}/comments/{id}

Section titled “GET {realm}/discussions/{post id}/comments/{id}”

View a specified comment

Return A comment

{
"id": 3570315,
"uid": 45552,
"comment": "SOAP vs REST",
"created": 1388169292,
"parent_id": 0,
"status": 1,
"likes": 0,
"user_like_action": false
}

POST {realm}/discussions/{post id}/comments

Section titled “POST {realm}/discussions/{post id}/comments”

Create a comment

Content An object containing discussion reply fields

{
"uid": "23867876",
"comment": "This is an awesome topic"
}

Return An object containing discussion reply fields

{
"id": 3570315,
"uid": 45552,
"comment": "SOAP vs REST",
"created": 1388169292,
"parent_id": 0,
"status": 1,
"likes": 0,
"user_like_action": false,
"links": {
"self": "http:\/\/...\/discussions\/5692161\/comments\/"
}
}

DELETE {realm}/discussions/{post id}/comments/{id}

Section titled “DELETE {realm}/discussions/{post id}/comments/{id}”

Delete a comment (cannot be undone)