v1

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

Updates one or more fields of a course work. See google.classroom.v1.CourseWork for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the OAuth client ID used to create the corresponding course work item. This method returns the following error codes: * PERMISSION_DENIED if the requesting developer project did not create the corresponding course work, if the user is not permitted to make the requested modification to the student submission, or for access errors. * INVALID_ARGUMENT if the request is malformed. * FAILED_PRECONDITION if the requested course work has already been deleted. * NOT_FOUND if the requested course or course work does not exist.

patch/v1/courses/{courseId}/courseWork/{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 course work.

Query parameters

updateMaskstring

Mask that identifies which fields on the course work 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 CourseWork object. If a field that does not support empty values is included in the update mask and not set in the CourseWork object, an INVALID_ARGUMENT error is returned. The following fields may be specified by teachers: * title * description * state * due_date * due_time * max_points * scheduled_time * submission_modification_mode * topic_id * grading_period_id

Request body

workType'COURSE_WORK_TYPE_UNSPECIFIED' | 'ASSIGNMENT' | 'SHORT_ANSWER_QUESTION' | 'MULTIPLE_CHOICE_QUESTION'

Type of this course work. The type is set when the course work is created and cannot be changed.

scheduledTimestring google-datetime

Optional timestamp when this course work is scheduled to be published.

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

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

creatorUserIdstring

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

titlestring

Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters.

idstring

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

creationTimestring google-datetime

Timestamp when this course work was created. Read-only.

submissionModificationMode'SUBMISSION_MODIFICATION_MODE_UNSPECIFIED' | 'MODIFIABLE_UNTIL_TURNED_IN' | 'MODIFIABLE'

Setting to determine when students are allowed to modify submissions. If unspecified, the default value is MODIFIABLE_UNTIL_TURNED_IN.

descriptionstring

Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters.

gradingPeriodIdstring

Identifier of the grading period associated with the coursework. * At creation, if unspecified, the grading period ID will be set based on the dueDate (or scheduledTime if no dueDate is set). * To indicate no association to any grading period, set this field to an empty string (""). * If specified, it must match an existing grading period ID in the course.

topicIdstring

Identifier for the topic that this coursework is associated with. Must match an existing topic in the course.

maxPointsnumber double

Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value.

alternateLinkstring

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

state'COURSE_WORK_STATE_UNSPECIFIED' | 'PUBLISHED' | 'DRAFT' | 'DELETED'

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

associatedWithDeveloperboolean

Whether this course work item is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only.

updateTimestring google-datetime

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

courseIdstring

Identifier of the course. Read-only.

Response

Successful response