List
|
|||||
|
|
Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. Returned courses are ordered by creation time, with the most recently created coming first.
This method returns the following error codes:
PERMISSION_DENIED
for access errors.INVALID_ARGUMENT
if the query argument is malformed.NOT_FOUND
if any users specified in the query arguments do not exist
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- Manage your Google Classroom classes
- View your Google Classroom classes
Input
This building block consumes 5 input parameters
Name | Format | Description |
---|---|---|
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 |
teacherId |
STRING |
Restricts returned courses to those having a teacher with the specified identifier. The identifier can be one of the following:
|
courseStates |
ENUMERATION |
Restricts returned courses to those in one of the specified states The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED |
studentId |
STRING |
Restricts returned courses to those having a student with the specified identifier. The identifier can be one of the following:
|
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 |
= Parameter name
= Format
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 |
teacherId STRING Restricts returned courses to those having a teacher with the specified identifier. The identifier can be one of the following:
|
courseStates ENUMERATION Restricts returned courses to those in one of the specified states The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED |
studentId STRING Restricts returned courses to those having a student with the specified identifier. The identifier can be one of the following:
|
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 |
Output
This building block provides 24 output parameters
Name | Format | Description |
---|---|---|
nextPageToken |
STRING |
Token identifying the next page of results to return. If empty, no further results are available |
courses[] |
OBJECT |
A Course in Classroom |
courses[].guardiansEnabled |
BOOLEAN |
Whether or not guardian notifications are enabled for this course. Read-only |
courses[].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:
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 |
courses[].courseState |
ENUMERATION |
State of the course.
If unspecified, the default state is |
courses[].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 |
courses[].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 |
courses[].creationTime |
ANY |
Creation time of the course. Specifying this field in a course update mask results in an error. Read-only |
courses[].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 |
courses[].teacherFolder |
OBJECT |
Representation of a Google Drive folder |
courses[].teacherFolder.title |
STRING |
Title of the Drive folder. Read-only |
courses[].teacherFolder.alternateLink |
STRING |
URL that can be used to access the Drive folder. Read-only |
courses[].teacherFolder.id |
STRING |
Drive API resource ID |
courses[].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 |
courses[].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 Specifying this field in a course update mask results in an error |
courses[].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 |
courses[].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 |
courses[].enrollmentCode |
STRING |
Enrollment code to use when joining this course. Specifying this field in a course update mask results in an error. Read-only |
courses[].courseMaterialSets[] |
OBJECT |
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 |
courses[].courseMaterialSets[].title |
STRING |
Title for this set |
courses[].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 |
courses[].updateTime |
ANY |
Time of the most recent update to this course. Specifying this field in a course update mask results in an error. Read-only |
courses[].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 |
courses[].alternateLink |
STRING |
Absolute link to this course in the Classroom web UI. Read-only |
= Parameter name
= Format
nextPageToken STRING Token identifying the next page of results to return. If empty, no further results are available |
courses[] OBJECT A Course in Classroom |
courses[].guardiansEnabled BOOLEAN Whether or not guardian notifications are enabled for this course. Read-only |
courses[].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:
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 |
courses[].courseState ENUMERATION State of the course.
If unspecified, the default state is |
courses[].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 |
courses[].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 |
courses[].creationTime ANY Creation time of the course. Specifying this field in a course update mask results in an error. Read-only |
courses[].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 |
courses[].teacherFolder OBJECT Representation of a Google Drive folder |
courses[].teacherFolder.title STRING Title of the Drive folder. Read-only |
courses[].teacherFolder.alternateLink STRING URL that can be used to access the Drive folder. Read-only |
courses[].teacherFolder.id STRING Drive API resource ID |
courses[].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 |
courses[].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 Specifying this field in a course update mask results in an error |
courses[].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 |
courses[].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 |
courses[].enrollmentCode STRING Enrollment code to use when joining this course. Specifying this field in a course update mask results in an error. Read-only |
courses[].courseMaterialSets[] OBJECT 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 |
courses[].courseMaterialSets[].title STRING Title for this set |
courses[].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 |
courses[].updateTime ANY Time of the most recent update to this course. Specifying this field in a course update mask results in an error. Read-only |
courses[].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 |
courses[].alternateLink STRING Absolute link to this course in the Classroom web UI. Read-only |