List
|
|||||
|
|
Returns a list of announcements that the requester is permitted to view.
Course students may only view PUBLISHED
announcements. Course teachers
and domain administrators may view all announcements.
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:
- View and manage announcements in Google Classroom
- View announcements in Google Classroom
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 |
announcementStates |
ENUMERATION |
Restriction on the |
orderBy |
STRING |
Optional sort ordering for results. A comma-separated list of fields with
an optional sort direction keyword. Supported field is |
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 |
= Parameter name
= Format
courseId STRING Required Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias |
announcementStates ENUMERATION Restriction on the |
orderBy STRING Optional sort ordering for results. A comma-separated list of fields with
an optional sort direction keyword. Supported field is |
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 |
Output
This building block provides 19 output parameters
Name | Format | Description |
---|---|---|
announcements[] |
OBJECT |
Announcement created by a teacher for students of the course |
announcements[].scheduledTime |
ANY |
Optional timestamp when this announcement is scheduled to be published |
announcements[].creationTime |
ANY |
Timestamp when this announcement was created. Read-only |
announcements[].individualStudentsOptions |
OBJECT |
Assignee details about a coursework/announcement.
This field is set if and only if |
announcements[].individualStudentsOptions.studentIds[] |
STRING |
|
announcements[].creatorUserId |
STRING |
Identifier for the user that created the announcement. Read-only |
announcements[].state |
ENUMERATION |
Status of this announcement.
If unspecified, the default state is |
announcements[].text |
STRING |
Description of this announcement. The text must be a valid UTF-8 string containing no more than 30,000 characters |
announcements[].courseId |
STRING |
Identifier of the course. Read-only |
announcements[].id |
STRING |
Classroom-assigned identifier of this announcement, unique per course. Read-only |
announcements[].materials[] |
OBJECT |
Material attached to course work. When creating attachments, setting the |
announcements[].materials[].form |
OBJECT |
Google Forms item |
announcements[].materials[].link |
OBJECT |
URL item |
announcements[].materials[].youtubeVideo |
OBJECT |
YouTube video item |
announcements[].materials[].driveFile |
OBJECT |
Drive file that is used as material for course work |
announcements[].updateTime |
ANY |
Timestamp of the most recent change to this announcement. Read-only |
announcements[].alternateLink |
STRING |
Absolute link to this announcement in the Classroom web UI.
This is only populated if Read-only |
announcements[].assigneeMode |
ENUMERATION |
Assignee mode of the announcement.
If unspecified, the default value is |
nextPageToken |
STRING |
Token identifying the next page of results to return. If empty, no further results are available |
= Parameter name
= Format
announcements[] OBJECT Announcement created by a teacher for students of the course |
announcements[].scheduledTime ANY Optional timestamp when this announcement is scheduled to be published |
announcements[].creationTime ANY Timestamp when this announcement was created. Read-only |
announcements[].individualStudentsOptions OBJECT Assignee details about a coursework/announcement.
This field is set if and only if |
announcements[].individualStudentsOptions.studentIds[] STRING |
announcements[].creatorUserId STRING Identifier for the user that created the announcement. Read-only |
announcements[].state ENUMERATION Status of this announcement.
If unspecified, the default state is |
announcements[].text STRING Description of this announcement. The text must be a valid UTF-8 string containing no more than 30,000 characters |
announcements[].courseId STRING Identifier of the course. Read-only |
announcements[].id STRING Classroom-assigned identifier of this announcement, unique per course. Read-only |
announcements[].materials[] OBJECT Material attached to course work. When creating attachments, setting the |
announcements[].materials[].form OBJECT Google Forms item |
announcements[].materials[].link OBJECT URL item |
announcements[].materials[].youtubeVideo OBJECT YouTube video item |
announcements[].materials[].driveFile OBJECT Drive file that is used as material for course work |
announcements[].updateTime ANY Timestamp of the most recent change to this announcement. Read-only |
announcements[].alternateLink STRING Absolute link to this announcement in the Classroom web UI.
This is only populated if Read-only |
announcements[].assigneeMode ENUMERATION Assignee mode of the announcement.
If unspecified, the default value is |
nextPageToken STRING Token identifying the next page of results to return. If empty, no further results are available |