Method: userProfiles.guardianInvitations.patch
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
שינוי של הזמנה להורה או לאפוטרופוס.
בשלב הזה, השינוי היחיד שתקף הוא שינוי הערך של state
מ-PENDING
ל-COMPLETE
. הפעולה הזו תגרום לביטול ההזמנה.
השיטה הזו מחזירה את קודי השגיאה הבאים:
PERMISSION_DENIED
אם למשתמש הנוכחי אין הרשאה לנהל אפוטרופוסים, אם אפוטרופוסים לא מופעלים בדומיין הרלוונטי או בגלל שגיאות גישה אחרות.
FAILED_PRECONDITION
אם הקישור לאפוטרופוס לא נמצא במצב PENDING
.
INVALID_ARGUMENT
אם לא ניתן לזהות את הפורמט של תעודת הסטודנט שצוינה (היא לא כתובת אימייל או userId
מ-API הזה), או אם ל-GuardianInvitation
שהוענק יש state
שאינו COMPLETE
, או אם הוא משנה שדות שאינם state
.
NOT_FOUND
אם מזהה התלמיד שצוין הוא מזהה תלמיד תקין, אבל אין ב-Classroom תיעוד של התלמיד הזה, או אם השדה id
לא מתייחס להזמנה של הורה או אפוטרופוס שידועה ל-Classroom.
בקשת HTTP
PATCH https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardianInvitations/{invitationId}
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
פרמטרים של נתיב
פרמטרים |
studentId |
string
המזהה של התלמיד או התלמידה שרוצים לשנות את ההזמנה של האפוטרופוס שלהם.
|
invitationId |
string
השדה id של ה-GuardianInvitation שרוצים לשנות.
|
פרמטרים של שאילתה
פרמטרים |
updateMask |
string (FieldMask format)
מסכה שמזהה את השדות בקורס שרוצים לעדכן. השדה הזה נדרש כדי לבצע עדכון. העדכון נכשל אם צוינו שדות לא חוקיים. השדות הבאים חוקיים:
כשמגדירים את השדה הזה בפרמטר של שאילתה, צריך לציין אותו כך: updateMask=<field1>,<field2>,...
זוהי רשימה של שמות שדות מוגדרים במלואם, שמופרדים בפסיקים. דוגמה: "user.displayName,photo"
|
גוף הבקשה
גוף הבקשה מכיל מופע של GuardianInvitation
.
גוף התשובה
אם הפעולה מצליחה, גוף התגובה מכיל מופע של GuardianInvitation
.
היקפי הרשאה
נדרש היקף הרשאות OAuth הבא:
https://www.googleapis.com/auth/classroom.guardianlinks.students
מידע נוסף זמין במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],[],null,["# Method: userProfiles.guardianInvitations.patch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nModifies a guardian invitation.\n\nCurrently, the only valid modification is to change the `state` from `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if guardians are not enabled for the domain in question or for other [access errors](/workspace/classroom/reference/Access.Errors).\n- `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.\n- `INVALID_ARGUMENT` if the format of the student ID provided cannot be recognized (it is not an email address, nor a `userId` from this API), or if the passed `GuardianInvitation` has a `state` other than `COMPLETE`, or if it modifies fields other than `state`.\n- `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student, or if the `id` field does not refer to a guardian invitation known to Classroom.\n\n### HTTP request\n\n`PATCH https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardianInvitations/{invitationId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------|-----------------------------------------------------------------------------|\n| `studentId` | `string` The ID of the student whose guardian invitation is to be modified. |\n| `invitationId` | `string` The `id` field of the `GuardianInvitation` to be modified. |\n\n### Query parameters\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Mask that identifies which fields on the course to update. This field is required to do an update. The update fails if invalid fields are specified. The following fields are valid: - `state` When set in a query parameter, this field should be specified as `updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...` This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\n### Request body\n\nThe request body contains an instance of [GuardianInvitation](/workspace/classroom/reference/rest/v1/userProfiles.guardianInvitations#GuardianInvitation).\n\n### Response body\n\nIf successful, the response body contains an instance of [GuardianInvitation](/workspace/classroom/reference/rest/v1/userProfiles.guardianInvitations#GuardianInvitation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.guardianlinks.students`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]