v1

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

Creates course work. The resulting course work (and corresponding student submissions) are associated with the Developer Console project of the OAuth client ID used to make the request. Classroom API requests to modify course work and student submissions must be made with an OAuth client ID from the associated Developer Console project. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to access the requested course, create course work in the requested course, share a Drive attachment, or for access errors. * INVALID_ARGUMENT if the request is malformed. * NOT_FOUND if the requested course does not exist. * FAILED_PRECONDITION for the following request error: * AttachmentNotVisible

post/v1/courses/{courseId}/courseWork

Path parameters

courseIdstring required

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

Request body

workType'COURSE_WORK_TYPE_UNSPECIFIED' | 'ASSIGNMENT' | 'SHORT_ANSWER_QUESTION' | 'MULTIPLE_CHOICE_QUESTION'

Type of this course work. The type is set when the course work is created and cannot be changed.

scheduledTimestring google-datetime

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

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

Assignee mode of the coursework. If unspecified, the default value is ALL_STUDENTS.

creatorUserIdstring

Identifier for the user that created the coursework. Read-only.

titlestring

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

idstring

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

creationTimestring google-datetime

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

submissionModificationMode'SUBMISSION_MODIFICATION_MODE_UNSPECIFIED' | 'MODIFIABLE_UNTIL_TURNED_IN' | 'MODIFIABLE'

Setting to determine when students are allowed to modify submissions. If unspecified, the default value is MODIFIABLE_UNTIL_TURNED_IN.

descriptionstring

Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters.

gradingPeriodIdstring

Identifier of the grading period associated with the coursework. * At creation, if unspecified, the grading period ID will be set based on the dueDate (or scheduledTime if no dueDate is set). * To indicate no association to any grading period, set this field to an empty string (""). * If specified, it must match an existing grading period ID in the course.

topicIdstring

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

maxPointsnumber double

Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value.

alternateLinkstring

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

state'COURSE_WORK_STATE_UNSPECIFIED' | 'PUBLISHED' | 'DRAFT' | 'DELETED'

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

associatedWithDeveloperboolean

Whether this course work item is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only.

updateTimestring google-datetime

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

courseIdstring

Identifier of the course. Read-only.

Response

Successful response