Google Classroom API

Manages classes, rosters, and invitations in Google Classroom.

Service: classroom.googleapis.com

To call this service, we recommend that you use the Google-provided client libraries. If your application needs to use your own libraries to call this service, use the following information when you make the API requests.

Discovery document

A Discovery Document is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:

Service endpoint

A service endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:

  • https://classroom.googleapis.com

REST Resource: v1.courses

Methods
checkAddOnCreationEligibility
(deprecated)
GET /v1/courses/{courseId}:checkAddOnCreationEligibility
Returns whether a user is eligible to create add-on attachments in a given course.
checkGradingPeriodsSetupEligibility
(deprecated)
GET /v1/courses/{courseId}:checkGradingPeriodsSetupEligibility
Returns whether a user is eligible to update GradingPeriodSettings in a given course.
create POST /v1/courses
Creates a course.
delete DELETE /v1/courses/{id}
Deletes a course.
get GET /v1/courses/{id}
Returns a course.
getGradingPeriodSettings GET /v1/courses/{courseId}/gradingPeriodSettings
Returns the grading period settings in a course.
list GET /v1/courses
Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request.
patch PATCH /v1/courses/{id}
Updates one or more fields in a course.
update PUT /v1/courses/{id}
Updates a course.
updateGradingPeriodSettings PATCH /v1/courses/{courseId}/gradingPeriodSettings
Updates grading period settings of a course.

REST Resource: v1.courses.aliases

Methods
create POST /v1/courses/{courseId}/aliases
Creates an alias for a course.
delete DELETE /v1/courses/{courseId}/aliases/{alias}
Deletes an alias of a course.
list GET /v1/courses/{courseId}/aliases
Returns a list of aliases for a course.

REST Resource: v1.courses.announcements

Methods
create POST /v1/courses/{courseId}/announcements
Creates an announcement.
delete DELETE /v1/courses/{courseId}/announcements/{id}
Deletes an announcement.
get GET /v1/courses/{courseId}/announcements/{id}
Returns an announcement.
getAddOnContext GET /v1/courses/{courseId}/announcements/{itemId}/addOnContext
Gets metadata for Classroom add-ons in the context of a specific post.
list GET /v1/courses/{courseId}/announcements
Returns a list of announcements that the requester is permitted to view.
modifyAssignees POST /v1/courses/{courseId}/announcements/{id}:modifyAssignees
Modifies assignee mode and options of an announcement.
patch PATCH /v1/courses/{courseId}/announcements/{id}
Updates one or more fields of an announcement.

REST Resource: v1.courses.announcements.addOnAttachments

Methods
create POST /v1/courses/{courseId}/announcements/{itemId}/addOnAttachments
Creates an add-on attachment under a post.
delete DELETE /v1/courses/{courseId}/announcements/{itemId}/addOnAttachments/{attachmentId}
Deletes an add-on attachment.
get GET /v1/courses/{courseId}/announcements/{itemId}/addOnAttachments/{attachmentId}
Returns an add-on attachment.
list GET /v1/courses/{courseId}/announcements/{itemId}/addOnAttachments
Returns all attachments created by an add-on under the post.
patch PATCH /v1/courses/{courseId}/announcements/{itemId}/addOnAttachments/{attachmentId}
Updates an add-on attachment.

REST Resource: v1.courses.courseWork

Methods
create POST /v1/courses/{courseId}/courseWork
Creates course work.
delete DELETE /v1/courses/{courseId}/courseWork/{id}
Deletes a course work.
get GET /v1/courses/{courseId}/courseWork/{id}
Returns course work.
getAddOnContext GET /v1/courses/{courseId}/courseWork/{itemId}/addOnContext
Gets metadata for Classroom add-ons in the context of a specific post.
list GET /v1/courses/{courseId}/courseWork
Returns a list of course work that the requester is permitted to view.
modifyAssignees POST /v1/courses/{courseId}/courseWork/{id}:modifyAssignees
Modifies assignee mode and options of a coursework.
patch PATCH /v1/courses/{courseId}/courseWork/{id}
Updates one or more fields of a course work.

