REST Resource: courses.courseWorkMaterials.addOnAttachments

Resource: AddOnAttachment

An add-on attachment on a post.

JSON representation
{
  "courseId": string,
  "postId": string,
  "itemId": string,
  "id": string,
  "title": string,
  "teacherViewUri": {
    object (EmbedUri)
  },
  "studentViewUri": {
    object (EmbedUri)
  },
  "studentWorkReviewUri": {
    object (EmbedUri)
  },
  "dueDate": {
    object (Date)
  },
  "dueTime": {
    object (TimeOfDay)
  },
  "maxPoints": number,
  "copyHistory": [
    {
      object (CopyHistory)
    }
  ]
}
Fields
courseId

string

Immutable. Identifier of the course.

postId
(deprecated)

string

Immutable. Deprecated, use itemId instead.

itemId

string

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

id

string

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

title

string

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

teacherViewUri

object (EmbedUri)

Required. URI to show the teacher view of the attachment. The URI will be opened in an iframe with the courseId, itemId, itemType, and attachmentId query parameters set.

studentViewUri

object (EmbedUri)

Required. URI to show the student view of the attachment. The URI will be opened in an iframe with the courseId, itemId, itemType, and attachmentId query parameters set.

studentWorkReviewUri

object (EmbedUri)

URI for the teacher to see student work on the attachment, if applicable. The URI will be opened in an iframe with the courseId, itemId, itemType, attachmentId, and submissionId query parameters set. This is the same submissionId returned in the AddOnContext.studentContext field when a student views the attachment. If the URI is omitted or removed, maxPoints will also be discarded.

dueDate

object (Date)

Date, in UTC, that work on this attachment is due. This must be specified if dueTime is specified.

dueTime

object (TimeOfDay)

Time of day, in UTC, that work on this attachment is due. This must be specified if dueDate is specified.

maxPoints

number

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.

copyHistory[]

object (CopyHistory)

Output only. Identifiers of attachments that were previous copies of this attachment.

If the attachment was previously copied by virtue of its parent post being copied, this enumerates the identifiers of attachments that were its previous copies in ascending chronological order of copy.

Methods

create

Creates an add-on attachment under a post.

delete

Deletes an add-on attachment.

get

Returns an add-on attachment.

list

Returns all attachments created by an add-on under the post.

patch

Updates an add-on attachment.