Announcements
Last updated
Last updated
Copyright © 2024 Instructure, Inc. All rights reserved.
API for retrieving announcements. This API is Announcement-specific. See also the Discussion Topics API, which operates on Announcements also.
AnnouncementsApiController#index
GET /api/v1/announcements
Scope: url:GET|/api/v1/announcements
Returns the paginated list of announcements for the given courses and date range. Note that a context_code
field is added to the responses so you can tell which course each announcement belongs to.
Parameter | Type | Description |
---|---|---|
Returns a list of DiscussionTopic objects.
© Instructure, Inc. Generated on Wed Nov 6 14:20:05 2024 This documentation is generated directly from the Canvas LMS source code, available on Github.
context_codes[]
Required string
List of context_codes to retrieve announcements for (for example, course_123
). Only courses are presently supported. The call will fail unless the caller has View Announcements permission in all listed courses.
start_date
Date
Only return announcements posted since the start_date (inclusive). Defaults to 14 days ago. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ.
end_date
Date
Only return announcements posted before the end_date (inclusive). Defaults to 28 days from start_date. The value should be formatted as: yyyy-mm-dd or ISO 8601 YYYY-MM-DDTHH:MM:SSZ. Announcements scheduled for future posting will only be returned to course administrators.
active_only
boolean
Only return active announcements that have been published. Applies only to requesting users that have permission to view unpublished items. Defaults to false for users with access to view unpublished items, otherwise true and unmodifiable.
latest_only
boolean
Only return the latest announcement for each associated context. The response will include at most one announcement for each specified context in the context_codes[] parameter. Defaults to false.
include
array
Optional list of resources to include with the response. May include a string of the name of the resource. Possible values are: “sections”, “sections_user_count” if “sections” is passed, includes the course sections that are associated with the topic, if the topic is specific to certain sections of the course. If “sections_user_count” is passed, then: