List

Returns a list of guardians that the requesting user is permitted to view, restricted to those that match the request

4 variables
15 variables

Returns a list of guardians that the requesting user is permitted to view, restricted to those that match the request.

To list guardians for any student that the requesting user may view guardians for, use the literal character - for the student ID.

This method returns the following error codes:

  • PERMISSION_DENIED if a student_id is specified, and the requesting user is not permitted to view guardian information for that student, if "-" is specified as the student_id and the user is not a domain administrator, if guardians are not enabled for the domain in question, if the invited_email_address filter is set by a user who is not a domain administrator, or for other access errors.
  • INVALID_ARGUMENT if a student_id is specified, but its format cannot be recognized (it is not an email address, nor a student_id from the API, nor the literal string me). May also be returned if an invalid page_token is provided.
  • NOT_FOUND if a student_id is specified, and its format can be recognized, but Classroom has no record of that student

Authorization

To use this building block you will have to grant access to at least one of the following scopes:

  • View your Google Classroom guardians
  • View and manage guardians for students in your Google Classroom classes
  • View guardians for students in your Google Classroom classes

Input

This building block consumes 4 input parameters

  = Parameter name
  = Format

studentId STRING Required

Filter results by the student who the guardian is linked to. The identifier can be one of the following:

  • the numeric identifier for the user
  • the email address of the user
  • the string literal "me", indicating the requesting user
  • the string literal "-", indicating that results should be returned for all students that the requesting user has access to view.

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

invitedEmailAddress STRING

Filter results by the email address that the original invitation was sent to, resulting in this guardian link. This filter can only be used by domain administrators

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 15 output parameters

  = Parameter name
  = Format

nextPageToken STRING

Token identifying the next page of results to return. If empty, no further results are available

guardians[] OBJECT

Association between a student and a guardian of that student. The guardian may receive information about the student's course work

guardians[].studentId STRING

Identifier for the student to whom the guardian relationship applies

guardians[].guardianId STRING

Identifier for the guardian

guardians[].invitedEmailAddress STRING

The email address to which the initial guardian invitation was sent. This field is only visible to domain administrators

guardians[].guardianProfile OBJECT

Global information for a user

guardians[].guardianProfile.emailAddress STRING

Email address of the user.

Read-only

guardians[].guardianProfile.photoUrl STRING

URL of user's profile photo.

Read-only

guardians[].guardianProfile.permissions[] OBJECT

Global user permission description

guardians[].guardianProfile.name OBJECT

Details of the user's name

guardians[].guardianProfile.name.givenName STRING

The user's first name.

Read-only

guardians[].guardianProfile.name.familyName STRING

The user's last name.

Read-only

guardians[].guardianProfile.name.fullName STRING

The user's full name formed by concatenating the first and last name values.

Read-only

guardians[].guardianProfile.id STRING

Identifier of the user.

Read-only

guardians[].guardianProfile.verifiedTeacher BOOLEAN

Represents whether a G Suite for Education user's domain administrator has explicitly verified them as being a teacher. If the user is not a member of a G Suite for Education domain, than this field will always be false.

Read-only