courses

PUT /v1/courses/{id}

Changed on

Updates a course. Note: Unlike other fields, levels is not cleared if omitted from the request. The UpdateCourse method only modifies levels if it is explicitly provided; otherwise, the existing value is preserved. Use the PatchCourse method to clear the levels field. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to modify the requested course or for access errors. * NOT_FOUND if no course exists with the requested ID. * FAILED_PRECONDITION for the following request errors: * CourseNotModifiable * CourseTitleCannotContainUrl

Request

  • Base URL
    https://classroom.googleapis.com
  • URL
    https://classroom.googleapis.com/v1/courses/{id}
  • Auth
    OAuth 2 and OAuth 2
    Implicit: https://accounts.google.com/o/oauth2/auth
    Scopes: https://www.googleapis.com/auth/classroom.courses
    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.courses

Path parameters

idstring required

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

Request body

alternateLinkstring

Absolute link to this course in the Classroom web UI. Read-only.

calendarIdstring

The Calendar ID for a calendar that all course members can see, to which Classroom adds events for course work and announcements in the course. The Calendar for a course is created asynchronously when the course is set to CourseState.ACTIVE for the first time (at creation time or when it is updated to ACTIVE through the UI or the API). The Calendar ID will not be populated until the creation process is completed. Read-only.

courseGroupEmailstring

The email address of a Google group containing all members of the course. This group does not accept email and can only be used for permissions. Read-only.

courseState'COURSE_STATE_UNSPECIFIED' | 'ACTIVE' | 'ARCHIVED' | 'PROVISIONED' | 'DECLINED' | 'SUSPENDED'

State of the course. If unspecified, the default state is PROVISIONED.

creationTimestring google-datetime

Creation time of the course. Specifying this field in a course update mask results in an error. Read-only.

descriptionstring

Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters.

descriptionHeadingstring

Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters.

enrollmentCodestring

Enrollment code to use when joining this course. Specifying this field in a course update mask results in an error. Read-only.

guardiansEnabledboolean

Whether or not guardian notifications are enabled for this course. Read-only.

idstring

Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The id is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask results in an error.

levelsstring

Optional. Levels for the course. Examples: "9th grade", "Middle school", "4th - 5th", "K-2", "3000". If set, this field must be a valid UTF-8 string and fewer than 1000 characters. This field can only be cleared using the PatchCourse method.

namestring

Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string.

ownerIdstring

The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal "me", indicating the requesting user This must be set in a create request. Admins can also specify this field in a patch course request to transfer ownership. In other contexts, it is read-only.

roomstring

Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters.

sectionstring

Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters.

subjectstring

Optional. The subject of the course.

teacherGroupEmailstring

The email address of a Google group containing all teachers of the course. This group does not accept email and can only be used for permissions. Read-only.

updateTimestring google-datetime

Time of the most recent update to this course. Specifying this field in a course update mask results in an error. Read-only.

Response

Successful response

alternateLinkstring

Absolute link to this course in the Classroom web UI. Read-only.

calendarIdstring

The Calendar ID for a calendar that all course members can see, to which Classroom adds events for course work and announcements in the course. The Calendar for a course is created asynchronously when the course is set to CourseState.ACTIVE for the first time (at creation time or when it is updated to ACTIVE through the UI or the API). The Calendar ID will not be populated until the creation process is completed. Read-only.

courseGroupEmailstring

The email address of a Google group containing all members of the course. This group does not accept email and can only be used for permissions. Read-only.

courseState'COURSE_STATE_UNSPECIFIED' | 'ACTIVE' | 'ARCHIVED' | 'PROVISIONED' | 'DECLINED' | 'SUSPENDED'

State of the course. If unspecified, the default state is PROVISIONED.

creationTimestring google-datetime

Creation time of the course. Specifying this field in a course update mask results in an error. Read-only.

descriptionstring

Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters.

descriptionHeadingstring

Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters.

enrollmentCodestring

Enrollment code to use when joining this course. Specifying this field in a course update mask results in an error. Read-only.

guardiansEnabledboolean

Whether or not guardian notifications are enabled for this course. Read-only.

idstring

Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The id is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask results in an error.

levelsstring

Optional. Levels for the course. Examples: "9th grade", "Middle school", "4th - 5th", "K-2", "3000". If set, this field must be a valid UTF-8 string and fewer than 1000 characters. This field can only be cleared using the PatchCourse method.

namestring

Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string.

ownerIdstring

The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal "me", indicating the requesting user This must be set in a create request. Admins can also specify this field in a patch course request to transfer ownership. In other contexts, it is read-only.

roomstring

Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters.

sectionstring

Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters.

subjectstring

Optional. The subject of the course.

teacherGroupEmailstring

The email address of a Google group containing all teachers of the course. This group does not accept email and can only be used for permissions. Read-only.

updateTimestring google-datetime

Time of the most recent update to this course. Specifying this field in a course update mask results in an error. Read-only.

Changes

    • breaking

      removed the request body

    • breaking

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