Skip to main content

announcements

Overview

Nameannouncements
TypeResource
Idgoogleworkspace.classroom.announcements

Fields

NameDatatypeDescription
idstringClassroom-assigned identifier of this announcement, unique per course. Read-only.
updateTimestringTimestamp of the most recent change to this announcement. Read-only.
assigneeModestringAssignee mode of the announcement. If unspecified, the default value is ALL_STUDENTS.
materialsarrayAdditional materials. Announcements must have no more than 20 material items.
statestringStatus of this announcement. If unspecified, the default state is DRAFT.
textstringDescription of this announcement. The text must be a valid UTF-8 string containing no more than 30,000 characters.
courseIdstringIdentifier of the course. Read-only.
individualStudentsOptionsobjectAssignee details about a coursework/announcement. This field is set if and only if assigneeMode is INDIVIDUAL_STUDENTS.
scheduledTimestringOptional timestamp when this announcement is scheduled to be published.
alternateLinkstringAbsolute link to this announcement in the Classroom web UI. This is only populated if state is PUBLISHED. Read-only.
creationTimestringTimestamp when this announcement was created. Read-only.
creatorUserIdstringIdentifier for the user that created the announcement. Read-only.

Methods

NameAccessible byRequired ParamsDescription
courses_announcements_getSELECTcourseId, idReturns an announcement. This method returns the following error codes: PERMISSION_DENIED if the requesting user is not permitted to access the requested course or announcement, or for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if the requested course or announcement does not exist.
courses_announcements_listSELECTcourseIdReturns a list of announcements that the requester is permitted to view. Course students may only view PUBLISHED announcements. Course teachers and domain administrators may view all announcements. This method returns the following error codes: PERMISSION_DENIED if the requesting user is not permitted to access the requested course or for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if the requested course does not exist.
courses_announcements_createINSERTcourseIdCreates an announcement. This method returns the following error codes: PERMISSION_DENIED if the requesting user is not permitted to access the requested course, create announcements in the requested course, share a Drive attachment, or for access errors. INVALID_ARGUMENT if the request is malformed. NOT_FOUND if the requested course does not exist. FAILED_PRECONDITION for the following request error: * AttachmentNotVisible
courses_announcements_deleteDELETEcourseId, idDeletes an announcement. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding announcement item. This method returns the following error codes: PERMISSION_DENIED if the requesting developer project did not create the corresponding announcement, if the requesting user is not permitted to delete the requested course or for access errors. FAILED_PRECONDITION if the requested announcement has already been deleted. * NOT_FOUND if no course exists with the requested ID.
courses_announcements_modifyAssigneesEXECcourseId, idModifies assignee mode and options of an announcement. Only a teacher of the course that contains the announcement may call this method. This method returns the following error codes: PERMISSION_DENIED if the requesting user is not permitted to access the requested course or course work or for access errors. INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if the requested course or course work does not exist.
courses_announcements_patchEXECcourseId, idUpdates one or more fields of an announcement. This method returns the following error codes: PERMISSION_DENIED if the requesting developer project did not create the corresponding announcement or for access errors. INVALID_ARGUMENT if the request is malformed. FAILED_PRECONDITION if the requested announcement has already been deleted. NOT_FOUND if the requested course or announcement does not exist