Update Comments are comments made on updates found in the Edge for a given realm
Table of Contents
Fields
Field | Name | Description | Type | Required |
comment | Comment | The comment text | string | yes |
uid | User ID | The ID of the user who created the comment | integer | |
Operations
The operations below are available for the following realms (replace [realm]
with the appropriate realm and ID):
create
Create a comment
Path | POST https://api.schoology.com/v1/[realm]/updates/{update_id}/comments |
Content | An object containing comment fields JSON {
"comment": "This is an awesome topic",
"uid": "23867876"
} XML <body>
<comment>This is an awesome update</comment>
<uid>23867876</uid>
</body>
|
Return | An object containing comment fields JSON {
"id": 3570319,
"uid": 45552,
"comment": "see my comment",
"created": 1388170192,
"parent_id": 0,
"status": 1,
"likes": 0,
"user_like_action": false,
"links": {
"self": "http:\/\/...\/comments\/3570319"
}
} XML <?xml version="1.0" encoding="utf-8" ?>
<result>
<id>3570319</id>
<uid>45552</uid>
<comment>see my comment</comment>
<created>1388170192</created>
<parent_id>0</parent_id>
<status>1</status>
<likes>0</likes>
<user_like_action></user_like_action>
<links>
<self>http://.../comments/3570319</self>
</links>
</result>
|
list
View a list of comments (paged)
Path | GET https://api.schoology.com/v1/[realm]/updates/{update_id}/comments |
Content | none |
Return | A collection of comment objects, each one containing comment fields JSON {
"comment": [
{
"id": 3570319,
"uid": 45552,
"comment": "see my comment",
"created": 1388170192,
"parent_id": 0,
"status": 1,
"likes": 0,
"user_like_action": false,
"links": {
"self": "http:\/\/...\/comments\/3570319"
}
},
{
"id": 3570321,
"uid": 45552,
"comment": "I see your comment",
"created": 1388170340,
"parent_id": 0,
"status": 1,
"likes": 0,
"user_like_action": false,
"links": {
"self": "http:\/\/...\/comments\/3570321"
}
}
]
} XML <?xml version="1.0" encoding="utf-8" ?>
<result>
<comment>
<id>3570319</id>
<uid>45552</uid>
<comment>see my comment</comment>
<created>1388170192</created>
<parent_id>0</parent_id>
<status>1</status>
<likes>0</likes>
<user_like_action></user_like_action>
<links>
<self>http://.../comments/3570319</self>
</links>
</comment>
<comment>
<id>3570321</id>
<uid>45552</uid>
<comment>I see your comment</comment>
<created>1388170340</created>
<parent_id>0</parent_id>
<status>1</status>
<likes>0</likes>
<user_like_action></user_like_action>
<links>
<self>http://.../comments/3570321</self>
</links>
</comment>
</result>
|
view
View a specified comment
Path | GET https://api.schoology.com/v1/[realm]/updates/{update_id}/comments/{id} |
Content | none |
Return | An object containing comment fields JSON {
"id": 3570319,
"uid": 45552,
"comment": "see my comment",
"created": 1388170192,
"parent_id": 0,
"status": 1,
"likes": 0,
"user_like_action": false
} XML <?xml version="1.0" encoding="utf-8" ?>
<result>
<id>3570319</id>
<uid>45552</uid>
<comment>see my comment</comment>
<created>1388170192</created>
<parent_id>0</parent_id>
<status>1</status>
<likes>0</likes>
<user_like_action></user_like_action>
</result>
|
delete
Delete a comment (cannot be undone)
Path | DELETE https://api.schoology.com/v1/[realm]/updates/{update_id}/comments/{id} |
Content | none |
Return | none |