REST Resource: v1.courses.courseWork.addOnAttachments

Methods
create POST /v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments
Creates an add-on attachment under a post.
delete DELETE /v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments/{attachmentId}
Deletes an add-on attachment.
get GET /v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments/{attachmentId}
Returns an add-on attachment.
list GET /v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments
Returns all attachments created by an add-on under the post.
patch PATCH /v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments/{attachmentId}
Updates an add-on attachment.

REST Resource: v1.courses.courseWork.addOnAttachments.studentSubmissions

Methods
get GET /v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments/{attachmentId}/studentSubmissions/{submissionId}
Returns a student submission for an add-on attachment.
patch PATCH /v1/courses/{courseId}/courseWork/{itemId}/addOnAttachments/{attachmentId}/studentSubmissions/{submissionId}
Updates data associated with an add-on attachment submission.

REST Resource: v1.courses.courseWork.rubrics

Methods
create POST /v1/courses/{courseId}/courseWork/{courseWorkId}/rubrics
Creates a rubric.
delete DELETE /v1/courses/{courseId}/courseWork/{courseWorkId}/rubrics/{id}
Deletes a rubric.
get GET /v1/courses/{courseId}/courseWork/{courseWorkId}/rubrics/{id}
Returns a rubric.
list GET /v1/courses/{courseId}/courseWork/{courseWorkId}/rubrics
Returns a list of rubrics that the requester is permitted to view.
patch PATCH /v1/courses/{courseId}/courseWork/{courseWorkId}/rubrics/{id}
Updates a rubric.

REST Resource: v1.courses.courseWork.studentSubmissions

Methods
get GET /v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}
Returns a student submission.
list GET /v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions
Returns a list of student submissions that the requester is permitted to view, factoring in the OAuth scopes of the request.
modifyAttachments POST /v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments
Modifies attachments of student submission.
patch PATCH /v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}
Updates one or more fields of a student submission.
reclaim POST /v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim
Reclaims a student submission on behalf of the student that owns it.
return POST /v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return
Returns a student submission.
turnIn POST /v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn
Turns in a student submission.

REST Resource: v1.courses.courseWorkMaterials

Methods
create POST /v1/courses/{courseId}/courseWorkMaterials
Creates a course work material.
delete DELETE /v1/courses/{courseId}/courseWorkMaterials/{id}
Deletes a course work material.
get GET /v1/courses/{courseId}/courseWorkMaterials/{id}
Returns a course work material.
getAddOnContext GET /v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnContext
Gets metadata for Classroom add-ons in the context of a specific post.
list GET /v1/courses/{courseId}/courseWorkMaterials
Returns a list of course work material that the requester is permitted to view.
patch PATCH /v1/courses/{courseId}/courseWorkMaterials/{id}
Updates one or more fields of a course work material.

REST Resource: v1.courses.courseWorkMaterials.addOnAttachments

Methods
create POST /v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnAttachments
Creates an add-on attachment under a post.
delete DELETE /v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnAttachments/{attachmentId}
Deletes an add-on attachment.
get GET /v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnAttachments/{attachmentId}
Returns an add-on attachment.
list GET /v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnAttachments
Returns all attachments created by an add-on under the post.
patch PATCH /v1/courses/{courseId}/courseWorkMaterials/{itemId}/addOnAttachments/{attachmentId}
Updates an add-on attachment.

REST Resource: v1.courses.posts

Methods
getAddOnContext GET /v1/courses/{courseId}/posts/{postId}/addOnContext
Gets metadata for Classroom add-ons in the context of a specific post.

REST Resource: v1.courses.posts.addOnAttachments

Methods
create POST /v1/courses/{courseId}/posts/{postId}/addOnAttachments
Creates an add-on attachment under a post.
delete DELETE /v1/courses/{courseId}/posts/{postId}/addOnAttachments/{attachmentId}
Deletes an add-on attachment.
get GET /v1/courses/{courseId}/posts/{postId}/addOnAttachments/{attachmentId}
Returns an add-on attachment.
list GET /v1/courses/{courseId}/posts/{postId}/addOnAttachments
Returns all attachments created by an add-on under the post.
patch PATCH /v1/courses/{courseId}/posts/{postId}/addOnAttachments/{attachmentId}
Updates an add-on attachment.

