...
Code Block | ||||
---|---|---|---|---|
| ||||
// Request body
{
"course_id": "course-v1:TestX+TestCourse+TestRun",
"topic_id": "df3e1598d8544e04a34dfcfa22313caf",
"type": "discussion",
"title": "Example Thread Title",
"raw_body": "**Example Thread Body**",
}
// Response body
{
"id": "51dfd4e38d9f4f788a0e65c0e9311a55",
"course_id": "course-v1:TestX+TestCourse+TestRun",
"topic_id": "df3e1598d8544e04a34dfcfa22313caf",
"group_id": null,
"group_name": null,
"author": "example-user",
"created_at": "2015-04-09T17:31:56Z",
"modified_at": "2015-04-09T17:31:56Z",
"type": "discussion",
"title": "Example Thread Title",
"raw_body": "**Example Thread Body**",
"rendered_body": "<b>Example Thread Body</b>",
"has_endorsed": false,
"pinned": false,
"closed": false,
"flagged": false,
"voted": false,
"vote_count": 0,
"comment_count": 0,
"unread_comment_count": 0,
"read": true,
"comment_list_url": "https://openedx.example.com/api/discussion/v1/comments/?thread_id=51dfd4e38d9f4f788a0e65c0e9311a55",
"endorsed_comment_list_url": null,
"non_endorsed_comment_list_url": null,
"editable_fields": ["type", "title", "raw_body", "flagged", "voted"],
"response_count": 0
}
|
Anchor | ||||
---|---|---|---|---|
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
// Request body
{"voted": true}
// Response body
{
"id": "51dfd4e38d9f4f788a0e65c0e9311a55",
"course_id": "course-v1:TestX+TestCourse+TestRun",
"topic_id": "df3e1598d8544e04a34dfcfa22313caf",
"group_id": null,
"group_name": null,
"author": "example-user",
"created_at": "2015-04-09T17:31:56Z",
"modified_at": "2015-04-09T17:31:56Z",
"type": "discussion",
"title": "Example Thread Title",
"raw_body": "**Example Thread Body**",
"rendered_body": "<b>Example Thread Body</b>",
"has_endorsed": false,
"pinned": false,
"closed": false,
"flagged": false,
"voted": true,
"vote_count": 43,
"comment_count": 3,
"unread_comment_count": 1,
"read": true,
"comment_list_url": "https://openedx.example.com/api/discussion/v1/comments/?thread_id=51dfd4e38d9f4f788a0e65c0e9311a55",
"endorsed_comment_list_url": null,
"non_endorsed_comment_list_url": null,
"editable_fields": ["flagged", "voted"],
"response_count": 2
} |
Anchor | ||||
---|---|---|---|---|
|
...