v1

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

Creates a course work material. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to access the requested course, create course work material in the requested course, share a Drive attachment, or for access errors. * INVALID_ARGUMENT if the request is malformed or if more than 20 * materials are provided. * NOT_FOUND if the requested course does not exist. * FAILED_PRECONDITION for the following request error: * AttachmentNotVisible

post/v1/courses/{courseId}/courseWorkMaterials

Path parameters

courseIdstring required

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

Request body

alternateLinkstring

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

state'COURSEWORK_MATERIAL_STATE_UNSPECIFIED' | 'PUBLISHED' | 'DRAFT' | 'DELETED'

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

updateTimestring google-datetime

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

courseIdstring

Identifier of the course. Read-only.

descriptionstring

Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters.

topicIdstring

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

titlestring

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

idstring

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

creationTimestring google-datetime

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

scheduledTimestring google-datetime

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

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

Assignee mode of the course work material. If unspecified, the default value is ALL_STUDENTS.

creatorUserIdstring

Identifier for the user that created the course work material. Read-only.

Response

Successful response