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):
Realm | Path |
---|---|
User | users/{id}
|
Course Sections | sections/{id}
|
Groups | groups/{id}
|
create
Create a comment
Path |
|
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 |
|
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 |
|
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 |
|
Content |
none |
Return |
none |