Announcements API not getting all announcements?

Jump to solution
DavidSchell
Community Member

Hello everyone! I am trying to pull all announcements for a course via the announcement api, but I cannot get it to pull anything besides the last three. Even if I set the page_per high, I only get the last three. Here are two iterations of my api call: 

api/v1/announcements?context_codes=course_[XXX]&page=1&page_per=100

api/v1/announcements?context_codes=course_[XXX]&page_per=100

I feel like this has something to do with the required context_codes parameter, but I was wondering if anyone else has experienced this/found a solution before I dig further. 

Thank you!

Regards,

John  

0 Likes
1 Solution
JamesSekcienski
Community Coach
Community Coach

To get course-level announcements, I generally use the List discussion topics endpoint with the query parameter "only_announcements" set equal to true.

View solution in original post