REST Resource: v1.courses.posts.addOnAttachments.studentSubmissions

Methods
get GET /v1/courses/{courseId}/posts/{postId}/addOnAttachments/{attachmentId}/studentSubmissions/{submissionId}
Returns a student submission for an add-on attachment.
patch PATCH /v1/courses/{courseId}/posts/{postId}/addOnAttachments/{attachmentId}/studentSubmissions/{submissionId}
Updates data associated with an add-on attachment submission.

REST Resource: v1.courses.students

Methods
create POST /v1/courses/{courseId}/students
Adds a user as a student of a course.
delete DELETE /v1/courses/{courseId}/students/{userId}
Deletes a student of a course.
get GET /v1/courses/{courseId}/students/{userId}
Returns a student of a course.
list GET /v1/courses/{courseId}/students
Returns a list of students of this course that the requester is permitted to view.

REST Resource: v1.courses.teachers

Methods
create POST /v1/courses/{courseId}/teachers
Creates a teacher of a course.
delete DELETE /v1/courses/{courseId}/teachers/{userId}
Removes the specified teacher from the specified course.
get GET /v1/courses/{courseId}/teachers/{userId}
Returns a teacher of a course.
list GET /v1/courses/{courseId}/teachers
Returns a list of teachers of this course that the requester is permitted to view.

REST Resource: v1.courses.topics

Methods
create POST /v1/courses/{courseId}/topics
Creates a topic.
delete DELETE /v1/courses/{courseId}/topics/{id}
Deletes a topic.
get GET /v1/courses/{courseId}/topics/{id}
Returns a topic.
list GET /v1/courses/{courseId}/topics
Returns the list of topics that the requester is permitted to view.
patch PATCH /v1/courses/{courseId}/topics/{id}
Updates one or more fields of a topic.

REST Resource: v1.invitations

Methods
accept POST /v1/invitations/{id}:accept
Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course.
create POST /v1/invitations
Creates an invitation.
delete DELETE /v1/invitations/{id}
Deletes an invitation.
get GET /v1/invitations/{id}
Returns an invitation.
list GET /v1/invitations
Returns a list of invitations that the requesting user is permitted to view, restricted to those that match the list request.

REST Resource: v1.registrations

Methods
create POST /v1/registrations
Creates a Registration, causing Classroom to start sending notifications from the provided feed to the destination provided in cloudPubSubTopic.
delete DELETE /v1/registrations/{registrationId}
Deletes a Registration, causing Classroom to stop sending notifications for that Registration.

REST Resource: v1.userProfiles

Methods
checkUserCapability GET /v1/userProfiles/{userId}:checkUserCapability
Returns whether a user may use the specified Classroom capability.
get GET /v1/userProfiles/{userId}
Returns a user profile.

REST Resource: v1.userProfiles.guardianInvitations

Methods
create POST /v1/userProfiles/{guardianInvitation.studentId}/guardianInvitations
Creates a guardian invitation, and sends an email to the guardian asking them to confirm that they are the student's guardian.
get GET /v1/userProfiles/{studentId}/guardianInvitations/{invitationId}
Returns a specific guardian invitation.
list GET /v1/userProfiles/{studentId}/guardianInvitations
Returns a list of guardian invitations that the requesting user is permitted to view, filtered by the parameters provided.
patch PATCH /v1/userProfiles/{studentId}/guardianInvitations/{invitationId}
Modifies a guardian invitation.

REST Resource: v1.userProfiles.guardians

Methods
delete DELETE /v1/userProfiles/{studentId}/guardians/{guardianId}
Deletes a guardian.
get GET /v1/userProfiles/{studentId}/guardians/{guardianId}
Returns a specific guardian.
list GET /v1/userProfiles/{studentId}/guardians
Returns a list of guardians that the requesting user is permitted to view, restricted to those that match the request.