API for discussion posts from one author?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I'd like to help an instructor gather all of their posts and replies they made in every discussion in their course. This is so they can create a text library and use it for future commenting. Any help would be appreciated.
I figured I'd start smaller and try for one discussion. And then try the entire course. But, I got stuck with one discussion.
I see url:GET|/api/v1/courses/:course_id/discussion_topics/:topic_id/view
shows the full topic per https://canvas.instructure.com/doc/api/discussion_topics.html. But I can't filter it down to one user. I tried
url:GET|/api/v1/courses/:course_id/discussion_topics/:topic_id/view?user_id=xxx
and see no change. I still see other user's messages.
In the meantime, I've shown them how to gather this information through Canvas' user interface and the related ideas in the past years.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It doesn't look like that endpoint supports filtering it to a single user's messages.
However, if you use a script to make the API call, you could then loop over the replies and filter out those that don't match the user id of the user you want. I haven't worked with this endpoint yet, but it looks like you will need to make sure you handle the nested replies within the views carefully to make sure you don't miss replies.