v1

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

Updates data associated with an add-on attachment submission. Requires the add-on to have been the original creator of the attachment and the attachment to have a positive max_points value set. This method returns the following error codes: * PERMISSION_DENIED for access errors. * INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if one of the identified resources does not exist.

patch/v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments/{attachmentId}/studentSubmissions/{submissionId}

Path parameters

courseIdstring required

Required. Identifier of the course.

itemIdstring required

Identifier of the Announcement, CourseWork, or CourseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.

attachmentIdstring required

Required. Identifier of the attachment.

submissionIdstring required

Required. Identifier of the student's submission.

Query parameters

postIdstring

Optional. Deprecated, use item_id instead.

updateMaskstring

Required. Mask that identifies which fields on the attachment to 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 AddOnAttachmentStudentSubmission object. The following fields may be specified by teachers: * points_earned

Request body

postSubmissionState'SUBMISSION_STATE_UNSPECIFIED' | 'NEW' | 'CREATED' | 'TURNED_IN' | 'RETURNED' | 'RECLAIMED_BY_STUDENT'

Submission state of add-on attachment's parent post (i.e. assignment).

userIdstring

Identifier for the student that owns this submission. Requires the user to be a teacher in the course and have permission to read student submissions. See courseWork.studentSubmissions.get for the list of acceptable OAuth scopes for this field. Read-only.

idstring

Output only. Classroom-assigned identifier for this student submission. This is unique among submissions for the relevant course work and add-on attachment combination.

pointsEarnednumber double

Student grade on this attachment. If unset, no grade was set.

courseWorkSubmissionIdstring

Output only. Identifier of the course work submission under which this attachment submission was made.

Response

Successful response