v1

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

Updates an add-on attachment. Requires the add-on to have been the original creator of the attachment. 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}/posts/{postId}/addOnAttachments/{attachmentId}

Path parameters

courseIdstring required

Required. Identifier of the course.

postIdstring required

Required. Identifier of the post under which the attachment is attached.

attachmentIdstring required

Required. Identifier of the attachment.

Query parameters

itemIdstring

Identifier of the post under which the attachment is attached.

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 AddOnAttachment object. If a field that does not support empty values is included in the update mask and not set in the AddOnAttachment object, an INVALID_ARGUMENT error is returned. The following fields may be specified by teachers: * title * teacher_view_uri * student_view_uri * student_work_review_uri * due_date * due_time * max_points

Request body

titlestring

Required. Title of this attachment. The title must be between 1 and 1000 characters.

courseIdstring

Immutable. Identifier of the course.

idstring

Immutable. Classroom-assigned identifier for this attachment, unique per post.

postIdstring

Immutable. Deprecated, use item_id instead.

itemIdstring

Immutable. Identifier of the Announcement, CourseWork, or CourseWorkMaterial under which the attachment is attached. Unique per course.

maxPointsnumber double

Maximum grade for this attachment. Can only be set if studentWorkReviewUri is set. Set to a non-zero value to indicate that the attachment supports grade passback. If set, this must be a non-negative integer value. When set to zero, the attachment will not support grade passback.

Response

Successful response