List
|
|||||
|
|
Returns a list of course work that the requester is permitted to view.
Course students may only view PUBLISHED
course work. Course teachers
and domain administrators may view all course work.
This method returns the following error codes:
PERMISSION_DENIED
if the requesting user is not permitted to access the requested course or for access errors.INVALID_ARGUMENT
if the request is malformed.NOT_FOUND
if the requested course does not exist
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- Manage your course work and view your grades in Google Classroom
- View your course work and grades in Google Classroom
- Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer
- View course work and grades for students in the Google Classroom classes you teach or administer
Input
This building block consumes 5 input parameters
Name | Format | Description |
---|---|---|
courseId Required |
STRING |
Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias |
orderBy |
STRING |
Optional sort ordering for results. A comma-separated list of fields with
an optional sort direction keyword. Supported fields are |
pageToken |
STRING |
nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token |
pageSize |
INTEGER |
Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results |
courseWorkStates |
ENUMERATION |
Restriction on the work status to return. Only courseWork that matches
is returned. If unspecified, items with a work status of |
= Parameter name
= Format
courseId STRING Required Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias |
orderBy STRING Optional sort ordering for results. A comma-separated list of fields with
an optional sort direction keyword. Supported fields are |
pageToken STRING nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token |
pageSize INTEGER Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results |
courseWorkStates ENUMERATION Restriction on the work status to return. Only courseWork that matches
is returned. If unspecified, items with a work status of |
Output
This building block provides 41 output parameters
Name | Format | Description |
---|---|---|
nextPageToken |
STRING |
Token identifying the next page of results to return. If empty, no further results are available |
courseWork[] |
OBJECT |
Course work created by a teacher for students of the course |
courseWork[].materials[] |
OBJECT |
Material attached to course work. When creating attachments, setting the |
courseWork[].materials[].form |
OBJECT |
Google Forms item |
courseWork[].materials[].link |
OBJECT |
URL item |
courseWork[].materials[].youtubeVideo |
OBJECT |
YouTube video item |
courseWork[].materials[].driveFile |
OBJECT |
Drive file that is used as material for course work |
courseWork[].associatedWithDeveloper |
BOOLEAN |
Whether this course work item is associated with the Developer Console project making the request. See google.classroom.Work.CreateCourseWork for more details. Read-only |
courseWork[].updateTime |
ANY |
Timestamp of the most recent change to this course work. Read-only |
courseWork[].alternateLink |
STRING |
Absolute link to this course work in the Classroom web UI.
This is only populated if Read-only |
courseWork[].assigneeMode |
ENUMERATION |
Assignee mode of the coursework.
If unspecified, the default value is |
courseWork[].maxPoints |
NUMBER |
Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value |
courseWork[].multipleChoiceQuestion |
OBJECT |
Additional details for multiple-choice questions |
courseWork[].multipleChoiceQuestion.choices[] |
STRING |
|
courseWork[].assignment |
OBJECT |
Additional details for assignments |
courseWork[].assignment.studentWorkFolder |
OBJECT |
Representation of a Google Drive folder |
courseWork[].assignment.studentWorkFolder.title |
STRING |
Title of the Drive folder. Read-only |
courseWork[].assignment.studentWorkFolder.alternateLink |
STRING |
URL that can be used to access the Drive folder. Read-only |
courseWork[].assignment.studentWorkFolder.id |
STRING |
Drive API resource ID |
courseWork[].workType |
ENUMERATION |
Type of this course work. The type is set when the course work is created and cannot be changed |
courseWork[].scheduledTime |
ANY |
Optional timestamp when this course work is scheduled to be published |
courseWork[].description |
STRING |
Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters |
courseWork[].creationTime |
ANY |
Timestamp when this course work was created. Read-only |
courseWork[].dueDate |
OBJECT |
Represents a whole or partial calendar date, e.g. a birthday. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. This can represent:
Related types are google.type.TimeOfDay and |
courseWork[].dueDate.year |
INTEGER |
Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year |
courseWork[].dueDate.day |
INTEGER |
Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant |
courseWork[].dueDate.month |
INTEGER |
Month of year. Must be from 1 to 12, or 0 if specifying a year without a month and day |
courseWork[].individualStudentsOptions |
OBJECT |
Assignee details about a coursework/announcement.
This field is set if and only if |
courseWork[].individualStudentsOptions.studentIds[] |
STRING |
|
courseWork[].creatorUserId |
STRING |
Identifier for the user that created the coursework. Read-only |
courseWork[].state |
ENUMERATION |
Status of this course work.
If unspecified, the default state is |
courseWork[].submissionModificationMode |
ENUMERATION |
Setting to determine when students are allowed to modify submissions.
If unspecified, the default value is |
courseWork[].courseId |
STRING |
Identifier of the course. Read-only |
courseWork[].id |
STRING |
Classroom-assigned identifier of this course work, unique per course. Read-only |
courseWork[].dueTime |
OBJECT |
Represents a time of day. The date and time zone are either not significant
or are specified elsewhere. An API may choose to allow leap seconds. Related
types are google.type.Date and |
courseWork[].dueTime.minutes |
INTEGER |
Minutes of hour of day. Must be from 0 to 59 |
courseWork[].dueTime.hours |
INTEGER |
Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time |
courseWork[].dueTime.nanos |
INTEGER |
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999 |
courseWork[].dueTime.seconds |
INTEGER |
Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds |
courseWork[].title |
STRING |
Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters |
courseWork[].topicId |
STRING |
Identifier for the topic that this coursework is associated with. Must match an existing topic in the course |
= Parameter name
= Format
nextPageToken STRING Token identifying the next page of results to return. If empty, no further results are available |
courseWork[] OBJECT Course work created by a teacher for students of the course |
courseWork[].materials[] OBJECT Material attached to course work. When creating attachments, setting the |
courseWork[].materials[].form OBJECT Google Forms item |
courseWork[].materials[].link OBJECT URL item |
courseWork[].materials[].youtubeVideo OBJECT YouTube video item |
courseWork[].materials[].driveFile OBJECT Drive file that is used as material for course work |
courseWork[].associatedWithDeveloper BOOLEAN Whether this course work item is associated with the Developer Console project making the request. See google.classroom.Work.CreateCourseWork for more details. Read-only |
courseWork[].updateTime ANY Timestamp of the most recent change to this course work. Read-only |
courseWork[].alternateLink STRING Absolute link to this course work in the Classroom web UI.
This is only populated if Read-only |
courseWork[].assigneeMode ENUMERATION Assignee mode of the coursework.
If unspecified, the default value is |
courseWork[].maxPoints NUMBER Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value |
courseWork[].multipleChoiceQuestion OBJECT Additional details for multiple-choice questions |
courseWork[].multipleChoiceQuestion.choices[] STRING |
courseWork[].assignment OBJECT Additional details for assignments |
courseWork[].assignment.studentWorkFolder OBJECT Representation of a Google Drive folder |
courseWork[].assignment.studentWorkFolder.title STRING Title of the Drive folder. Read-only |
courseWork[].assignment.studentWorkFolder.alternateLink STRING URL that can be used to access the Drive folder. Read-only |
courseWork[].assignment.studentWorkFolder.id STRING Drive API resource ID |
courseWork[].workType ENUMERATION Type of this course work. The type is set when the course work is created and cannot be changed |
courseWork[].scheduledTime ANY Optional timestamp when this course work is scheduled to be published |
courseWork[].description STRING Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters |
courseWork[].creationTime ANY Timestamp when this course work was created. Read-only |
courseWork[].dueDate OBJECT Represents a whole or partial calendar date, e.g. a birthday. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. This can represent:
Related types are google.type.TimeOfDay and |
courseWork[].dueDate.year INTEGER Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year |
courseWork[].dueDate.day INTEGER Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant |
courseWork[].dueDate.month INTEGER Month of year. Must be from 1 to 12, or 0 if specifying a year without a month and day |
courseWork[].individualStudentsOptions OBJECT Assignee details about a coursework/announcement.
This field is set if and only if |
courseWork[].individualStudentsOptions.studentIds[] STRING |
courseWork[].creatorUserId STRING Identifier for the user that created the coursework. Read-only |
courseWork[].state ENUMERATION Status of this course work.
If unspecified, the default state is |
courseWork[].submissionModificationMode ENUMERATION Setting to determine when students are allowed to modify submissions.
If unspecified, the default value is |
courseWork[].courseId STRING Identifier of the course. Read-only |
courseWork[].id STRING Classroom-assigned identifier of this course work, unique per course. Read-only |
courseWork[].dueTime OBJECT Represents a time of day. The date and time zone are either not significant
or are specified elsewhere. An API may choose to allow leap seconds. Related
types are google.type.Date and |
courseWork[].dueTime.minutes INTEGER Minutes of hour of day. Must be from 0 to 59 |
courseWork[].dueTime.hours INTEGER Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time |
courseWork[].dueTime.nanos INTEGER Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999 |
courseWork[].dueTime.seconds INTEGER Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds |
courseWork[].title STRING Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters |
courseWork[].topicId STRING Identifier for the topic that this coursework is associated with. Must match an existing topic in the course |