v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1310484273.7 KB
courses

Updates 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

patch/v1/courses/{courseId}/announcements/{id}

Path parameters

courseIdstring required

Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.

idstring required

Identifier of the announcement.

Query parameters

updateMaskstring

Mask that identifies which fields on the announcement to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the Announcement object. If a field that does not support empty values is included in the update mask and not set in the Announcement object, an INVALID_ARGUMENT error is returned. The following fields may be specified by teachers: * text * state * scheduled_time

Request body

alternateLinkstring

Absolute link to this announcement in the Classroom web UI. This is only populated if state is PUBLISHED. Read-only.

idstring

Classroom-assigned identifier of this announcement, unique per course. Read-only.

updateTimestring google-datetime

Timestamp of the most recent change to this announcement. Read-only.

courseIdstring

Identifier of the course. Read-only.

creationTimestring google-datetime

Timestamp when this announcement was created. Read-only.

state'ANNOUNCEMENT_STATE_UNSPECIFIED' | 'PUBLISHED' | 'DRAFT' | 'DELETED'

Status of this announcement. If unspecified, the default state is DRAFT.

scheduledTimestring google-datetime

Optional timestamp when this announcement is scheduled to be published.

assigneeMode'ASSIGNEE_MODE_UNSPECIFIED' | 'ALL_STUDENTS' | 'INDIVIDUAL_STUDENTS'

Assignee mode of the announcement. If unspecified, the default value is ALL_STUDENTS.

textstring

Description of this announcement. The text must be a valid UTF-8 string containing no more than 30,000 characters.

creatorUserIdstring

Identifier for the user that created the announcement. Read-only.

Response

Successful response