courses

PATCH /v1/courses/{courseId}/courseWorkMaterials/{id}

Changed on

Updates one or more fields of a course work material. This method returns the following error codes: * PERMISSION_DENIED if the requesting developer project for access errors. * INVALID_ARGUMENT if the request is malformed. * FAILED_PRECONDITION if the requested course work material has already been deleted. * NOT_FOUND if the requested course or course work material does not exist

Request

  • Base URL
    https://classroom.googleapis.com
  • URL
    https://classroom.googleapis.com/v1/courses/{courseId}/courseWorkMaterials/{id}
  • Auth
    OAuth 2 and OAuth 2
    Implicit: https://accounts.google.com/o/oauth2/auth
    Scopes: https://www.googleapis.com/auth/classroom.courseworkmaterials
    Authorization code: https://accounts.google.com/o/oauth2/auth
    Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/classroom.courseworkmaterials

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 material.

Query parameters

updateMaskstring google-fieldmask

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

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.

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

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

courseIdstring

Identifier of the course. Read-only.

creationTimestring google-datetime

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

creatorUserIdstring

Identifier for the user that created the course work material. 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.

idstring

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

scheduledTimestring google-datetime

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

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

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

titlestring

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

topicIdstring

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

updateTimestring google-datetime

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

Response

Successful response

alternateLinkstring

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

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

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

courseIdstring

Identifier of the course. Read-only.

creationTimestring google-datetime

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

creatorUserIdstring

Identifier for the user that created the course work material. 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.

idstring

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

scheduledTimestring google-datetime

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

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

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

titlestring

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

topicIdstring

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

updateTimestring google-datetime

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

Changes

    • breaking

      removed the request body

    • breaking

      removed the media type */* for the response with the status