Are your users using Classroom with Google Meet? Check out the Apps Script quickstart covering how to check student attendance in Google Meet courses.

REST Resource: courses

Resource: Course

A Course in Classroom.

JSON representation
{
  "id": string,
  "name": string,
  "section": string,
  "descriptionHeading": string,
  "description": string,
  "room": string,
  "ownerId": string,
  "creationTime": string,
  "updateTime": string,
  "enrollmentCode": string,
  "courseState": enum (CourseState),
  "alternateLink": string,
  "teacherGroupEmail": string,
  "courseGroupEmail": string,
  "teacherFolder": {
    object (DriveFolder)
  },
  "courseMaterialSets": [
    {
      object (CourseMaterialSet)
    }
  ],
  "guardiansEnabled": boolean,
  "calendarId": string,
  "gradebookSettings": {
    object (GradebookSettings)
  }
}
Fields
id

string

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.

name

string

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.

section

string

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.

descriptionHeading

string

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.

description

string

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.

room

string

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

ownerId

string

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.

creationTime

string (Timestamp format)

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

Read-only.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

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

Read-only.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

enrollmentCode

string

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

Read-only.

courseState

enum (CourseState)

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

teacherGroupEmail

string

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.

courseGroupEmail

string

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.

teacherFolder

object (DriveFolder)

Information about a Drive Folder that is shared with all teachers of the course.

This field will only be set for teachers of the course and domain administrators.

Read-only.

courseMaterialSets[]
(deprecated)

object (CourseMaterialSet)

Sets of materials that appear on the "about" page of this course.

Read-only.

guardiansEnabled

boolean

Whether or not guardian notifications are enabled for this course.

Read-only.

calendarId

string

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.

Read-only.

gradebookSettings

object (GradebookSettings)

The gradebook settings that specify how a student's overall grade for the course will be calculated and who it will be displayed to.

Read-only

CourseState

Possible states a course can be in.

Enums
COURSE_STATE_UNSPECIFIED No course state. No returned Course message will use this value.
ACTIVE The course is active.
ARCHIVED The course has been archived. You cannot modify it except to change it to a different state.
PROVISIONED The course has been created, but not yet activated. It is accessible by the primary teacher and domain administrators, who may modify it or change it to the ACTIVE or DECLINED states. A course may only be changed to PROVISIONED if it is in the DECLINED state.
DECLINED The course has been created, but declined. It is accessible by the course owner and domain administrators, though it will not be displayed in the web UI. You cannot modify the course except to change it to the PROVISIONED state. A course may only be changed to DECLINED if it is in the PROVISIONED state.
SUSPENDED The course has been suspended. You cannot modify the course, and only the user identified by the ownerId can view the course. A course may be placed in this state if it potentially violates the Terms of Service.

CourseMaterialSet

A set of materials that appears on the "About" page of the course. These materials might include a syllabus, schedule, or other background information relating to the course as a whole.

JSON representation
{
  "title": string,
  "materials": [
    {
      object (CourseMaterial)
    }
  ]
}
Fields
title

string

Title for this set.

materials[]

object (CourseMaterial)

Materials attached to this set.

CourseMaterial

A material attached to a course as part of a material set.

JSON representation
{

  // Union field material can be only one of the following:
  "driveFile": {
    object (DriveFile)
  },
  "youTubeVideo": {
    object (YouTubeVideo)
  },
  "link": {
    object (Link)
  },
  "form": {
    object (Form)
  }
  // End of list of possible types for union field material.
}
Fields
Union field material. Material data. material can be only one of the following:
driveFile

object (DriveFile)

Google Drive file attachment.

youTubeVideo

object (YouTubeVideo)

Youtube video attachment.

form

object (Form)

Google Forms attachment.

GradebookSettings

The gradebook settings for a course. See the help center article for details.

JSON representation
{
  "calculationType": enum (CalculationType),
  "displaySetting": enum (DisplaySetting),
  "gradeCategories": [
    {
      object (GradeCategory)
    }
  ]
}
Fields
calculationType

enum (CalculationType)

Indicates how the overall grade is calculated.

displaySetting

enum (DisplaySetting)

Indicates who can see the overall grade..

gradeCategories[]

object (GradeCategory)

Grade categories that are available for coursework in the course.

CalculationType

Possible methods of overall grade calculation.

Enums
CALCULATION_TYPE_UNSPECIFIED No method specified. This is never returned.
TOTAL_POINTS Overall grade is the sum of grades divided by the sum of total points regardless of category.
WEIGHTED_CATEGORIES Overall grade is the weighted average by category.

DisplaySetting

Possible settings for displaying the overall grade.

Enums
DISPLAY_SETTING_UNSPECIFIED No setting specified. This is never returned.
SHOW_OVERALL_GRADE Shows overall grade in the gradebook and student profile to both teachers and students.
HIDE_OVERALL_GRADE Does not show overall grade in the gradebook or student profile.
SHOW_TEACHERS_ONLY Shows the overall grade to teachers in the gradebook and student profile. Hides from students in their student profile.

Methods

create

Creates a course.

delete

Deletes a course.

get

Returns a course.

list

Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request.

patch

Updates one or more fields in a course.

update

Updates a course.